Skip to content

Commit

Permalink
More cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-g committed Sep 3, 2015
1 parent 3dc6a07 commit e4877b7
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit e4877b7

Please sign in to comment.