Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New vax - implementation :-)



Sorry for jumping in so late in this thread. I've been out a couple of days.

But first of all, this is very cool, Ragge. Nice!

Did you ever read the first issue of the DEC Technical Journal? It's all about the VAX-8600, in quite some detail, including the pipeline DEC did.

If you haven't read it, maybe you should. It might be inspirational, and maybe also give an idea or two to pick up.
(http://www.bitsavers.org/pdf/dec/dtj/dtj_v01-01_aug1985.pdf)

On 2021-07-03 15:13, Anders Magnusson wrote:
Hi,

Den 2021-07-03 kl. 14:50, skrev Rhialto:
On Sat 03 Jul 2021 at 13:14:46 +0200, Anders Magnusson wrote:
All of these steps are (mostly) independent of each other, therefore they
can easily be pipelined.
Until you get to instructions with modify a register in one operand and
use it again in another :) such as (ok I took those examples from the
PDP-11 architecture handbook in the section where it describes how
different models do different things; but for a VAX you'd have to be
careful too and with 6 operands the number of combinations is much worse)
Thought of this already :-)

The register value is modified in the ADDTO state, and at the same time saved in a "restore" register in case a page fault or something happens later on that requires rollback.  The restore register follows in the argument pipeline. If two (or more) arguments uses the same register there are two ways of dealing with it (I haven't decided which to use yet):
- Stall the pipeline one step to catch up with the new reg value
- Have a check whether the result from the parallell pipeline uses the same reg and directly fetch the result.

I am leaning on the first way of doing it, since it will be quite uncommon, and one pipe step is cheap.
E.g. instructions like ADDL3 (r0)+,(r0)+,(r0)+ are not especially common.

I think if you are going with pipelining, the more interesting problem happens when different instructions also depend on the results of each other. This is where it becomes more complex, and in the 8600 there appear to be both forward and backward dependencies that can cause pipeline stalls...

     ADD Rx,(Rx)+    ; Rx gets incremented or not before being
     ADD Rx,@-(Rx)    ;   used as a source operand
     MOV PC,offset(Rx)    ; value of PC either before or after fetching
            ;   offset from the instruction stream
     JMP (Rx)+        ; Rx gets incremented or not before being
            ;   copied to PC

and JMP is weird because it's more like a LEA arg,PC, if there were a
Load Effective Address instruction.

[...]
These examples are interesting and ambiguous on the PDP-11. On the VAX, I believe that the behavior is well defined. So it's just a question of implementing them the way they are defined to behave.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index