Commit a2cd2743 authored by Lauric Desauw's avatar Lauric Desauw
Browse files

Update to the cacheAndDiv version

parent 51ef5c83
Pipeline #85532 failed with stages
in 57 minutes and 47 seconds
......@@ -85,7 +85,8 @@ public :
}
void process(struct DCtoEx dctoEx, struct ExtoMem &extoMem, bool &stall)
bool process(struct DCtoEx dctoEx, ac_int<32, false> &result, bool &stall)
{
ac_int<1, false> f1Sign;
ac_int<1, false> f2Sign;
......@@ -270,12 +271,10 @@ public :
switch(dctoEx.opCode)
{
case RISCV_FLOAT_LW:
extoMem.isLongInstruction = 1;
localResult = dctoEx.lhs + dctoEx.rhs;
break;
case RISCV_FLOAT_SW:
extoMem.datac = dctoEx.datac;
localResult = dctoEx.lhs + dctoEx.rhs;
break;
......@@ -1007,11 +1006,12 @@ public :
extoMem.result = localResult;
result = localResult;
return true;
}
return false;
}
......
......@@ -587,8 +587,8 @@ void doCycle(struct Core &core, //Core containing all values
//declare temporary register file
ac_int<32, false> nextInst, multResult = 0;
ac_int<32, false> nextInst, multResult,floatResult = 0;
if (!localStall && !core.stallDm)
core.im->process(core.pc, WORD, LOAD, 0, nextInst, core.stallIm);
......@@ -604,7 +604,10 @@ void doCycle(struct Core &core, //Core containing all values
* Call of floating ALU
* Author : Lauric
*/
core.floatALU.process(core.dctoEx, extoMem_temp, core.stallAlu);
bool floatUsed = core.floatALU.process(core.dctoEx, floatResult, core.stallAlu);
if(floatUsed)
extoMem_temp.result = floatResult;
/********************************************************************************************/
memory(core.extoMem, memtoWB_temp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment