I'm not that familiar in Verilog but can you call another module when it's inside a case statement?
Asked
Active
Viewed 6,910 times
0
-
A somewhat similar question on this [link](http://stackoverflow.com/questions/33719071/error-while-using-always-block-in-verilog/33719290). You can have generate block also. – sharvil111 Jan 19 '16 at 13:28
2 Answers
2
You cannot call a module just as you do in C language, since it's not a function, you instantiate it.
If you want to instantiate a module, you should use generate
.
Edit: An example of using generate
with a case statement can be found here.
2nd edit: If you just wanted to call a section of code in a case-statement then you can create a task or a function. More information here. (credit goes to Hida)

Community
- 1
- 1

George Netu
- 2,758
- 4
- 28
- 49
-
To add to this: If you just wanted to call a section of code in a case-statement then you can create a task or a function. More information [here](http://www.asic-world.com/verilog/task_func1.html). – Hida Jan 21 '16 at 08:22
-
0
you can not call module within case statement , but you can create function and then call in case statement (task is not synthesizeble)