Dynamic Scheduling Approach - Scoreboarding User's guide



Option

dlxsim -SCORE
[-al#] [-au#] [-dl#] [-du#] [-ml#] [-mu#]

[-SCORE] Execute the scoreboarding version of DLXsim.
[ -al# ] Select the latency for a floating point add (in clocks).
[ -au# ] Select the number of floating point add units.
[ -dl# ] Select the latency for a floating point divide.
[ -du# ] Select the number of floating point divide units.
[ -ml# ] Select the latency for a floating point multiply.
[ -mu# ] Select the number of floating point multiply units.

Command

Assembly file format

The assembler built into DLXsim, invoked using the load command, accepts standard format DLX assembly language programs. The file is expected to contain lines of the following form: While the assembler is processing an assembly file, the data and instructions it assembles are placed in memory based on either a text (code) or data pointer. Which pointer is used is selected not by the type of information, but by whether the most recent directive was .data or .text. The program initially loads into the text segment.
The assembler supports several directives which affect how it loads the DLX's memory. These should be entered in the place where you would normally place the instruction and its arguments. The directives currently supported by DLXsim are:
Components of scoreboard

                      SCOREBOARD         15 th clock cycle
  Instruction         Issue    Read opnds    Exe complete    Write Result  
+============================================================================+
    addi r1,r0,0x100    V           V              V               V  
    addi r2,r0,0x104    V           V              V               V  
       ld f6,0x0(r1)    V           V              V               V  
       ld f2,0x0(r2)    V           V              V               V  
      multf f0,f2,f4    V           V                                 
       subf f8,f6,f2    V           V                                 
      divf f10,f0,f6    V                                             
+============================================================================+

  FU no.  Name   Busy     Op     Fi    Fj    Fk    Qj    Qk    Rj   Rk  
+=======================================================================+
   1      int    NO    (null)                                             
   2      mul    YES    multf    f0    f2    f4    1            NO   NO   
   3      mul    NO    (null)                                             
   4      add    YES     subf    f8    f6    f2          1      NO   NO   
   5      div    YES     divf   f10    f0    f6    2            NO   YES  
+=======================================================================+

    F0  F2  F4  F6  F8  F10  F12  F14  F16  F18  F20  F22  F24  F26  F28  F30
+-----------------------------------------------------------------------------+
FU   2               4   5                                                  
+=============================================================================+
Functional unit status-Indicates the state of the functional unit (FU). There are nine fields for rach functional unit:
Busy-    Indicates whether the unit is busy or not
Op-      Operation to perform in the unit(e.g., add or subtract)
Fi- Destination regidter
Fj,Fk- Source-register nimbers
Qj,Qk- Number of the units producing source registersFj,Fk
Rj,Rk- Flags indicating when Fj,Fk are ready; fields are reset when new values are read so that the scoreboard knows that the source operand has been read(this is required to handle WAR hazards)

Check Hazard


Algorithm for scoreboarding
--------------------------------------------------------------------------
InstructionStatus      Wait until                    Bookkeeping
--------------------------------------------------------------------------
Issue              Not busy(FU)and not         Busy(FU)<-yes;Result(D)<-FU;
                   result(D)                   Op(FU)<-op; Fi(FU)<-D;
                                               Fj(FU)<-S1; Fk(FU)<-S2;
                                               Qj<-Result (S1); Qk<-Result(S2);
                                               Rj<-not Qj; Rk<- not Qk
--------------------------------------------------------------------------
Read operands      Rj and Rk                   Rj<- No; Rk<- No
--------------------------------------------------------------------------
Exe complete       Functional unit done
--------------------------------------------------------------------------
Write result       for all f(Fj(f)!=Fi(FU)     for all(if Qj(f)==FU
                   or Rj(f)==NO) &&                    then Rj(f)<-YES);
                   (Fk(f)!=Fi(FU) or           for all(if Qk(f)==FU
                   Rk(f)==NO))                         then Rk(f)<-YES);
                                               Result(Fi(FU))<-clear;
                                               Busy(FU)<-NO;
--------------------------------------------------------------------------
Required checks and bookkeeping actions for each step in instruction execution
FU stands for the functional unit used by the instruction, D is the destination register, S1 and S2 are the source regidters, and op is the operation to be done. To access the scoreboard entry named Fj for functional unit FU we use the notation Fj(FU). Result(D) is the value of the result register field for register D. The test on the write-result case prevents the write when there is a WAR hazard. For simplicity we assume that all of the bookkeeping operations are done in one clock cycle.


Example DLX code running on this simulator

Last updated: 1995.5.10