提交 938a3bda 编写于 作者: 饶先宏's avatar 饶先宏

202105251743

上级 fd62634d
......@@ -266,8 +266,7 @@ static int hdl4se_bind2_hdl4se_detector_GetSignalValue(HOBJECT object, int index
{
sHDL4SEBind2* pobj;
pobj = (sHDL4SEBind2*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_bind2_hdl4se_unit_GetValue(object, 0, pobj->out_width, value);
}
static int hdl4se_bind2_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -98,7 +98,6 @@ static int hdl4se_bind3Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
{
sHDL4SEBind3* pobj;
int i;
int outputwidth;
pobj = (sHDL4SEBind3*)malloc(sizeof(sHDL4SEBind3));
if (pobj == NULL)
return -1;
......@@ -267,8 +266,7 @@ static int hdl4se_bind3_hdl4se_detector_GetSignalValue(HOBJECT object, int index
{
sHDL4SEBind3* pobj;
pobj = (sHDL4SEBind3*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_bind3_hdl4se_unit_GetValue(object, 0, pobj->out_width, value);
}
static int hdl4se_bind3_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -98,7 +98,6 @@ static int hdl4se_bind4Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
{
sHDL4SEBind4* pobj;
int i;
int outputwidth;
pobj = (sHDL4SEBind4*)malloc(sizeof(sHDL4SEBind4));
if (pobj == NULL)
return -1;
......@@ -267,8 +266,7 @@ static int hdl4se_bind4_hdl4se_detector_GetSignalValue(HOBJECT object, int index
{
sHDL4SEBind4* pobj;
pobj = (sHDL4SEBind4*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_bind4_hdl4se_unit_GetValue(object, 0, pobj->out_width, value);
}
static int hdl4se_bind4_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -350,8 +350,7 @@ static int hdl4se_binop_hdl4se_detector_GetSignalValue(HOBJECT object, int index
{
sHDL4SEBinop* pobj;
pobj = (sHDL4SEBinop*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_binop_hdl4se_unit_GetValue(object, 2, pobj->out_width, value);
}
static int hdl4se_binop_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -209,7 +209,6 @@ static int hdl4se_mux16_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT f
static int hdl4se_mux16_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber ** value)
{
int i;
int sel;
sHDL4SEMux16* pobj;
pobj = (sHDL4SEMux16*)objectThis(object);
......@@ -273,8 +272,7 @@ static int hdl4se_mux16_hdl4se_detector_GetSignalValue(HOBJECT object, int index
{
sHDL4SEMux16* pobj;
pobj = (sHDL4SEMux16*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_mux16_hdl4se_unit_GetValue(object, 0, pobj->width, value);
}
static int hdl4se_mux16_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -211,7 +211,6 @@ static int hdl4se_mux2_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT fr
static int hdl4se_mux2_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber** value)
{
int i;
int sel;
sHDL4SEMux2* pobj;
pobj = (sHDL4SEMux2*)objectThis(object);
......@@ -276,7 +275,7 @@ static int hdl4se_mux2_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
{
sHDL4SEMux2* pobj;
pobj = (sHDL4SEMux2*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return hdl4se_mux2_hdl4se_unit_GetValue(object, 0, pobj->width, value);
return 0;
}
......
......@@ -209,7 +209,6 @@ static int hdl4se_mux4_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT fr
static int hdl4se_mux4_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber ** value)
{
int i;
int sel;
sHDL4SEMux4* pobj;
pobj = (sHDL4SEMux4*)objectThis(object);
......@@ -274,7 +273,7 @@ static int hdl4se_mux4_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
{
sHDL4SEMux4* pobj;
pobj = (sHDL4SEMux4*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return hdl4se_mux4_hdl4se_unit_GetValue(object, 0, pobj->width, value);
return 0;
}
......
......@@ -209,7 +209,6 @@ static int hdl4se_mux8_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT fr
static int hdl4se_mux8_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber ** value)
{
int i;
int sel;
sHDL4SEMux8* pobj;
pobj = (sHDL4SEMux8*)objectThis(object);
......@@ -273,8 +272,7 @@ static int hdl4se_mux8_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
{
sHDL4SEMux8* pobj;
pobj = (sHDL4SEMux8*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_mux8_hdl4se_unit_GetValue(object, 0, pobj->width, value);
}
static int hdl4se_mux8_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -141,7 +141,6 @@ static int hdl4se_regCreate(const PARAMITEM* pParams, int paramcount, HOBJECT* p
static void hdl4se_regDestroy(HOBJECT object)
{
sHDL4SEReg* pobj;
int i;
pobj = (sHDL4SEReg*)objectThis(object);
if (pobj->name != NULL)
free(pobj->name);
......@@ -175,7 +174,6 @@ static int hdl4se_reg_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT fro
static int hdl4se_reg_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber ** value)
{
int i;
sHDL4SEReg* pobj;
pobj = (sHDL4SEReg*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
......@@ -227,8 +225,7 @@ static int hdl4se_reg_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
{
sHDL4SEReg* pobj;
pobj = (sHDL4SEReg*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_reg_hdl4se_unit_GetValue(object, 0, pobj->width, value);
}
static int hdl4se_reg_hdl4se_detector_GetUnitCount(HOBJECT object)
......
......@@ -305,9 +305,9 @@ static int hdl4se_split2_hdl4se_detector_GetSignalValue(HOBJECT object, int inde
if (index <0 || index > SPLITCOUNT)
return -1;
if (index == 0)
objectCall1(value, Assign, pobj->in_data);
return objectCall3(pobj->in, GetValue, pobj->in_index, pobj->width, pobj->in_data);
else
objectCall1(value, Assign, pobj->out_data[index - 1]);
return hdl4se_split2_hdl4se_unit_GetValue(object, index, pobj->out_info[index-1][0], value);
return 0;
}
......
......@@ -308,9 +308,9 @@ static int hdl4se_split4_hdl4se_detector_GetSignalValue(HOBJECT object, int inde
if (index <0 || index > SPLITCOUNT)
return -1;
if (index == 0)
objectCall1(value, Assign, pobj->in_data);
else
objectCall1(value, Assign, pobj->out_data[index-1]);
return objectCall3(pobj->in, GetValue, pobj->in_index, pobj->width, pobj->in_data);
else
return hdl4se_split4_hdl4se_unit_GetValue(object, index, pobj->out_info[index - 1][0], value);
return 0;
}
......
......@@ -181,7 +181,6 @@ static int hdl4se_unopCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
static void hdl4se_unopDestroy(HOBJECT object)
{
sHDL4SEUnop* pobj;
int i;
pobj = (sHDL4SEUnop*)objectThis(object);
if (pobj->name != NULL)
free(pobj->name);
......@@ -215,7 +214,6 @@ static int hdl4se_unop_hdl4se_unit_Connect(HOBJECT object, int index, HOBJECT fr
static int hdl4se_unop_hdl4se_unit_GetValue(HOBJECT object, int index, int width, IBigNumber ** value)
{
int i;
sHDL4SEUnop* pobj;
pobj = (sHDL4SEUnop*)objectThis(object);
if (pobj->datavalid == 0) {
......@@ -307,9 +305,9 @@ static int hdl4se_unop_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
sHDL4SEUnop* pobj;
pobj = (sHDL4SEUnop*)objectThis(object);
if (index == 0)
objectCall1(value, Assign, pobj->in_data);
objectCall3(pobj->wire_in, GetValue, pobj->wire_in_index, pobj->in_width, value);
else if (index == 1)
objectCall1(value, Assign, pobj->out_data);
return hdl4se_unop_hdl4se_unit_GetValue(object, index, pobj->out_width, value);
return 0;
}
......
......@@ -239,8 +239,7 @@ static int hdl4se_wire_hdl4se_detector_GetSignalValue(HOBJECT object, int index,
{
sHDL4SEWire* pobj;
pobj = (sHDL4SEWire*)objectThis(object);
objectCall1(value, Assign, pobj->out_data);
return 0;
return hdl4se_wire_hdl4se_unit_GetValue(object, index, pobj->width, value);
}
static int hdl4se_wire_hdl4se_detector_GetUnitCount(HOBJECT object)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册