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.

what will the following verilog code generate?

Status
Not open for further replies.

shivams

Junior Member level 1
Joined
Feb 13, 2010
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
pune
Activity points
1,361
always@*
begin
if en
y=a;
else
z=b;
end
 

by selector u mean mux? but code has 2 outputs
 

if en what's z's value. and if not ,what's y's value, it is not complete?

Added after 8 minutes:

u can try it through Quartus RTL viewer.
 

shivams said:
always@*
begin
if en
y=a;
else
z=b;
end

This will infer a latch for y and z,

e.g.
always @*
begin
if (en)
y = a;
end

always @*
begin
if (~en)
z = b;
end

HTH
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top