[Simh] SLowing up simh

Tim Riker Tim at Rikers.org
Wed Sep 28 19:05:44 EDT 2005


Sterling Garwood wrote:
> is there a way to slow down the simulation? I am running PDP11 
> simulations using RSTS and RT-11 and the simulator never seems to  drop
> into a real wait state (my real processor stays pegged out even  if
> nothing is going on in RT-11). Since I am running on Mac OS X on  an
> iBook I'd like to trade off simulation speed for battery life and  less
> heat. I have a 1.3 GHz laptop so a bit of a slow up of simh  wouldn't be
> too bad :-). My assumption is that either (or both) RSTS  and RT-11
> actually use a wait state.
> I looked at the code and thought about putting a nanosleep just  before
> IFetch but I thought I'd ask before I do that.

This has been discussed before, but nothing has yet been done.

I patched my local simh to use select on stdin before doing the read and
I have it wait in the select briefly. This works fairly well as simh
still respond immediately to a keypress. It does run significantly
slower though,

I assert that we could somehow watch for real tight loops in the
simulator and adjust the sleep times based on whether we are in one or
not. That way trivial loops in the hosted machine would result it more
cpu being given to the host. This would need some tweaking.

I would think we could at least start with a configurable wait time that
defaults to 0. This way the default behavior would mirror the current,
and folks that want to slow things down, could without having to patch
and recompile.

-- 
Tim Riker - http://Rikers.org/ - TimR at Debian.org
Embedded Linux Technologist - http://eLinux.org/
BZFlag maintainer - http://BZFlag.org/ - for fun!



More information about the Simh mailing list