Text-Based Shortcuts

A more direct route through the workflow.

Explore textual shortcut methods. Preserve exact commands and file conventions as you use them.

Building and Running Simulations Textually (Without the GUI)

Once you are familiar with the basic functions of CSIM, some find it easier to build and run models by typing a few simple commands, rather than hunting for functions on menus in the GUI. This option is also convenient for script-driven builds.

Below are listings for the corresponding commands for building and running each of the demonstration examples from a terminal window.


Demo 0 - Pitcher Catcher

Build:
csim   test.sim

Run:
sim.exe

See, it's pretty easy. The first step above builds the simulation. You will see the diagnostic message directly in your terminal window. The second step invokes the simulation. You will see the normal graphical simulation control panel come up. You can then run the simulation as normally, by pressing the Run button.

Alternatively, you can also run the simulation purely textually, without the graphical control panel. Do this as follows:

Build:
csim   -nongraphical   test.sim

Run:
sim.exe

A simulation prompt will appear in your test-window.   *Sim>*  
At the simulation prompt, type:   *run*   or just

r for short. Example:

run

You will see all the textual output from your simulation,   
and it will produce any data files it normally would, as   
summarized when it finishes. When the simulation finishes,   
the simulation prompt will reappear. You may exit the   
simulation by typing *quit* or *q* for short.

quit


Demo 1 - Architecture/DFG Model

Build:

csim   arch4.sim

sim.exe   -net

router   netinfo

sched   -e   hiclass4.dfg   netinfo

Run:
sim.exe

The first set of steps above builds the simulation, generates the netinfo file, runs the ROUTER on the netinfo and runs the SCHEDULER on the DFG file. The Run step invokes the simulation. You will see the normal graphical simulation control panel come up. You can then run the simulation as normally, by pressing the Run button.

Alternatively, you can also run the simulation purely textually, without the graphical control panel. Do this by modifying the first step as follows:

csim   -nongraphical   arch4.sim

The rest of the process remains the same. See Demo-0 above for how to run a textual simulation. You will see all the textual output from your simulation, and it will produce all the data files it normally would, as summarized when it finishes.

When the simulation finishes, and you have exited from the simulation, you should look at the summaries.dat file.

more   summaries.dat
This file shows the resulting utilizations of each processor and bus during the simulation. It also would show diagnostic information if there were any problems or deadlocks during the simulation.

You may now also view the time-line graphs of processing activities by invoking xgraph on the ProcTline.dat file.

xgraph   -sann   ProcTline.dat &

You can overlay the communication spider-webs by:

xgraph -sann     Spider.dat   ProcTline.dat &


Demo 2 - Algorithm Model

Build:
csim   demo2.sim

Run:
sim.exe

The first step above builds the simulation. You will see the diagnostic message directly in your terminal window. The second step invokes the simulation. You will see the normal graphical simulation control panel come up. You can then run the simulation as normally, by pressing the Run button.


Demo 3 - Architecture/DFG Model

Build:

csim   demo3.sim

sim.exe   -net

router   netinfo

sched   -e   demo3.dfg   netinfo

Run:
sim.exe

See Demo 1 above for further information about running the simulation and viewing the results.

Demo 3 contains three alternate data Flow Graphs (DFG's):

  • demo3.dfg
  • demo3b.dfg
  • demo3c.dfg

To try a different DFG, you need only re-run the SCHEDULER, because the hardware architecture has not changed.
Example:
sched   -e   demo3b.dfg   netinfo

sim.exe


Demo 4 - Architecture/DFG Model

Build:

csim   arch.sim

sim.exe   -net

router   netinfo

sched   -e   app1.dfg   netinfo

Run:
sim.exe

See Demo 1 above for further information about running the simulation and viewing the results.


ret

This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.