home .. forth .. misc mail list archive ..

Re: Unidentified subject!


Dave Lowry:
   Could someone explain to me how instructions are sequenced?  Why is
   the nop *before* the +?  I would expect the sequence to go:
   + nop nop nop <instruction fetch>
   or:
   --- --- --- + <instruction fetch>

   So that nops are required *after* the +, or an instruction fetch to
   allow for carry prop.  Thanks.

The issue is setup time.

The MuP21 computes all arithmetic and logic results in parallel, all
the time.  [After all, the hardware is just going to sit there
anyways, why not let it do its work?]  The corresponding instructions
latch the proper result and (sometimes) shift the stack around.

The problem with + (and +n or whatever it's called -- the multiply
step) is that they are implemented using ripple carry.  So, after
modifying the TOS, it sometimes takes a few extra nanoseconds for the
carry to propagate through this result of adding TOS and 2nd from top.
So, if you do + too soon, you may get a result where carry hasn't
completed.

In principle, you might be able to get away with + without carry
propagation time (if you knew that carry would only have to propagate
7 bits or less).  A special case of this is -OR which is addition with
carry completely disabled (or, more properly, the processor grabs the
pre-carry result rather than the post-carry result).

Raul D. Miller