Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

question regarding execution of instantiation in verilog!

Status
Not open for further replies.

Indrajit Ghosh

Junior Member level 2
Joined
Feb 17, 2015
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
170
I am a bit confused about the order of execution of Instantiation of modules, suppose i instantiate 5 modules one after the other ,
now will the instantiation will be done sequentially or concurrently?

What will be the behavior if

A> The instantiated modules are interdependent ?
B>The instantiated modules are independent?
 

sharath666

Advanced Member level 2
Joined
Apr 4, 2011
Messages
552
Helped
126
Reputation
252
Reaction score
124
Trophy points
1,323
Location
India
Activity points
3,830
There is no relation between instantiated modules. They all work independently and at the same time. It is similar to always blocks in a module.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,025
Helped
2,058
Reputation
4,133
Reaction score
2,010
Trophy points
1,393
Activity points
38,605
Each module works like a chip on a circuit board - all running all the time in parrallel to one another.
 

Indrajit Ghosh

Junior Member level 2
Joined
Feb 17, 2015
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
170
Will there be any signal contention if i try to instantiate the same ipcore simultaneously from two different modules?
 

rahdirs

Advanced Member level 1
Joined
May 22, 2013
Messages
424
Helped
93
Reputation
192
Reaction score
91
Trophy points
1,308
Location
Mordor
Activity points
4,496
Will there be any signal contention if i try to instantiate the same ipcore simultaneously from two different modules?
No.
Even in a single module if you instantiate the same ip core with different instance names,there are no issues
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,652
Helped
1,774
Reputation
3,554
Reaction score
1,722
Trophy points
1,393
Location
USA
Activity points
57,812
Will there be any signal contention if i try to instantiate the same ipcore simultaneously from two different modules?
Seems to me you're thinking of an instantiated core as if it is like a subroutine in a programming language. Where you can't "call" the routine in multiple places simultaneously as the variables are shared. Keep in mind VHDL and Verilog are not software languages they are hardware description languages.

If you instantiate the ip core it is like an IC on a board if you put two of them on the board they don't share their internal circuits.

So when you learn about for loops in VHDL/Verilog, don't think they work just like for loops in software languages (as in temporal looping) they instead work like hardware (replicating spatially), e.g. you want 10 copies of a module, you can use a for loop to "generate" those copies instead of instantiating each one separately.
 

Indrajit Ghosh

Junior Member level 2
Joined
Feb 17, 2015
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
170
so basically you mean to say ,If i instantiate the same ipcore even 10 times ,it will be treated as separate piece of hardware working independtly,so even in the rtl description will it show as separate pieces of hardware?
 

rahdirs

Advanced Member level 1
Joined
May 22, 2013
Messages
424
Helped
93
Reputation
192
Reaction score
91
Trophy points
1,308
Location
Mordor
Activity points
4,496
so basically you mean to say ,If i instantiate the same ipcore even 10 times ,it will be treated as separate piece of hardware working independtly,so even in the rtl description will it show as separate pieces of hardware?
Yes,but if you are trying to use use an ip core in the same module,more than once you will have to instantiate it with different instance names.

For example,try instantiating multiple fifo's/multiple adders etc... using ip core in your code & see the schematic. You can see multiple ip cores & you will understand better
 

Dan Mills

Advanced Member level 2
Joined
Nov 10, 2013
Messages
510
Helped
237
Reputation
474
Reaction score
229
Trophy points
43
Activity points
4,558
It is a horrible mistake to come at a HDL with a software mindset, it just does not work that way.

In software you are telling a processor what to DO, in a synthesizeable HDL you are telling the chip what to BE, the difference is critical to understanding what is going on.

While I am an expert C programmer I find VHDL very much easier then Verilog simply because VHDL does not mentally make me think 'C'.

Start with thinking about the hardware architecture of what you want to accomplish and go from there, far more then in (relatively trivial) software, diagrams (including timing diagrams) and data flow drawings are where design starts.

Regards, Dan.
 
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top