Question

In: Computer Science

Write Verilog code using for 3:8 Decoders with Quartus-II CAD software?? and write code of Full...

Write Verilog code using for 3:8 Decoders
with Quartus-II CAD software??
and write code of Full adder using 2 half adder ?

Solutions

Expert Solution

5

module decoder3to8 (input [2:0] I, output reg [7:0] Y);

always @ (I) begin

case (I)
3'b000: Y <= 8'b00000001;
3'b001: Y <= 8'b00000010;
3'b010: Y <= 8'b00000100;
3'b011: Y <= 8'b00001000;
3'b100: Y <= 8'b00010000;
3'b101: Y <= 8'b00100000;
3'b110: Y <= 8'b01000000;
3'b111: Y <= 8'b10000000;
default: Y <= 8'b00000000;
endcase

end

endmodule

Q2 (a)

module half_adder (input x, y, output sum, carry);

assign sum = x ^ y;
assign carry = x & y;

endmodule

///

(b)

module full_adder (input x, y, cin, output sum, cout);

wire [2:0] w;

half_adder u0 (x, y, w[0], w[1]);
half_adder u1 (w[0], cin, sum, w[2]);

assign cout = w[1] | w[2];

endmodule

///////////


Related Solutions

Write a verilog code for 5 to 8 multiplier using fourbit adder
Write a verilog code for 5 to 8 multiplier using fourbit adder
Design a 4-bit multiplier by using 4 bit full adder and write a verilog code.
Design a 4-bit multiplier by using 4 bit full adder and write a verilog code.
Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view...
Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view for code
1.Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block...
1.Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended. 2. Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended.
Design a Verilog code for 64x64 array multiplier. Use behavioral Verilog description with full adders and/or...
Design a Verilog code for 64x64 array multiplier. Use behavioral Verilog description with full adders and/or half adders. Please include testbench
Write a verilog code for digital clock and display it’s seven segment using fpga?
Write a verilog code for digital clock and display it’s seven segment using fpga?
Using the conditional assignment statements, write the verilog code for 16:1 Mux. Write the test bench...
Using the conditional assignment statements, write the verilog code for 16:1 Mux. Write the test bench for this module.
Write down the VERILOG code for an XOR gate and the testbench code to test it
Write down the VERILOG code for an XOR gate and the testbench code to test it
Write a Verilog code to implement 16 bit LFSR
Write a Verilog code to implement 16 bit LFSR
Design an 8-bit adder. Show Verilog code and testbench.
Design an 8-bit adder. Show Verilog code and testbench.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT