From 2d3ae938c4a4f4787ad4dc581c09e938fa6e87b3 Mon Sep 17 00:00:00 2001 From: "raoxianhong@jingjiamicro.com" Date: Fri, 24 Sep 2021 06:05:21 +0800 Subject: [PATCH] 202109240605 --- hdl4secell/include/hdl4secell.h | 2 +- hdl4secell/src/hdl4se_variable.c | 12 +++++++++++- hdl4sesim/src/hdl4sesim.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hdl4secell/include/hdl4secell.h b/hdl4secell/include/hdl4secell.h index 28f0546..5cc0a45 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 0b294cf..b8072a6 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 e42cb5d..da1b3a9 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) { -- GitLab