srecord - Manipulate EPROM load files
Copyright (C) 2012 Lattice Semiconductor
Copyright (C) 2012 Peter Miller
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
For hexadecimal values, both upper and lower case can be used. If the data has fewer bits than the specified data width, the most significant bits are filled with 0. Any address not specified will be filled with 0.
Comments can be added at any point after the header (defined below) by starting the comment with a pound sign (#) or two slashes (//). The comment then includes everything to the end of the line. Comments may be added to any of the data, but never add comments to the header.
#Format=Bin | Hex | AddrHex #Depth=1 \f[I]to 65536 #Width=1 \f[I]to 256 #AddrRadix=\f[I]index\[hy]number #DataRadix=\f[I]index\[hy]number #Data
Binary: 0 Octal: 1 Decimal: 2 Hexadecimal: 3
For example, the following header says the .mem file is using the binary format for a 32x8 memory. When displayed in Memory Generator, the address will be shown in hexadecimal and the data will be shown in binary.
#Format=Bin #Depth=32 #Width=8 #AddrRadix=3 #DataRadix=0 #Data
For example, in the Bin format, the following lines will initialize address 0 to \[lq]00011011\[rq], address 1 to \[lq]11111010\[rq] (assuming it is a 32x8 memory).
# for a 32x8 memory 11011 11111010
In the Hex format, the following lines will initialize address 0 to \[lq]003B\[rq], address 1 to \[lq]FB0A\[rq] (assuming it is a 32x16 memory).
# for a 32x16 memory 3B FB0A
\f[I]address: \f[I]data data> data...
For example:
A0:03 F3 3E 4F B2:3B 9F
http://help.latticesemi.com/docs/webhelp/eng/wwhelp/wwhimpl/common/html/\ wwhelp.htm#href=Design%20Entry/memory_initialization_file.htm\ #1371843&single=true
Width;Linux;Windows |
8;2.96;3.0 |
16;2.47;2.5 |
32;2.25;2.28 |
64;2.13;2.15 |