Jump to content

Recommended Posts

Posted

Hi 

I am defining the input ports at the top module which will be the input ports also to all the sub-modules. But these input ports have to change the value as I have to run the for loop for multiple layers. Where exactly I have to run this for loop in the TOP MODULE. Whether i have to a make a process inside the top Module but then I will not be able to change the values of my ports. Thanks. The loop is given as:

for (int layer_id = 0; layer_id < 27; layer_id++)
	{

		net_CFG = get_network_config();

		layer_t  layer = net_CFG->layers[layer_id];
		dimension_t    w_in = layer.width;           // 256 First Layer
		dimension_t    h_in = layer.height;          // 256
		channel_t      chi = layer.channels_in;      // 3
		channel_t      cho = layer.channels_out;     // 64
		stride_t         s = layer.stride;           // 2
		kernel_t         k = layer.kernel;


		width.write(w_in);
		height.write(h_in);
		chin.write(chi);
		chout.write(cho);
		stride.write(s);
		kernel_value.write(k);


	}

 

Posted

I am running this loop in the constructor of the top module but I as the values i want to vary for the re-run of the simulation. How to restart the simulation with new set of values. I have instantiated this top module in the main and calling sc_start() command from there. help me Thanks

Posted

Hello @wasim6691,

With the current implementation of the SystemC library available on the Accellera website, once the simulation has been started using sc_start you cannot dynamically change the number of modules instantiated.

I would once again refer the comment from @maehne, that you need to get your basics right for SystemC before continuing further on your project.

 

Regards,

Ameya Vikram Singh

 

Posted

I mean for Example I have two Modules A and  B. Once I use sc_start() command. Simulation runs only once and thread dies. But I want to keep the simulation run x times before getting the thread dead. Thats why In the Top module I am trying something to solve this. If You understand my question then let me know.Please or I should elaborate more. Thanks

Posted

You don't seem to be familiar enough with the concept of discrete event driven simulation. Simulation stops once all events have been processed by the processes of your system or the simulation end time has been reached. If you want your simulation to continue, you have to modify your stimuli process(es) so that they keep generating stimuli as long as you wish.

Again, I recommend you to read a good introductory book on SystemC before continuing with your modelling efforts!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...