| 1 |
This directory provides an example of how "black box" subcircuits work. |
| 2 |
The more involved example is in dll.c and is a dll simulation. |
| 3 |
To see what it does make irsim.user and then run it on |
| 4 |
dll.sim with dll.cmd. The edges of the two clocks should be aligned |
| 5 |
by the end of the simulation and the updn signal should be switching. |
| 6 |
|
| 7 |
The subcircuit is called by: |
| 8 |
|
| 9 |
x upDn inClk outClk outClk1 dll |
| 10 |
|
| 11 |
it means call the subcircuit dll (defined in dll.c) with inputs |
| 12 |
(upDn, inClk, outClk) and output (ouClk1). |
| 13 |
|
| 14 |
To create and compile a new subcircuit library, replace "user.c" in |
| 15 |
the Makefile with the source file containing the library initialization |
| 16 |
and evaluation routines. The files "dll.c" and "flop_mux.c" are provided |
| 17 |
as examples. |
| 18 |
|
| 19 |
Some caveats: |
| 20 |
1. The output delay is always specified in picoseconds. |
| 21 |
2. You might have to change the MAXARGS in sim.c to if you have way too many IO's. |
| 22 |
3. The code in this directory is deprecated and has been replaced by the |
| 23 |
example code in directory "tclsubckt", which allows subcircuit libraries to |
| 24 |
be compiled and loaded independently of irsim. |