Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

instaniatinga a module at every clock edge

Status
Not open for further replies.

pratikjain

Newbie level 6
Newbie level 6
Joined
Feb 23, 2011
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,370
i have to call a module several times at every clock edge....since we cannot instantiate a module in an always block i need some other way to do so...pls help
 

mrflibble

Advanced Member level 5
Advanced Member level 5
Joined
Apr 19, 2010
Messages
2,720
Helped
679
Reputation
1,360
Reaction score
652
Trophy points
1,393
Activity points
19,551
Are we talking about something that will synthesise to actual hardware? If yes, could you post the module that you are talking about?
 

TrickyDicky

Advanced Member level 7
Advanced Member level 7
Joined
Jun 7, 2010
Messages
7,109
Helped
2,080
Reputation
4,179
Reaction score
2,045
Trophy points
1,393
Activity points
39,763
You cannot dynamically instatiate anything. That would be like asking a CPU to create another CPU when it got too busy.
 

pratikjain

Newbie level 6
Newbie level 6
Joined
Feb 23, 2011
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,370
yes,i need to synthesize my code also.im posting the module and i want to call this module 256 times for different values of in1,in2,in3,in4.

module invisible(in1,in2,in3,in4,wmk,final_out,clk,rst);
input[7:0] in1,in2,in3,in4;
input clk,rst;
input[1:0]wmk;
output[7:0] final_out;
wire[7:0] neighbour_out,multipler_out1,multiplier_out2;
neighbour n1(neighbour_out,clk,rst,in2,in3,in4);
multipliermux m1(multiplier_out1,multiplier_out2,clk,rst,in1,neighbour_out,wmk);
adder a1(final_out,clk,rst,multipler_out1,multiplier_out2);
endmodule
 

Scrts

Member level 3
Member level 3
Joined
Mar 17, 2009
Messages
60
Helped
15
Reputation
30
Reaction score
15
Trophy points
1,288
Location
Kaunas, Lithuania
Activity points
1,604
You can't instantiate a module dynamically. Think of the hardware, not the software. You can instantiate the same module as many times as Your FPGA fits. So use the same module and change input parameters or instantiate the same module more than one time assigning different signals.
 

mrflibble

Advanced Member level 5
Advanced Member level 5
Joined
Apr 19, 2010
Messages
2,720
Helped
679
Reputation
1,360
Reaction score
652
Trophy points
1,393
Activity points
19,551
The concept of "call a module multiple times" doesn't make too much sense when using it in the context of synthesized hardware.

You can however instantiate a module multiple times, for example using the generate/endgenerate verilog construct.

hope that helps
 

childs

Member level 5
Member level 5
Joined
Apr 28, 2008
Messages
87
Helped
15
Reputation
30
Reaction score
12
Trophy points
1,288
Activity points
1,945
if u need this module to process the 256 signals/data in1, in2, in3.... till in256. One way of doing so is by having 256 such modules to serve each signal/data.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top