Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!keith From: keith@MIPS.com (Keith Garrett) Newsgroups: comp.sys.mips Subject: Re: R2000/3000 Pipeline Questions Message-ID: <2866@spim.mips.COM> Date: 1 May 91 04:17:50 GMT References: <8179@polstra.UUCP> Sender: news@mips.COM Organization: MIPS Computer Systems, Inc., Sunnyvale, CA Lines: 48 Nntp-Posting-Host: nobozos.mips.com In article <8179@polstra.UUCP> jdp@polstra.UUCP (John Polstra) writes: >I have a couple of arcane questions about the integer pipeline on the >MIPS R2000 and R3000. > >1. In the following sequence of instructions, is register $4 guaranteed >to end up with the value contained in memory location "bbb"? > > lw $4, aaa > lw $4, bbb yes > >2. In the following sequence of instructions, is register $4, guaranteed >to end up containing zero (regardless of what is contained in memory >location "aaa")? > > lw $4, aaa > move $4, $0 yes > >I notice in each case that the MIPS assembler does not insert a NOP >after the first load instruction. Note: these examples will seem less >stupid if you imagine that the first instruction is in the delay slot of >a conditional branch. the load delay only affects the availability of the data for the following instruction. the writes to the register file occur in order. lw $4, aaa IF RD ALU MEM WB lw $4, bbb IF RD ALU MEM WB move $4, $3 IF RD ALU MEM WB ^ ^ ^ ^ ^ ^ ^ | | | | | | | |address required for 1st load | | |data from 1st load available | | | |data from 1st load in register | |address required for 2nd load | | | | |data from 2nd load available | | | | | |data from 2nd load in register | | |data required for 3rd op | | | | |data from 3rd op available | | | | | | |data from 3rd op in register > >Thanks -- enquiring minds want to know . . . you're welcome. i hope this helps -- Keith Garrett "This is *MY* opinion, OBVIOUSLY" (408) 524-8110 Mips Computer Systems, 930 Arques Ave MS 1-02, Sunnyvale, Ca. 94088-3650 "Beware of the half-truth - you may have gotten hold of the wrong half." keith@mips.com -or- {ames,decwrl,prls}!mips!keith -Rabbi Seymour Essrog