SMOK

SMOK Component Guide

Last modified: April 12, 2005
Sloop Cebollita
  CSE Home  About Us    Search    Contact Info 
SMOK Package Components SMOK Debug Components
Name Memory
Symbol
Remarks A byte addressable memory.

Memory components have no inputs.  Their output can be connected only to IF, Memory Interface, and Block Device Controller components.

The width of the component is the default unit of transfer. Other transfer sizes are possible using the Memory Interface component.

All transfers involve consecutive bytes starting at the specified address and moving to higher addresses. When set to big endian, the address names the highest-order byte of the transfer; when set to little endian, the address names the lowest-order byte.

Memory contents can be initialized from files, as described below.

Memory File Formats SMOK can initialize the contents of a Memory component from files in two formats:

Cebollita Executables

    The Cebollita toolkit provides a compiler, an assembler, and a linker that can be used to build executable image files for the Cebollita architecture. SMOK Memory components are capable of reading these files to initialize the contents of memory.

ASCII (.smokmem) Files

    SMOK also provides a generic, ASCII file format that can be loaded into Memory components. An example file is here. By convention, these files have extent .smokmem.

    Each .smokmem file contains one or more segment content definitions. Each such definition begins with @<addr>, and is followed by a list of <value>'s, each a hex integer. The <value>'s are loaded into consective words of memory starting at <addr>. (<addr> may be given in decimal or hex; if it is ambiguous, it is taken to be in decimal.) The number of bytes in each <value> should match the width of the memory component; longer <value>'s are truncated, and shorter ones padded with zeroes. When set to big endian, each <value> specifies consecutively higher byte address contents from left to right; when set to little endian consecutive bytes are read right to left on each line of the file.

    Comments are allowed in .smokmem files. Comments begin with the character '#' and continue through the end of the line. Comments are allowed anywhere whitespace is legal.

User-Settable Attributes
  • Name
  • Width - 1 to 4 bytes
  • Size - in kilobytes (from 1KB to 16MB).
  • Endianness - Big or little (default).
  • File Association - the file from which contents have been loaded, and will be reloaded if the model is reinitialized.