Jan 25, 2007 #1 D davyzhu Advanced Member level 1 Joined May 23, 2004 Messages 494 Helped 5 Reputation 10 Reaction score 2 Trophy points 1,298 Location oriental Activity points 4,436 verilog vector assignment Hi all, Is there Vector assignment in Verilog like C show below: reg [31:0] vectors [2:0] = {5, 6, 7}; Or I have to assign vectors one by one? Best regards, Davy
verilog vector assignment Hi all, Is there Vector assignment in Verilog like C show below: reg [31:0] vectors [2:0] = {5, 6, 7}; Or I have to assign vectors one by one? Best regards, Davy
Jan 25, 2007 #2 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 verilog vector assignment module At the best you can do this... Code: module vec_assign(); reg [31:0] vectors [2:0]; initial {vectors[2], vectors[1], vectors[0]} = {32'd5, 32'd6, 32'd7}; endmodule // vec_assign
verilog vector assignment module At the best you can do this... Code: module vec_assign(); reg [31:0] vectors [2:0]; initial {vectors[2], vectors[1], vectors[0]} = {32'd5, 32'd6, 32'd7}; endmodule // vec_assign