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.

Combinational or Sequential Circuit

Status
Not open for further replies.

krishna2728

Member level 5
Joined
Oct 23, 2010
Messages
85
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,298
Location
bengaluru,India
Activity points
1,734
Can anyone help me with this code

alway @ (*)
begin
if(en)
out <= in1 || in2;

// no else block

end
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,065
Helped
2,077
Reputation
4,171
Reaction score
2,030
Trophy points
1,393
Activity points
39,114
It looks like a transparent latch to me.

What do you actually need help with?
 

ads_ee

Full Member level 6
Joined
Oct 4, 2012
Messages
328
Helped
87
Reputation
176
Reaction score
87
Trophy points
1,308
Location
San Diego
Activity points
3,469
you should really use the bitwise operator | instead of the logical operator ||.

Here is a thread on that and there is a good example of the pitfall that you could end up dropping into using a mix of bitwise and logic in the same expression.


I use bitwise for combination logic generation and logical for comparisons in if statements.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top