Skip to content

Oscar Software Framework Manual Stimuli Reader Module

scs edited this page Jul 16, 2012 · 3 revisions

Go to Table of Contents.

Table of Contents

Stimuli Reader Module (srd)

Description

The stimuli reader module is used to apply stimuli input files in conjunction with host simulation. It is normally not used directly in the application source code, but inputs are rather read over designated modules for the desired interface.

We distinguish the following terms:

  • reader: A reader instance is used per stimuli input file.
  • signal: A reader contains multiple signals instances.
The module provides functions to create the reader, to register signals and to get updated signal values. The module itself registers a callback function to the simulation module to be triggered every cycle. In the callback, the next stimuli line is eventually parsed. The user of this module has to register a cycle callback too, in order to request the current signal state.

The stimuli input file has following syntax:

! Time name-2 name-1 //descriptor
@ time value value //instruction

A example is given below:

! Time SigA SigB
@ 0 1 1
@ 30 0 1
@ 34 1 0

Currently only boolean signals values are supported. Some time stamps may be left out in the stimuli input file (sparse coding).

The stimuli reader is used inside the framework to emulate GPIO input activity for the logic module.

Target Hardware Resource

Not hardware resource related.

Dependencies

Usage

The pseudo code shows the order of functions issues for stimuli reader usage.

 SimInitialize // initialize simulation, read stimuli descriptor and @t=0 instruction with the default signal values
 
 for (ever)
 {
     ... doAlgorithm ...
     SimStep // increment simulation time and print the stimuli instuction
 }
 
 callbackFunction // The callback function has to request the current signal states
 {
     SrdGetUpdateSignal
 }
Clone this wiki locally