Just place this in right after the writes finish, look for the comment that starts this in the code. Replace everything cause i caught a bug.
//declare the expected values for the output eRobIndex <= 4'b0; eValueA <= 32'hffffffff; eValueB <= 32'haaaaaaaa; eFuncCode <= 3'b0; #(`half*2+1) if (full) $display ("After one value exits full flag doesn't go low"); if (robIndexDestOut0 != eRobIndex || valueAOut0 != eValueA || valueBOut0 != eValueB || funcCodeOut0 != eFuncCode ) $display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time, eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0); cdb <= {1'b1, 4'd2, 32'habababab}; eRobIndex <= 4'b0; eValueA <= 32'heeeeeeee; eValueB <= 32'habababab; eFuncCode <= 3'b0; #(`half*2+1) if (robIndexDestOut0 != eRobIndex || valueAOut0 != eValueA || valueBOut0 != eValueB || funcCodeOut0 != eFuncCode ) $display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time, eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0); cdb <= {1'b1, 4'd3, 32'hfaceface}; eRobIndex <= 4'b0; eValueA <= 32'hfaceface; eValueB <= 32'hfaceface; eFuncCode <= 3'b0; #(`half*2+1) if (robIndexDestOut0 != eRobIndex || valueAOut0 != eValueA || valueBOut0 != eValueB || funcCodeOut0 != eFuncCode ) $display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time, eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0); cdb <= {1'b1, 4'd1, 32'h12345678}; eRobIndex <= 4'b0; eValueA <= 32'h12345678; eValueB <= 32'hcccccccc; eFuncCode <= 3'b0; #(`half*2+1) if (robIndexDestOut0 != eRobIndex || valueAOut0 != eValueA || valueBOut0 != eValueB || funcCodeOut0 != eFuncCode ) $display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time, eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0); $display ("Basic tests completed");
Log in to post a comment.
Just place this in right after the writes finish, look for the comment that starts this in the code.
Replace everything cause i caught a bug.
//declare the expected values for the output
eRobIndex <= 4'b0;
eValueA <= 32'hffffffff;
eValueB <= 32'haaaaaaaa;
eFuncCode <= 3'b0;
#(`half*2+1)
if (full)
$display ("After one value exits full flag doesn't go low");
if (robIndexDestOut0 != eRobIndex ||
valueAOut0 != eValueA ||
valueBOut0 != eValueB ||
funcCodeOut0 != eFuncCode )
$display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time,
eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0);
cdb <= {1'b1, 4'd2, 32'habababab};
eRobIndex <= 4'b0;
eValueA <= 32'heeeeeeee;
eValueB <= 32'habababab;
eFuncCode <= 3'b0;
#(`half*2+1)
if (robIndexDestOut0 != eRobIndex ||
valueAOut0 != eValueA ||
valueBOut0 != eValueB ||
funcCodeOut0 != eFuncCode )
$display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time,
eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0);
cdb <= {1'b1, 4'd3, 32'hfaceface};
eRobIndex <= 4'b0;
eValueA <= 32'hfaceface;
eValueB <= 32'hfaceface;
eFuncCode <= 3'b0;
#(`half*2+1)
if (robIndexDestOut0 != eRobIndex ||
valueAOut0 != eValueA ||
valueBOut0 != eValueB ||
funcCodeOut0 != eFuncCode )
$display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time,
eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0);
cdb <= {1'b1, 4'd1, 32'h12345678};
eRobIndex <= 4'b0;
eValueA <= 32'h12345678;
eValueB <= 32'hcccccccc;
eFuncCode <= 3'b0;
#(`half*2+1)
if (robIndexDestOut0 != eRobIndex ||
valueAOut0 != eValueA ||
valueBOut0 != eValueB ||
funcCodeOut0 != eFuncCode )
$display ("Values coming unexpected: %t\n Index\tA\tB\tFunc\n %d\t%h\t%h\t%b\n %d\t%h\t%h\t%b\n", $time,
eRobIndex, eValueA, eValueB, eFuncCode, robIndexDestOut0, valueAOut0, valueBOut0, funcCodeOut0);
$display ("Basic tests completed");