Example 4: Trying different speeds

Getting Started
...     Example 4: Trying different speeds

In this example you will see how the simulator operates at different speeds. Here speed means the amount of computation that takes place when the button is clicked once. You will also see how to use the Delay Mode to demonstrate the action of the simulator.

  1. Launch the simulator and from File | Assemble/Load IJVM program .... select examples/JAS-IJVM/add.jas. Load the program when it finishes assembling.
  2. Try it first at Prog Speed. This program adds 2 hexidecimal numbers. Run the program, and type the following into the Input Console:
    1234   	
    5678
    
    Note the echoing in the Output Console. When you are done, the Output Console should contain
     1234
    +5678
    ========
    000068AC
    
    You can enter another pair of numbers to sum in the Input Console. (Be sure to use capitals A ... F for the high-end hex digits.) Click when you are done.
  3. Now click Reset, and change the speed to IJVM Speed.
  4. Click the button several times, and note the highlighting of IJVM instructions in the Method Area. Each click executes a single IJVM instruction. You can also click the button to backup a step.
  5. Now select Delay On (another radio button) and click Reset and the Run button as in the previous step. Note that the sequence of microcode instructions used to interpret the current IJVM instruction is shown, and the data path is illustrated in the Architecture View (the leftmost window showing the registers and busses).
  6. Select Delay Off and Clock Speed, then and Run several steps. Each step shows the execution of one microinstruction. The Reverse button backs up one microinstruction. On the Menu Bar select Microstore | View Microstore. The Microstore Window will appear, and you can follow the execution of the microprogram while clicking Run. Try it with Delay On to see the subcycles illustrated as before.
  7. Finally, select Delay Off and SubClock Speed, then Reset and Run several steps. Each step is now a quarter cycle. works as you'd expect, but Delay On has no effect at this speed.