I am having a hard time understanding the following syntax in Verilog:
input [15:0] a; // 16-bit input
output [31:0] result; // 32-bit output
assign result = {{16{a[15]}}, {a[15:0]}};
I know the assign
statement will wire something up to the result
bus using wires and combinational logic, but what's up with the curly braces and 16{a[15]}
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…