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.

Question about 2-bit variable in Verilog

Status
Not open for further replies.

feel_on_on

Full Member level 5
Joined
Apr 29, 2005
Messages
283
Helped
6
Reputation
12
Reaction score
4
Trophy points
1,298
Activity points
3,208
reg a [1:0] a is a 2-bit variable


then...if (a == 1'b0)
state = 6'b100000 ;

else state = 6'b011101 ;

2-bit variable == 1-bit value : 1'b0 ,it affect the design?
 

Re: Question on verilog

If "a" is either 00 or 10, it will satisfy the first part of your if statement.

So if you did not intend that, it has affected your design :)
 

Question on verilog

Agree with rberek!

Take care of it , coding style is a good thing.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top