diff --git a/hdl4secell/include/hdl4secell.h b/hdl4secell/include/hdl4secell.h index 28f0546c9fd625a40577b0e900b84221fe221719..5cc0a4588a4a65b36833b7d0d35ddbc97b96008f 100644 --- a/hdl4secell/include/hdl4secell.h +++ b/hdl4secell/include/hdl4secell.h @@ -107,7 +107,7 @@ enum varupdatefunc { }; #ifndef VARBITS -#define VARBITS 64 +#define VARBITS 512 #endif typedef struct sModuleVariable { diff --git a/hdl4secell/src/hdl4se_variable.c b/hdl4secell/src/hdl4se_variable.c index 0b294cf4ac7f787a61a108c3304624f0d923dc59..b8072a64f3cc1283dc5e456d5d2424e78176a746 100644 --- a/hdl4secell/src/hdl4se_variable.c +++ b/hdl4secell/src/hdl4se_variable.c @@ -682,7 +682,17 @@ ModuleVariable* varSHL(ModuleVariable* a, ModuleVariable* b); ModuleVariable* varSHR(ModuleVariable* a, ModuleVariable* b); ModuleVariable* varSAL(ModuleVariable* a, ModuleVariable* b); ModuleVariable* varSAR(ModuleVariable* a, ModuleVariable* b); -ModuleVariable* varOr(ModuleVariable* a, ModuleVariable* b); +ModuleVariable* varOr(ModuleVariable* a, ModuleVariable* b) +{ + int i; + ModuleVariable* temp; + temp = varTemp(max(a->width, b->width), 0); + for (i = 0; i < VARBITS / 64; i++) { + temp->data64[i] = a->data64[i] | b->data64[i]; + } + return temp; +} + ModuleVariable* varXor(ModuleVariable* a, ModuleVariable* b); ModuleVariable* varAnd(ModuleVariable* a, ModuleVariable* b); ModuleVariable* varGT(ModuleVariable* a, ModuleVariable* b); diff --git a/hdl4sesim/src/hdl4sesim.c b/hdl4sesim/src/hdl4sesim.c index e42cb5de75efa34fff46559fc2eb082022e7a482..da1b3a935e8ce76fdaff0bbc116dde720ab60f3f 100644 --- a/hdl4sesim/src/hdl4sesim.c +++ b/hdl4sesim/src/hdl4sesim.c @@ -241,7 +241,7 @@ static int hdl4sesim_hdl4se_simulator_SetReset(HOBJECT object, int reset) return 0; } -#define THREADCOUNT 3 +#define THREADCOUNT 9 static int hdl4sesim_hdl4se_simulator_ClkTick(HOBJECT object) {