GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SREC_MEM (5)

NAME

srec_mem - Lattice Memory Initialization format

CONTENTS

Description
     Syntax
     Header
     Bin and Hex Formats
     AddrHex
     See Also
     Size Multiplier
     Byte Order
Copyright
Maintainer

DESCRIPTION

A Lattice Memory Initialization format (.mem), by Lattice Semiconductor, file is an ASCII text file that consists of a header followed by lines of memory data.

    Syntax

The data must be in one of the following formats: Bin (binary), Hex (hexadecimal), or Address[hy]Hex (described below).

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.

    Header

A CW].mem file starts with a header, which declares the file format, memory size, and address and data display radix for Memory Generator. The syntax of the header is:

#Format=Bin | Hex | AddrHex
#Depth=1 I]to 65536
#Width=1 I]to 256
#AddrRadix=I]index[hy]number
#DataRadix=I]index[hy]number
#Data


The I]index[hy]number can be one of the following numbers. AddrRadix and DataRadix can have different values.
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


    Bin and Hex Formats

The data is represented in binary or hexadecimal format. Each line of data specifies the contents for one memory location, starting with address 0. That is, the first line is for address 0, the second line is for address 1, and so on. For each line, the data is interpreted as least significant bit on the right.

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

    AddrHex

The data is represented in hexadecimal format. Each line consists of an address followed by a colon and then any number of data words, separated by spaces:
I]address: I]data data> data...
The data will be applied starting at <address> and filling in sequentially from there.

For example:

A0:03 F3 3E 4F
B2:3B 9F

will initialize A0 with 03, A1 with F3, A2 with 3E, A3 with 4F, B2 with 3B, and B3 with 9F. The other addresses will be initialized to 0. So A4 through B1 will be set to 0.

    See Also

http://help.latticesemi.com/docs/webhelp/eng/wwhelp/wwhimpl/common/html/
wwhelp.htm#href=Design%20Entry/memory_initialization_file.htm
#1371843&single=true

    Size Multiplier

The size multiplier depends on the width selected. As files grow larger, their size multipliers will approach those in the table, from above.

WidthLinuxWindows
82.963.0
162.472.5
322.252.28
642.132.15

    Byte Order

This format is implicitly big[hy]endian. Use a -byte[hy]swap filter if you need something different.

COPYRIGHT

srec_mem version 1.64
Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller

The srec_mem program comes with ABSOLUTELY NO WARRANTY; for details use the ’srec_mem -VERSion License’ command. This is free software and you are welcome to redistribute it under certain conditions; for details use the ’srec_mem -VERSion License’ command.

MAINTAINER

Scott FinneranE[hy]Mail:scottfinneran@yahoo.com.au
Peter MillerE[hy]Mail:pmiller@opensource.org.au
Search for    or go to Top of page |  Section 5 |  Main Index


Reference Manual *(N) (5) SRecord

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.