[Simh] Single stepping.

Richard Cornwell rich at sky-visions.com
Sun Jan 29 19:43:14 EST 2017


Hi Mark,

> On Sunday, January 29, 2017 at 12:50 PM, Richard Cornwell wrote:
> >   How is single stepping implemented from the point of view of the
> >   simulator?  
> 
> Well, as long as you're managing decrements to sim_interval to
> reflect instructions executed, and you call sim_process_event when
> the sim_interval value is <= 0 and return from sim_instr() when
> sim_process_event () returns anything else but SCPE_OK, then it just
> works.
> 
> Under the covers SCP has a fake unit which it schedules for the
> specified STEP count (default of 1) when you enter a STEP command at
> the sim> prompt.  That unit's service routine then gets dispatched to
> when the step count expires and it does nothing but return SCPE_STEP
> which should cause your above mentioned sim_process_event loop to
> return from sim_instr().
> 
> Make sense?

  That is what I thought. Now sim_interval for me counts memory cycles,
  since instructions are variable length. However I have noticed that
  "step" by itself does not always execute one instruction. I wonder if
  maybe we should look at how single stepping is implemented and
  perhaps pass an argument to sim_instr() to indicate that a number of
  steps is desired. One of the issues is that on machines like the KA10
  and I7090 interrupts execute an instruction out of sequence. Not sure
  if that should be counted as a step or not.
 
> >   Also I got some stuff to put up on the sims. Should I just do a
> > pull request, or open an issue?  
> 
> What stuff?

  I have done some changes to sim_card.[ch] and I have added an
  architecture description to B5500_cpu. 

Rich

-- 
==========================================================================
Richard Cornwell
rich at sky-visions.com
http://sky-visions.com
LinkedIn:   https://www.linkedin.com/in/richard-cornwell-991076107
==========================================================================



More information about the Simh mailing list