What will this construct do in verilog?
z= a && (b[1:0]=0) && c
where
a:wire
c:[3:0] wire
z:[3:0] wire
Looks like a mixup of bool and bitwise OPs?
What will this construct do in verilog?
z= a && (b[1:0]=0) && c
where
a:wire
c:[3:0] wire
z:[3:0] wire
Looks like a mixup of bool and bitwise OPs?
As dave_59 mentioned you have a syntax error in your code. Assuming you meant
z = a && (b[1:0] == 0) && cthat would be equivalent toz = a && (b[1:0] == 0) && |c. That meansz=0001ifais1and allbbits are0and at least one of thec's bits is1. Otherwisez=0000.Following I create the module along with its test bench, printing truth table for the module. Hope it's useful.