Combinational or Sequential Circuit

Status
Not open for further replies.

krishna2728

Member level 5
Joined
Oct 23, 2010
Messages
84
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
 

It looks like a transparent latch to me.

What do you actually need help with?
 

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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…