SIM block, simulated again
Behavioural VHDL from SIM23049.VHD, Kongsberg College of Engineering, 23 April 1992, run with its own
testbench in GHDL. Stimulus as written in 1992: RTR = 82 (hex 52), TF = 1, TBSY = 16,
AE = 1, reset released at 16 ns, ST raised at 50 ns, 38 µs of simulated time.
The whole run
The controller starts once and then repeats by itself because AE is set. Each round is one 6.4 µs
STI pulse followed by a 0.4 µs pause. The counter steps 2, 3, 4, 5 and goes back to 2, which are the low and
high halves of RTR; ATF is always the counter plus 7. BSY is a 3.2 µs pulse at the start of each round.
Start-up, the first 900 ns
Everything is unknown until the testbench drives its inputs at 2 ns. Reset (MRB low) puts the controller in S0.
ST then sends it to S1, where it waits for STI; that comes one CLKSIM period later because
TF is 1. It then runs S2, S4, S5, S7: compare, step the counter, wait for STI to fall.
Between two rounds, 6.9 to 7.9 µs
STI falls after 16 CLKSIM periods, the controller leaves S7 for S1, and the next round begins.
NEWTF is high while the controller waits in S7.
The wrap-around, 14.1 to 14.6 and 21.0 to 21.5 µs
When the counter reaches 5 it equals the high half of RTR, so KOMP goes high. On the next round the
controller takes S6 instead of S5 and reloads the counter with 2.
What had to change to run it
The 1992 file is untouched; prepare.py makes a working copy with these edits. None of them alters how the block behaves.
| 3ns → 3 ns | Today a space is required between the number and the unit. |
| NUMBER_TO_FVL | Assigned to its own input signal. Now uses a local copy. Not called by SIM. |
| FVL_TO_NUMBER | Declared to take a signal but was handed a variable in MASK. Not called by SIM. |
| generic DEL | The testbench component had no value for it; given the entity's default of 2 ns. |
| configuration | use entity SIM(BEHAVE) needs the library name: work.SIM(BEHAVE). |
| --std=08 | The block reads its own output STI, which the language only allowed from 2008. |
| logger | A process added inside the block writes every signal change to a text file, which this page is drawn from. |