Skip to content

Commit

Permalink
No need for padding in control Sm
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-g committed Sep 5, 2015
1 parent f38fc5a commit 79f19fa
Showing 1 changed file with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ private enum Mode {
ReadingLength,
OutputtingCommands,
Done,
Padding,
}

private final DFEsmStateEnum<Mode> mode;

private final DFEsmPullInput iLength;
private final DFEsmStateValue iLengthReady;
private final DFEsmPushOutput oReadMask, oReadEnable, oRowFinished, oRowLength, oNnzCounter, oFirstReadPosition;
private final DFEsmInput vectorLoadCycles, nRows, nPartitions, paddingCycles;
private final DFEsmInput vectorLoadCycles, nRows, nPartitions;

private final DFEsmPushOutput oVectorLoad;
private final DFEsmStateValue outValid;
Expand All @@ -46,7 +45,6 @@ public ParallelCsrReadControl(DFEManager owner, int inputWidth, boolean dbg) {
vectorLoadCycles = io.scalarInput("vectorLoadCycles", dfeUInt(32));
nRows = io.scalarInput("nrows", dfeUInt(32));
nPartitions = io.scalarInput("nPartitions", dfeUInt(32));
paddingCycles = io.scalarInput("paddingCycles", dfeUInt(32));

oReadMask = io.pushOutput("readmask", dfeUInt(inputWidth), 1);
oReadEnable = io.pushOutput("readenable", dfeBool(), 1);
Expand Down Expand Up @@ -98,12 +96,7 @@ void processRow() {
mode.next <== Mode.VectorLoad;
partitionsProcessed.next <== partitionsProcessed + 1;
IF (partitionsProcessed === nPartitions - 1) {
IF (paddingCycles !== 0) {
mode.next <== Mode.Padding;
paddedOutputs.next <== 0;
} ELSE {
mode.next <== Mode.Done;
}
mode.next <== Mode.Done;
}
} ELSE {
mode.next <== Mode.ReadingLength;
Expand All @@ -118,16 +111,6 @@ protected void nextState() {
iLengthReady.next <== iLengthReady();

SWITCH (mode) {
CASE (Mode.Padding) {
IF (outputNotStall()) {
debug.simPrintf("OUTPUT PADDING\n");
paddedOutputs.next <== paddedOutputs + 1;
makeOutput(fls(), fls(), zero(inputWidth), zero(), zeroI(), crtPos, fls());
IF (paddedOutputs === paddingCycles - 1) {
mode.next <== Mode.Done;
}
}
}
CASE (Mode.Done) {
// do nothing
}
Expand Down

0 comments on commit 79f19fa

Please sign in to comment.