CPU Speed

      1 Comment on CPU Speed

Ran into some timing issues where output sent to the terminal from an assembled program never made it unless I stopped the simulator and then resumed execution. Finally figured out that the SPED parameter in the INFO table actually matters.

The problem is due to the incredible speed of modern computers. A Point-4 computer executed about 2,500 instructions per millisecond. If you run a simH Nova at full speed, it can easily run 48,000 instructions per millisecond. That blows all of REX’s timing out of the water.

The solution is to slow down the simH program and set an accurate number for the SPED parameter (location 601 in CONFIG). Fortunately, there is a command to control simH speed. The following command will limit Nova instructions to about 12,000 instructions per millisecond. The accompanying CONFIG setting matches that setting.

sim> SET THROTTLE 12M   ; 12 million per second == 12,000 per ms
601: 30000 ; 12k decimal

An IPL is needed to make that effective.

You can also test the actual result with a program that can be found in the Downloads area under ASM Source Files. The program SPED measures how many instructions are executed in 1/10 of a second and then calculates what the SPED parameter SHOULD be. (If you do not get any output, it may be due to poor time settings.)

The THROTTLE command can then be added to your *.sim file so it gets set with every use.

One final note. While it would be nice to set SPED to the octal equivalent of 48,000 instructions per millisecond, it has a side effect. Turns out that the 100000 bit of SPED tells REX that you are running a Nova 3 computer, and it modifies some code internally for that during the IPL. So SPED must be kept under 77777 (32767 decimal) for most emulations.

Here are a few equivalent values. You will need to see what works on your computer. If you try to set the throttle higher than what the simulator thinks is possible, it will give you an error and disable throttling. If you set it too low, everything will slow down perceptively in IRIS. For a little fun, SET THROTTLE 2M. Then resume IRIS and run a full LIBR.

   8M             20000
  12M             30000
  16M             40000
  20M             50000
  24M             60000
  28M             70000

With my laptop and the latest release of the Nova simH, I was getting occasional errors from simH at 16M. So I’m running now at 12M.

1 thought on “CPU Speed

Leave a Reply