CPE 315
Prof. Stearns
SIM Bugs and Gotchas
- No X Window Display
If your code compiles and builds without error but no display shows:
There are three problems that cause this symptom.
- Incorrect bus signal reference
If you reference a bus signal that doesn't exist: e.g.
Signal bus(4);
...
And (SD, (X,Y), bus[4]);
- Use Zero or One as an output
And (SD, (X,Y), Zero);
- Signal gets set from two sources (can even be Switches)
If you make this mistake in "real life", you will likely smoke your circuit.
SIM doesn't catch this problem (it should). To avoid the problem, ensure that every signal is asserted in one and only one place.
- RegisterFile Error
The RegisterFile geometry error is quite terse:
Error: RegisterFile
This means one or more of the inputs/outputs is the wrong size.
Ensure that
- All 3 address ports are 5 bit busses
- All 3 data ports are 32 bit busses
- Segmentation Fault
Known reasons for seg faults are:
- Nested modules
There are some problems with nesting modules, especially with the SDs.
Best advice: don't nest modules.
OK advice: always use the SD(sd form for schematic descriptors
- Weird use of signal 1
A gate such as: And (X,1) compiles and doesn't cause any run-time errors.
But it doesn't work as intended and doesn't drive the And gate output.
Last updated 7/17//06