diff --git a/src/maker/ModelGeneration.py b/src/maker/ModelGeneration.py index bc79e4431..caafe3c8e 100755 --- a/src/maker/ModelGeneration.py +++ b/src/maker/ModelGeneration.py @@ -254,8 +254,8 @@ def cfuncmod(self): cfunc = open(self.modelpath + 'cfunc.mod', 'w') print("Building content for cfunc.mod file") - comment = '''/* This is cfunc.mod file auto generated by gen_con_info.py - Developed by Sumanto Kar at IIT Bombay */\n + comment = '''/* This cfunc.mod file auto generated by gen_con_info.py + Developed by Sumanto, Rahul at IIT Bombay */\n ''' header = ''' @@ -287,15 +287,16 @@ def cfuncmod(self): { inst_count++; PARAM(instance_id)=inst_count; - foo''' + self.fname.split('.')[0] + '''(0,inst_count); + foo_''' + self.fname.split('.')[0] + '''(0,inst_count); /* Allocate storage for output ports \ and set the load for input ports */ ''' port_init = [] for i, item in enumerate(self.input_port + self.output_port): - port_init.append(''' - port_''' + item.split(':')[0] + '''=PORT_SIZE(''' + item.split(':')[0] + '''); + port_init.append(self.fname.split('.')[0] + '''_port_''' + + item.split(':')[0] + '''=PORT_SIZE(''' + + item.split(':')[0] + '''); ''') cm_event_alloc = [] @@ -351,11 +352,13 @@ def cfuncmod(self): {\n\ if( INPUT_STATE(" + item.split(':')[0] + "[Ii])==ZERO )\n\ {\n\ - temp_" + item.split(':')[0] + "[Ii]=0;\ + " + self.fname.split('.')[0] + + "_temp_" + item.split(':')[0] + "[Ii]=0;\ }\n\ else\n\ {\n\ - temp_" + item.split(':')[0] + "[Ii]=1;\n\ + " + self.fname.split('.')[0] + + "_temp_" + item.split(':')[0] + "[Ii]=1;\n\ }\n\ }\n") @@ -367,11 +370,13 @@ def cfuncmod(self): "\t/* Scheduling event and processing them */\n\ for(Ii=0;Ii ''' + item.split(':')[0] + - ''', temp_''' + + ''', ''' + self.fname.split('.')[0] + '''_temp_''' + item.split(':')[0] + - ''', port_''' + + ''', ''' + self.fname.split('.')[0] + '''_port_''' + item.split(':')[0] + ''');\n''') after_eval.append('''