The changes (components and connections) that need to be made in the basic pipeline has been highlighted using the magenta color.
|
I will highlight the changes in magenta.
|
Define ID clk IR_ID[15..0] PC[15..0] src1[15..0] src2[15..0] src3[15..0] |
src1_sel[0..3] src2_sel[0..3] src3_sel[0..3]
PC1[15..0] A[15..0] B[15..0] IR_Const[15..0] D[15..0]
bcc1 bcc0 BraDest[15..0];
.....
Endef;
|
|
Define MEM clk IR_MEM[15..0] src1[15..0] src2[15..0] src3[15..0] |
MemRq Read ALUout[15..0] DMAR[15..0] SMDR[15..0];
.....
Endef;
|
Just delete the circuits that makes the "bcc1" and "bcc0" signals from the "Basic Pipe MEM stage" circuit.
Define Stall_EX MEM_Stall IR_ID[15..0] IR_EX[15..0] IR_MEM[15..0] | stall ;
....
Endef;
|
(IR_MEM.LoadBit == 1)
AND
(IR_EX.BranchBit == 0)
AND
( IR_EX.Src1 == IR_MEM.Dest OR IR_EX.Src2 == IR_MEM.Dest )
|
The reason why is given in this webpage: click here
|
Define DataForwRegs clk RegID[2..0] ALUout[15..0] |
Tag1[2..0] Value1[15..0] Tag2[2..0] Value2[15..0];
....
Endef;
|
Use a number of these to build up the actual data forwarding circuits
|
Define GP_DataForwCircuit RegID[2..0] Tag[2..0] Value[15..0] In[15..0] |
Out[15..0];
....
Endef;
|
|
|
|
This circuit consists of the circuit inside the yellow boundary:
|
|
Define AdvPipe clk reset DatabusIn[15..0] |
PC[15..0] N Z branch
MemRq Read AddrBusOut[15..0] DataBusOut[15..0]
Stall_IF Stall_ID Stall_EX Stall_MEM
IR_ID[15..0] IR_EX[15..0] IR_MEM[15..0] IR_WR[15..0]
Reg0[15..0] Reg1[15..0] Reg2[15..0] Reg3[15..0]
Reg4[15..0] Reg5[15..0] Reg6[15..0] Reg7[15..0]
IF_PC[15..0] IF_IF_Out[15..0]
ID_PC1[15..0] ID_A[15..0] ID_B[15..0] ID_Const[15..0] ID_D[15..0]
EX_Op1[15..0] EX_Op2[15..0]
EX_ALUout[15..0] EX_DMAR[15..0] EX_SMDR[15..0]
MEM_ALUout[15..0] MEM_LMDR[15..0]
WR_C_Enable WR_RegSel[2..0] WR_CBus[15..0]
Endef;
|