Concatenation needs to know the width of every component
(or how would you know the length of the result?).
Thus, {1, 2, 3} is illegal and results in the error message:
unsized constants are not allowed in concatenations.
{ } 를 사용해서 여러 비트를 연결할 때 bit의 크기를 무조건 명시해야한다.
주어진 32-bits를 아래의 w,x,y,z
로 재조정하는 문제이다.
하나로 합친다음에 갈라서 assign 하였다.
module top_module (
input [4:0] a, b, c, d, e, f,
output [7:0] w, x, y, z
);
wire [31:0] full_32 = {a, b, c, d, e, f, 2'b11};
assign w = full_32[31:24];
assign x = full_32[23:16];
assign y = full_32[15: 8];
assign z = full_32[ 7: 0];
endmodule