Skip to content

Oscar Software Framework Manual Stimuli Writer Module

scs edited this page Jul 16, 2012 · 3 revisions

Go to Table of Contents.

Table of Contents

Stimuli Writer Module (swr)

Description

The stimuli writer module is used to generate stimuli output files in conjunction with host simulation. It is normally not used directly in the application source code, but outputs are rather written over designated modules for the desired interface.

We distinguish the following terms:

  • writer: A writer instance is used per stimuli output file.
  • signal: A writer contains multiple signals instances.
The module provides functions to create the writer, to register signals and to update signal values. The module itself registers a callback function in the simulation module to be triggered every cycle. At this point in time the signal states are written to the stimuli file.

The stimuli output file has the following syntax:

! Time signa-1 signa-2 //descriptor
@ <time> <value> <value> //instruction

An example is given below:

! Time SigA SigB //descriptor
@ 0 1 1
@ 1 0 1
@ 2 1 0

Currently only boolean signals values are supported and the stimuli file dump is done every cycle.

The values reported @ time = 0 are the default values specified at signal registration.

The stimuli writer is used inside the framework to report GPIO activity from the logic module.

Target Hardware Resource

Not hardware resource related.

Dependencies

Usage

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

 SimInitialize // initialize simulation, print stimuli descriptor and @t=0 instruction with the default signal values
 
 for(ever)
 {
     ... doAlgorithm ...
     SwrUpdateSignal // update every signal if required
     
     SimStep // increment simulation time and print the stimuli instruction
 }
Clone this wiki locally