0 Verilog Assignment Operators Level 1 (1)
0 Verilog Assignment Operators Level 1 (1)
(b)
Q2. (a) Write Verilog code for given Equation F = x1x3’ + x2x3’ + x3’x4’ + x1x2 + x1x4’
(b) Write Verilog code for given Equation F = (x1+x3’).(x1+x2+x4’).(x2+x3’+x4’)
1
VERILOG OPERATORS
Q4. Design a 4*1 Multiplexer using conditional operator and verify it with testbench and
waveform.
Q5. Consider the following program:
module adder sign (X, Y, S, S2s);
input [3:0] X, Y;
output [7:0] S, S2s;
assign S = X + Y,
S2s = {{4{X[3]}}, X} + {{4{Y[3]}}, Y};
endmodule
(a) if X = 0011 and Y = 1101, What will be the value of S and S2s?
(b) What operation is assigned for S2s in the given program.