Skip to content

Commit

Permalink
Support more than 32 bits in readmask
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-g committed Aug 31, 2015
1 parent 7c91576 commit a6f06b8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ParallelCsrReadControl(DFEManager owner, int inputWidth, boolean dbg) {
mode = state.enumerated(Mode.class, Mode.ReadingLength);
iLength = io.pullInput("length", dfeUInt(32));

oReadMask = io.pushOutput("readmask", dfeUInt(32), 1);
oReadMask = io.pushOutput("readmask", dfeUInt(inputWidth), 1);
oReadEnable = io.pushOutput("readenable", dfeUInt(32), 1);
oRowFinished = io.pushOutput("rowFinished", dfeUInt(32), 1);
oRowLength = io.pushOutput("rowLength", dfeUInt(32), 1);
Expand All @@ -55,7 +55,7 @@ public ParallelCsrReadControl(DFEManager owner, int inputWidth, boolean dbg) {
rowFinishedData = state.value(dfeUInt(32), true);
rowLengthData = state.value(dfeUInt(32), 0);
readMaskOutValid = state.value(dfeBool(), false);
readMaskData = state.value(dfeUInt(32));
readMaskData = state.value(dfeUInt(inputWidth));
iLengthReady = state.value(dfeBool(), false);
}

Expand Down Expand Up @@ -125,7 +125,7 @@ protected void nextState() {

for (int i = 0; i <= inputWidth; i++)
IF (crtPos === i)
readMaskData.next <== pattern.shiftLeft(i).cast(dfeUInt(32));
readMaskData.next <== pattern.shiftLeft(i).cast(dfeUInt(inputWidth));

// crtPos = (crtPos + canread ) % inputWidth;
IF (crtPos + canread >= inputWidth) {
Expand Down

0 comments on commit a6f06b8

Please sign in to comment.