二、Verilog Language
Vectors
1、Vectors
Problem Statement:
Build a circuit that has one 3-bit input, then outputs the same vector, and also splits it into three separate 1-bit outputs. Connect output o0 to the input vector's position 0,o1 to position 1, etc.
module top_module (
input wire [2:0] vec,
output wire [2:0] outv,
output wire o2,
output wire o1,
output wire o0
);
assign outv = vec;
assign o2 = outv[2];
assign o1 = outv[1];
assign o0 = outv[0];
endmodule
2、Vectors in more details
Problem Statement:
Build a combinational circuit that splits an input half-word (16 bits, [15:0] ) into lower [7:0] and upper [15:8] bytes