Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
lerwys committed Jun 8, 2018
2 parents 6ae6037 + 97421c2 commit 05a5230
Show file tree
Hide file tree
Showing 17 changed files with 164 additions and 11 deletions.
24 changes: 24 additions & 0 deletions core/common/include/hw/wb_pos_calc_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

/* Modified to include 32-bit register modifier. This needed a 64-bit
* shift macro to avoid "left shift count >= width of type" errors*/
/* WARNING!! This file was hand-modified to add switching tag / data mask
at the end of the register map and not in the middle as wbgen2 does for
FIFO regsiters*/

#ifndef __WBGEN2_REGDEFS_WB_POS_CALC_REGS_WB
#define __WBGEN2_REGDEFS_WB_POS_CALC_REGS_WB
Expand Down Expand Up @@ -560,6 +563,22 @@
#define POS_CALC_POSFIFO_MONIT1_CSR_USEDW_SHIFT 0
#define POS_CALC_POSFIFO_MONIT1_CSR_USEDW_W(value) WBGEN2_DSP_GEN_WRITE(value, 0, 4)
#define POS_CALC_POSFIFO_MONIT1_CSR_USEDW_R(reg) WBGEN2_DSP_GEN_READ(reg, 0, 4)

/* definitions for register: Switching Tag synchronization */

/* definitions for field: Tag Synchronization Enable in reg: Switching Tag synchronization */
#define POS_CALC_SW_TAG_EN WBGEN2_DSP_GEN_MASK(0, 1)

/* definitions for register: Switching Data Mask */

/* definitions for field: Switching Data Mask Enable in reg: Switching Data Mask */
#define POS_CALC_SW_DATA_MASK_EN WBGEN2_DSP_GEN_MASK(0, 1)

/* definitions for field: Switching Data Mask Samples in reg: Switching Data Mask */
#define POS_CALC_SW_DATA_MASK_SAMPLES_MASK WBGEN2_DSP_GEN_MASK(1, 16)
#define POS_CALC_SW_DATA_MASK_SAMPLES_SHIFT 1
#define POS_CALC_SW_DATA_MASK_SAMPLES_W(value) WBGEN2_DSP_GEN_WRITE(value, 1, 16)
#define POS_CALC_SW_DATA_MASK_SAMPLES_R(reg) WBGEN2_DSP_GEN_READ(reg, 1, 16)
/* [0x0]: REG Config divisor threshold TBT register */
#define POS_CALC_REG_DS_TBT_THRES 0x00000000
/* [0x4]: REG Config divisor threshold FOFB register */
Expand Down Expand Up @@ -676,4 +695,9 @@
#define POS_CALC_REG_POSFIFO_MONIT1_R3 0x000000e0
/* [0xe4]: REG FIFO 'POS FIFO Monitoring 1' control/status register */
#define POS_CALC_REG_POSFIFO_MONIT1_CSR 0x000000e4
/* [0xe8]: REG Switching Tag synchronization */
#define POS_CALC_REG_SW_TAG 0x000000e8
/* [0xec]: REG Switching Data Mask */
#define POS_CALC_REG_SW_DATA_MASK 0x000000ec

#endif
2 changes: 1 addition & 1 deletion core/revision/include/revision.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/* HALCS version macros for compile-time API detection */

#define HALCS_VERSION_MAJOR 1
#define HALCS_VERSION_MINOR 2
#define HALCS_VERSION_MINOR 5
#define HALCS_VERSION_PATCH 0

#define HALCS_MAKE_VERSION(major, minor, patch) \
Expand Down
8 changes: 7 additions & 1 deletion core/sm_io/include/sm_io_dsp_codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ struct _smio_dsp_data_t {
#define DSP_NAME_SET_GET_MONIT1_UPDT "dsp_set_get_monit1_updt"
#define DSP_OPCODE_SET_GET_MONIT1_AMP_POS 26
#define DSP_NAME_SET_GET_MONIT1_AMP_POS "dsp_set_get_monit1_amp_pos"
#define DSP_OPCODE_END 27
#define DSP_OPCODE_SET_GET_SW_TAG_EN 27
#define DSP_NAME_SET_GET_SW_TAG_EN "dsp_set_get_sw_tag_en"
#define DSP_OPCODE_SET_GET_SW_DATA_MASK_EN 28
#define DSP_NAME_SET_GET_SW_DATA_MASK_EN "dsp_set_get_sw_data_mask_en"
#define DSP_OPCODE_SET_GET_SW_DATA_MASK_SAMPLES 29
#define DSP_NAME_SET_GET_SW_DATA_MASK_SAMPLES "dsp_set_get_sw_data_mask_samples"
#define DSP_OPCODE_END 30

/* Messaging Reply OPCODES */
#define DSP_REPLY_TYPE uint32_t
Expand Down
27 changes: 27 additions & 0 deletions core/sm_io/src/sm_io/c/modules/dsp/sm_io_dsp_exp.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,30 @@ DSP_MONIT_FUNC_NAME_HEADER(monit1_amp_pos)
DSP_MONIT_FUNC_BODY(owner, args, ret, MONIT1);
}

#define POS_CALC_SW_TAG_EN_MIN 0
#define POS_CALC_SW_TAG_EN_MAX 1
RW_PARAM_FUNC(dsp, sw_tag_en) {
SET_GET_PARAM(dsp, 0x0, POS_CALC, SW_TAG, EN,
SINGLE_BIT_PARAM, POS_CALC_SW_TAG_EN_MIN, POS_CALC_SW_TAG_EN_MAX,
NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}

#define POS_CALC_SW_DATA_MASK_EN_MIN 0
#define POS_CALC_SW_DATA_MASK_EN_MAX 1
RW_PARAM_FUNC(dsp, sw_data_mask_en) {
SET_GET_PARAM(dsp, 0x0, POS_CALC, SW_DATA_MASK, EN,
SINGLE_BIT_PARAM, POS_CALC_SW_DATA_MASK_EN_MIN, POS_CALC_SW_DATA_MASK_EN_MAX,
NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}

#define POS_CALC_SW_DATA_MASK_SAMPLES_MIN 0
#define POS_CALC_SW_DATA_MASK_SAMPLES_MAX ((1<<16ULL)-1)
RW_PARAM_FUNC(dsp, sw_data_mask_samples) {
SET_GET_PARAM(dsp, 0x0, POS_CALC, SW_DATA_MASK, SAMPLES,
MULT_BIT_PARAM, POS_CALC_SW_DATA_MASK_SAMPLES_MIN, POS_CALC_SW_DATA_MASK_SAMPLES_MAX,
NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}

/* Exported function pointers */
const disp_table_func_fp dsp_exp_fp [] = {
RW_PARAM_FUNC_NAME(dsp, kx),
Expand Down Expand Up @@ -412,6 +436,9 @@ const disp_table_func_fp dsp_exp_fp [] = {
RW_PARAM_FUNC_NAME(dsp, monit1_pos_sum),
RW_PARAM_FUNC_NAME(dsp, monit1_updt),
DSP_MONIT_FUNC_NAME(monit1_amp_pos),
RW_PARAM_FUNC_NAME(dsp, sw_tag_en),
RW_PARAM_FUNC_NAME(dsp, sw_data_mask_en),
RW_PARAM_FUNC_NAME(dsp, sw_data_mask_samples),
NULL
};

Expand Down
3 changes: 3 additions & 0 deletions core/sm_io_table/include/sm_io_dsp_exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ extern disp_op_t dsp_set_get_monit1_pos_q_exp;
extern disp_op_t dsp_set_get_monit1_pos_sum_exp;
extern disp_op_t dsp_set_get_monit1_updt_exp;
extern disp_op_t dsp_set_get_monit1_amp_pos_exp;
extern disp_op_t dsp_set_get_sw_tag_en_exp;
extern disp_op_t dsp_set_get_sw_data_mask_en_exp;
extern disp_op_t dsp_set_get_sw_data_mask_samples_exp;

extern const disp_op_t *dsp_exp_ops [];

Expand Down
39 changes: 39 additions & 0 deletions core/sm_io_table/src/sm_io_table/c/modules/dsp/sm_io_dsp_exports.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,42 @@ disp_op_t dsp_set_get_monit1_amp_pos_exp = {
}
};

disp_op_t dsp_set_get_sw_tag_en_exp = {
.name = DSP_NAME_SET_GET_SW_TAG_EN,
.opcode = DSP_OPCODE_SET_GET_SW_TAG_EN,
.retval = DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
.retval_owner = DISP_OWNER_OTHER,
.args = {
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_END
}
};

disp_op_t dsp_set_get_sw_data_mask_en_exp = {
.name = DSP_NAME_SET_GET_SW_DATA_MASK_EN,
.opcode = DSP_OPCODE_SET_GET_SW_DATA_MASK_EN,
.retval = DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
.retval_owner = DISP_OWNER_OTHER,
.args = {
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_END
}
};

disp_op_t dsp_set_get_sw_data_mask_samples_exp = {
.name = DSP_NAME_SET_GET_SW_DATA_MASK_SAMPLES,
.opcode = DSP_OPCODE_SET_GET_SW_DATA_MASK_SAMPLES,
.retval = DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
.retval_owner = DISP_OWNER_OTHER,
.args = {
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_END
}
};

/* Exported function description */
const disp_op_t *dsp_exp_ops [] = {
&dsp_set_get_kx_exp,
Expand Down Expand Up @@ -361,6 +397,9 @@ const disp_op_t *dsp_exp_ops [] = {
&dsp_set_get_monit1_pos_sum_exp,
&dsp_set_get_monit1_updt_exp,
&dsp_set_get_monit1_amp_pos_exp,
&dsp_set_get_sw_tag_en_exp,
&dsp_set_get_sw_data_mask_en_exp,
&dsp_set_get_sw_data_mask_samples_exp,
NULL
};

2 changes: 1 addition & 1 deletion libs/acqclient/include/acq_client_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* version macros for compile-time API detection */

#define ACQ_CLIENT_VERSION_MAJOR 1
#define ACQ_CLIENT_VERSION_MINOR 2
#define ACQ_CLIENT_VERSION_MINOR 5
#define ACQ_CLIENT_VERSION_PATCH 0

#define ACQ_CLIENT_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/bpmclient/include/bpm_client_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* version macros for compile-time API detection */

#define BPM_CLIENT_VERSION_MAJOR 1
#define BPM_CLIENT_VERSION_MINOR 2
#define BPM_CLIENT_VERSION_MINOR 5
#define BPM_CLIENT_VERSION_PATCH 0

#define BPM_CLIENT_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/convc/include/convc_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/* version macros for compile-time API detection */

#define CONVC_VERSION_MAJOR 1
#define CONVC_VERSION_MINOR 2
#define CONVC_VERSION_MINOR 5
#define CONVC_VERSION_PATCH 0

#define CONVC_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/disptable/include/disptable_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/* version macros for compile-time API detection */

#define DISPTABLE_VERSION_MAJOR 1
#define DISPTABLE_VERSION_MINOR 2
#define DISPTABLE_VERSION_MINOR 5
#define DISPTABLE_VERSION_PATCH 0

#define DISPTABLE_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/errhand/include/errhand_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/* version macros for compile-time API detection */

#define ERRHAND_VERSION_MAJOR 1
#define ERRHAND_VERSION_MINOR 2
#define ERRHAND_VERSION_MINOR 5
#define ERRHAND_VERSION_PATCH 0

#define ERRHAND_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/halcsclient/include/halcs_client_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* HALCS version macros for compile-time API detection */

#define HALCS_CLIENT_VERSION_MAJOR 1
#define HALCS_CLIENT_VERSION_MINOR 2
#define HALCS_CLIENT_VERSION_MINOR 5
#define HALCS_CLIENT_VERSION_PATCH 0

#define HALCS_CLIENT_MAKE_VERSION(major, minor, patch) \
Expand Down
21 changes: 21 additions & 0 deletions libs/halcsclient/include/halcs_client_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,27 @@ halcs_client_err_e halcs_get_monit1_updt (halcs_client_t *self, char *service,
halcs_client_err_e halcs_get_monit1_amp_pos (halcs_client_t *self, char *service,
struct _smio_dsp_data_t *dsp_data);

/* Switching Tag Enable. This sets/gets the tag synchronization */
/* All of the functions returns HALCS_CLIENT_SUCCESS if the
* parameter was correctly set or error (see halcs_client_err.h
* for all possible errors)*/
halcs_client_err_e halcs_set_sw_tag_en (halcs_client_t *self, char *service,
uint32_t sw_tag_en);
halcs_client_err_e halcs_get_sw_tag_en (halcs_client_t *self, char *service,
uint32_t *sw_tag_en);

/* Switching Data Mask Enable. This sets/gets the Switching masking of samples*/
halcs_client_err_e halcs_set_sw_data_mask_en (halcs_client_t *self, char *service,
uint32_t sw_data_mask_en);
halcs_client_err_e halcs_get_sw_data_mask_en (halcs_client_t *self, char *service,
uint32_t *sw_data_mask_en);

/* Switching Data Mask. This sets/gets the Switching mask to the specified number of samples*/
halcs_client_err_e halcs_set_sw_data_mask_samples (halcs_client_t *self, char *service,
uint32_t sw_data_mask_samples);
halcs_client_err_e halcs_get_sw_data_mask_samples (halcs_client_t *self, char *service,
uint32_t *sw_data_mask_samples);

/********************** SWAP Functions ********************/

/* Switching functions */
Expand Down
33 changes: 33 additions & 0 deletions libs/halcsclient/src/halcsclient/c/halcs_client_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,39 @@ halcs_client_err_e halcs_get_monit1_amp_pos (halcs_client_t *self, char *service
return err;
}

/* Switching Tag Enable */
PARAM_FUNC_CLIENT_WRITE(sw_tag_en)
{
return param_client_write (self, service, DSP_OPCODE_SET_GET_SW_TAG_EN, sw_tag_en);
}

PARAM_FUNC_CLIENT_READ(sw_tag_en)
{
return param_client_read (self, service, DSP_OPCODE_SET_GET_SW_TAG_EN, sw_tag_en);
}

/* Switching Data Mask Enable */
PARAM_FUNC_CLIENT_WRITE(sw_data_mask_en)
{
return param_client_write (self, service, DSP_OPCODE_SET_GET_SW_DATA_MASK_EN, sw_data_mask_en);
}

PARAM_FUNC_CLIENT_READ(sw_data_mask_en)
{
return param_client_read (self, service, DSP_OPCODE_SET_GET_SW_DATA_MASK_EN, sw_data_mask_en);
}

/* Switching Data Mask Samples */
PARAM_FUNC_CLIENT_WRITE(sw_data_mask_samples)
{
return param_client_write (self, service, DSP_OPCODE_SET_GET_SW_DATA_MASK_SAMPLES, sw_data_mask_samples);
}

PARAM_FUNC_CLIENT_READ(sw_data_mask_samples)
{
return param_client_read (self, service, DSP_OPCODE_SET_GET_SW_DATA_MASK_SAMPLES, sw_data_mask_samples);
}

/**************** Swap SMIO Functions ****************/

/* Switching functions */
Expand Down
2 changes: 1 addition & 1 deletion libs/hutils/include/hutils_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/* version macros for compile-time API detection */

#define HUTILS_VERSION_MAJOR 1
#define HUTILS_VERSION_MINOR 2
#define HUTILS_VERSION_MINOR 5
#define HUTILS_VERSION_PATCH 0

#define HUTILS_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/llio/include/ll_io_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* HALCS version macros for compile-time API detection */

#define LL_IO_VERSION_MAJOR 1
#define LL_IO_VERSION_MINOR 2
#define LL_IO_VERSION_MINOR 5
#define LL_IO_VERSION_PATCH 0

#define LL_IO_MAKE_VERSION(major, minor, patch) \
Expand Down
2 changes: 1 addition & 1 deletion libs/sdbutils/include/sdbutils_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/* version macros for compile-time API detection */

#define SDBUTILS_VERSION_MAJOR 1
#define SDBUTILS_VERSION_MINOR 2
#define SDBUTILS_VERSION_MINOR 5
#define SDBUTILS_VERSION_PATCH 0

#define SDBUTILS_MAKE_VERSION(major, minor, patch) \
Expand Down

0 comments on commit 05a5230

Please sign in to comment.