B
Billy Mays
Guest
Hey All,
I'm using Quartus II and the (* ram_init_file = "..." *)
doesn't seem to be initializing the memory allocated for it. Here are
some examples:
(* ram_init_file = "test.mif" *) reg [31:0] mem[0:127];
(* ram_init_file = "scalar.mif" *) reg [15:0] srf [0:15];
(* ram_init_file = "vector.mif" *) reg [63:0] vrf [0:63];
(* ram_init_file = "test.mif" *) reg [15:0] sinLUT[0:63];
(* ram_init_file = "cos.mif" *) reg [15:0] cosLUT[0:511];
For some reason, only the 'mem' registers seem to be initialized, even
though it has similar definitions to the sinLUT and cosLUT definitions.
The only warnings that Quartus shows are that:
Warning (10030): Net "sinLUT" at Fetch.v(36) has no driver or initial
value, using a default initial value '0'
Warning (10030): Net "cosLUT" at Fetch.v(37) has no driver or initial
value, using a default initial value '0'
These errors don't appear for the other definitions and Quartus can read
in and edit the .mif files.
Is there some newbie mistake I'm making or is there a better way to
initialize memory from a file in Verilog?
Bill
I'm using Quartus II and the (* ram_init_file = "..." *)
doesn't seem to be initializing the memory allocated for it. Here are
some examples:
(* ram_init_file = "test.mif" *) reg [31:0] mem[0:127];
(* ram_init_file = "scalar.mif" *) reg [15:0] srf [0:15];
(* ram_init_file = "vector.mif" *) reg [63:0] vrf [0:63];
(* ram_init_file = "test.mif" *) reg [15:0] sinLUT[0:63];
(* ram_init_file = "cos.mif" *) reg [15:0] cosLUT[0:511];
For some reason, only the 'mem' registers seem to be initialized, even
though it has similar definitions to the sinLUT and cosLUT definitions.
The only warnings that Quartus shows are that:
Warning (10030): Net "sinLUT" at Fetch.v(36) has no driver or initial
value, using a default initial value '0'
Warning (10030): Net "cosLUT" at Fetch.v(37) has no driver or initial
value, using a default initial value '0'
These errors don't appear for the other definitions and Quartus can read
in and edit the .mif files.
Is there some newbie mistake I'm making or is there a better way to
initialize memory from a file in Verilog?
Bill