Quartus II integrated synthesis and other synthesis tools also support the $readmemb
and $readmemh commands so that RAM initialization and ROM initialization work
identically in synthesis and simulation. Example 10–27 shows an initial block that
initializes an inferred RAM block using the $readmemb command.
Refer to the Verilog Language Reference Manual (LRM) 1364-2001 Section 17.2.8 or the
example in the Templates for the Quartus II software for details about the format of
the ram.txt file.
Example 10–27. Verilog HDL RAM Initialized with the readmemb Command
reg [7:0] ram[0:15];
initial
begin
$readmemb("ram.txt", ram);
end