FlashROM in Actel’s Low-Power Flash Devices
5- 10
v1.1
end component;
component GND
port( Y : out std_logic);
end component;
signal U_7_PIN2 : std_logic ;
begin
GND_1_net : GND port map(Y => U_7_PIN2);
UFROM0 : UFROM
generic map(MEMORYFILE => "FROM_a.mem")
port map(DO0 => DOUT(0), DO1 => DOUT(1), DO2 => DOUT(2), DO3 => DOUT(3), DO4 => DOUT(4),
DO5 => DOUT(5), DO6 => DOUT(6), DO7 => DOUT(7), ADDR0 => ADDR(0), ADDR1 => ADDR(1),
ADDR2 => ADDR(2), ADDR3 => ADDR(3), ADDR4 => ADDR(4), ADDR5 => ADDR(5),
ADDR6 => ADDR(6));
end DEF_ARCH;
SmartGen generates the following files along with the netlist. These are located in the SmartGen
folder for the Libero IDE project.
1. MEM (Memory Initialization) file
2. UFC (User Flash Configuration) file
3. Log file
The UFC file, generated by SmartGen, has the FlashROM configuration for single or multiple
devices and is used during STAPL generation. It contains the region properties and simulation
values. Note that any changes in the MEM file will not be reflected in the UFC file. Do not modify
the UFC to change FlashROM content. Instead, use the SmartGen GUI to modify the FlashROM
description of how the UFC file is used during the programming file generation. The log file has
information regarding the file type and file location.
Simulation of FlashROM Design
The MEM file has 128 rows of 8 bits, each representing the contents of the FlashROM used for
simulation. For example, the first row represents page 0, byte 0; the next row is page 0, byte 1; and
so the pattern continues. Note that the three MSBs of the address define the page number, and the
four LSBs define the byte number. So, if you send address 0000100 to FlashROM, this corresponds to
the page 0 and byte 4 location, which is the fifth row in the MEM file. SmartGen defaults to 0s for
any unspecified location of the FlashROM. Besides using the MEM file generated by SmartGen, you
can create a binary file with 128 rows of 8 bits each and use this as a MEM file. Actel recommends
that you use different file names if you plan to generate multiple MEM files. During simulation,
Libero IDE passes the MEM file used as the generic file in the netlist, along with the design files and
testbench. If you want to use different MEM files during simulation, you need to modify the
generic file reference in the netlist.
…………………
UFROM0: UFROM
--generic map(MEMORYFILE => "F:\Appsnotes\FROM\test_designs\testa\smartgen\FROM_a.mem")
--generic map(MEMORYFILE => "F:\Appsnotes\FROM\test_designs\testa\smartgen\FROM_b.mem")
…………………….
The VITAL and Verilog simulation models accept the generics passed by the netlist, read the MEM
file, and perform simulation with the data in the file.