General Description: How do you simulate a bus to count up or down? If you have an eight bit bus, how to make it go 00 01 02 etc.
解决方案
The easiest way to do this is with a simulation script. Create a script from the simulator, and choose to use the Wizard. Add your buses as vectors, naming them anything you wish. Then, under the Stimulated and Watched Signals Screen, click Browse, and click beside each of the individual signals in the bus you want to stimulate. Then, one by one, click on the the bit, then under Stimulator Type choose Binary Counter, and in the Value field type the index number of the signal in the bus. The relevant portion should look something like this:
| Watched Signals and Vectors | | Define your signal and vector watch list here watch BUS_IN7 BUS_IN6 BUS_IN5 BUS_IN4 BUS_IN3 watch BUS_IN2 BUS_IN1 BUS_IN0
| Stimulators Assignment | | Select and/or define your own stimulators | and assign them to the selected signals set_stim B7 BUS_IN7 set_stim B6 BUS_IN6 set_stim B5 BUS_IN5 set_stim B4 BUS_IN4 set_stim B3 BUS_IN3 set_stim B2 BUS_IN2 set_stim B1 BUS_IN1 set_stim B0 BUS_IN0
Then when you run the your script, you'll see your buses referenced by their vector names, and they'll perform as n-bit binary counters (8 bits in this case).