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.

beginner verilog question

Status
Not open for further replies.

donvaun

Newbie level 4
Joined
Mar 21, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
is it possible to call a function using the case statement?

something like:
always @(a) begin
case (a)
one: "module name"
'
'


if not, how can i create somthing similar with this?
 

ya its possible to call function with case statement
always @(selection, input)
case(sel)
try it
 

ya its possible to call function with case statement
always @(selection, input)
case(sel)
try it

thnx.. so how do i do with the syntx.. i tried doing it this waybut seems got error:
always @ (sel, a)
case (sel)
sel: = m m(.clk(cin), .a(a), .b(b), .p(y));


is this correct?
 

a module isn't a function.

a function is something that can be done within 1 cycle, using one or more inputs, and providing one output.
a module has inputs and outputs and defines the logic and structure used to implement the logic.

most likely, you want to instantiate the module outside of the always block, then use logic to select the correct inputs/outputs from the module.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top