Visible to Intel only — GUID: hco1423077097412
Ixiasoft
Visible to Intel only — GUID: hco1423077097412
Ixiasoft
13.1.3. Bus Stimulus File Reader (Bus StimulusFileReader)
The BusStimulusFileReader block reads a stimulus file (.stm) and generates signals that match the BusStimulus block.
A bus stimulus file describes a sequence of transactions to occur over the processor interface, together with expected read back values. This block reads such files and produces outputs for each entry in the file.
Bus stimulus files automatically write to any blocks that have processor mapped registers when you simulate a design. Any design with useful register files generates a bus stimulus file that you can use to bring your design out of reset (all registers 0). You can also write your own bus stimulus files with the following format:
MemSpace Address WriteData WE ExpReadData Mask
or
MemSpace Address WriteData WE RE ExpReadData Mask
where:
MemSpace specifies the memory space (the format supports multiple memory spaces).
Address is the word address.
WriteData is the data to write if any.
WE performs a write when 1.
ExpReadData is the expected read data. The value that is read from a location is checked against this value to allow self checking tests.
Mask specifies when the expected read data is checked, only the bits in this mask are checked, to allows you to read, write, or check specified bits in a register.
RE performs a read when 1. If RE is not present, assume RE is 1 when WE is 0.
The mask also masks the written data and performs a read-update-write cycle if you write to certain bits (i.e. not overwrite all of them).
During simulation, any mismatch between the expected read data (as the bus stimulus file describes) and the incoming read data (as the BusStimulus block provides) highlights and DSP Builder issues a warning.
Parameter | Description |
---|---|
Enabled | Turn on to enable reading of the bus stimulus file data. You must turn on Has read enable in the BusStimulusFileReader block if you turn on Show read enable in the BusStimulus block. |
Stimulus File Name | Specifies the file from which to read bus stimulus data. |
Log File Name | Specifies the file to store a log of all attempted bus stimulus accesses. |
Space Width | Specifies the width of the memory space as described in the bus stimulus file—must be the same as the width specified in the DSP Builder > Avalon Interfaces > Avalon memory-mapped Agent menu. |
Addr Width | Specifies the width of the address space as described in the bus stimulus file—must be the same as the width specified in the DSP Builder > Avalon Interfaces > Avalon memory-mapped Agent menu. |
Data Width | Specifies the width of the data as described in the bus stimulus file—must be the same as the width specified in the DSP Builder > Avalon Interfaces > Avalon memory-mapped Agent menu. |
Sample Time | Specifies the Simulink sample time. |
Has read enable | Turn on to show read enable port. If you use the BusStimulusFileReader with the BusStimulus block in a design, ensure this parameter is turned on or turned off in both blocks. |
Signal | Direction | Type | Description |
---|---|---|---|
address | Output | Unsigned integer | Address from file. |
checkstrobe | Output | Boolean | Indicates when the readexpected and mask signals should be checked against readdata. |
endofstimulus | Output | Boolean | Generated signal to indicate when the end of the bus stimulus file is reached. |
read | Output | Boolean | Read signal from file. |
readdatavalid | Input | Boolean | Read data valid. |
readdata | Input | 16-bit or 32-bit unsigned integer | Read data. |
readexpected | Output | 16-bit or 32-bit unsigned integer | Expected read data from file. |
space | Output | Unsigned integer | Memory space from file. |
write | Output | Boolean | Write signal from file. |
writedata | Output | 16-bit or 32-bit unsigned integer | Data from file. |
mask | Output | 16-bit or 32-bit unsigned integer | Mask value from file. |