Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Jeff Campbell <jcampbell@ins-msi.com>
Subject: Re: TS10 Emulator - a bug had been found!
Date: Fri, 08 Feb 2002 02:45:12 GMT	[thread overview]
Message-ID: <3C633298.777E71E5@ins-msi.com> (raw)
In-Reply-To: u665tft26623c2@corp.supernews.com

sword7@speakeasy.org wrote:
> 
> Good News!!  Well, I found a serious bug in TS10 emulator that cause the
> OpenVMS stalled after RQDX3 initialization.  I found that by using two
> log files from Simh and TS10 emulators and comparing difference between
> them.  I fixed it in my RQDX3 emulation (rq_PutDesc) to not put 1 on
> command interrupt unless commands slot is only one or previous
> command descriptor belongs to RQDX3 controller.  After it was fixed,
> OpenVMS now is trying read blocks from the Installation CD but stalled -
> another bug showed up! :-(

Assuming ring transition interrupts are enabled...

The command ring transition interrupt should occur only when the command
ring is full - the port owns all the slots - and the port has removed
(processed) one of the entries. The interrupt tells the host that
another
command may be issued, assuming a) there is another command and b) there
are enough credits to allow the command to be posted to the port.

A ring sized at 32 slots needs to have 32 MSCP commands pending
before the port will generate the command ring transition interrupt. It
will not generate an interrupt when removing one command from the ring
if ring did not also have 31 other commands pending.

A "ring" sized with 1 slot should always generate a transition
interrupt as each posted command is processed.

The logic is: the ring has gone from full to not full.

The receive transition interrupt scheme works the other way: an
interrupt will be generated when the receive ring goes from empty
to not empty. That is, the port has posted a response to the host.

The command and receive rings are circular FIFO queues. Your emulation
code needs to keep track of where the next expected command will be
and where the next response needs to go. This is done by honoring
the ownership bit in each ring entry. After initialization, the host
owns all the command ring entries: the ownership bit in each of the
command ring entries is a zero. The port owns all the response ring
entries: the ownership bit in each entry is a one.

> 
> I quickly found another bug when I debugged disassembled traces from
> my debug.log.  REMQUE tried to dequeue entry but queue already is empty
> during MSCP read routine.  I searched for cause by using two logs from
> Simh and TS10 emulators and found a cause between sequence initialization
> step 1 and step 2.  On Simh, OpenVMS enqueued read access requests
> by using INSQUE instruction during MSCP initialization step #1 but it
> never happened in my debug.log from TS10 emulator.  There was long
> execution between step #1 and step #2 - estimated 300,000 lines!  I
> am narrowing down between step #1 and step #2 to find specific
> area that has a bug.
> 
> Yes, after a bug was fixed, OpenVMS got slightly further due to another
> bug.  Whew.
> 
> That's why debuggers and programmers are blind without their source codes.
> With source codes, bugs can be find much easilier. :-(
> 
> -- Tim Stark
> 
> --
> Timothy Stark   <><     Inet: sword7@speakeasy.org
> --------------------------------------------------------------------------
> "For God so loved the world, that he gave his only begotten Son, that
> whosoever believeth in him should not perish, but have everlasting life.
> Amen." -- John 3:16 (King James Version Bible)

Jeff Campbell
n8wxs@arrl.net


  reply	other threads:[~2002-02-08  2:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-07  0:33 TS10 Emulator Updates (KA655) sword7
2002-02-08  0:11 ` TS10 Emulator - a bug had been found! sword7
2002-02-08  2:45   ` Jeff Campbell [this message]
2002-02-08 13:48     ` sword7
2002-02-08 20:48       ` Jeff Campbell
2002-02-08 21:28         ` TS10 Emulator - A PROBEx bug found!!! sword7
2002-02-08 23:36           ` Jeff Campbell
2002-02-09  3:58           ` Zane H. Healy
2002-02-09  5:28             ` sword7
2002-02-10  5:58             ` sword7
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox