summaryrefslogtreecommitdiff
path: root/src/model_generation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/model_generation.py')
-rw-r--r--src/model_generation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model_generation.py b/src/model_generation.py
index 4f2d7dd..15dc3e6 100644
--- a/src/model_generation.py
+++ b/src/model_generation.py
@@ -215,10 +215,10 @@ init_else='''
/* retrieve storage for output ports. */
'''
-els_evt_count1=0
-els_evt_count2=0
els_evt_ptr=[]
+els_evt_count1=[]
for item in output_port:
+ els_evt_count2=0
els_evt_ptr.append("_op_"+item.split(":")[0]+" = cm_event_get_ptr("+str(els_evt_count1)+","+str(els_evt_count2)+");")
els_evt_count2=els_evt_count2+1
els_evt_ptr.append("_op_"+item.split(":")[0]+"_old"+" = cm_event_get_ptr("+str(els_evt_count1)+","+str(els_evt_count2)+");")