From e4877b71f74586417c1ecbf02888c0356be97673 Mon Sep 17 00:00:00 2001 From: Paul Grigoras Date: Thu, 3 Sep 2015 15:45:46 +0100 Subject: [PATCH] More cleanups --- .../sparse/ParallelCsrReadControl.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/com/custom_computing_ic/dfe_snippets/sparse/ParallelCsrReadControl.java b/src/com/custom_computing_ic/dfe_snippets/sparse/ParallelCsrReadControl.java index e32d728..c687718 100644 --- a/src/com/custom_computing_ic/dfe_snippets/sparse/ParallelCsrReadControl.java +++ b/src/com/custom_computing_ic/dfe_snippets/sparse/ParallelCsrReadControl.java @@ -93,28 +93,25 @@ protected void nextState() { CASE (Mode.OutputtingCommands) { IF (outputNotStall()) { rowsProcessed.next <== rowsProcessed + 1; - outValid.next <== true; DFEsmValue canread = min(inputWidth - crtPos, toread); - readEnableData.next <== crtPos === 0; - cycleCounter.next <== cycleCounter + 1; - readMaskData.next <== buildReadMask(canread); - IF (crtPos + canread >= inputWidth) { crtPos.next <== 0; } ELSE { crtPos.next <== crtPos + canread; } - toread.next <== toread - canread; IF (toread - canread === 0) { iLengthRead.next <== true; - rowFinishedData.next <== true; mode.next <== Mode.ReadingLength; - } ELSE { - iLengthRead.next <== false; - rowFinishedData.next <== false; - } } + makeOutput( + crtPos === 0, + toread - canread === 0, + buildReadMask(canread), + rowLengthData, + cycleCounter + 1, + firstReadPosition); + } } } }