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.

Instantiation inside an if loop?

Status
Not open for further replies.

auroral

Newbie level 6
Joined
Apr 13, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,387
Can I instantiate modules inside an if loop? Basically I want to instantiate some modules only if some condition holds true. If I can't do it, what is the workaround? Thanks.
 

the answer to your question is "no". That wouldn't make sense. instances of modules describe hardware. If you have a module, the best you can do is to have some logic that interacts with the inputs/outputs of the module.

That said, you can use "generates" to instantiate modules based on constants/generics/parameters. Keep in mind that _constant_ means "does not change during operation".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top