mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 10:15:19 +00:00
testbench now reads begin_signature addr from .objdump.addr instead of from tests.vh
This commit is contained in:
parent
4fbce9fc45
commit
23d524b439
@ -129,7 +129,7 @@ logic [3:0] dummy;
|
|||||||
end
|
end
|
||||||
|
|
||||||
string signame, memfilename, pathname, objdumpfilename, adrstr, outputfile;
|
string signame, memfilename, pathname, objdumpfilename, adrstr, outputfile;
|
||||||
integer outputFilePointer;
|
integer outputFilePointer, ProgramLabelMap, ProgramAddrMap;
|
||||||
|
|
||||||
logic [31:0] GPIOPinsIn, GPIOPinsOut, GPIOPinsEn;
|
logic [31:0] GPIOPinsIn, GPIOPinsOut, GPIOPinsEn;
|
||||||
logic UARTSin, UARTSout;
|
logic UARTSin, UARTSout;
|
||||||
@ -217,8 +217,27 @@ logic [3:0] dummy;
|
|||||||
// Termination condition (i.e. we finished running current test)
|
// Termination condition (i.e. we finished running current test)
|
||||||
if (DCacheFlushDone) begin
|
if (DCacheFlushDone) begin
|
||||||
// Gets the memory location of begin_signature
|
// Gets the memory location of begin_signature
|
||||||
testadr = (`RAM_BASE+tests[test+1].atohex())/(`XLEN/8);
|
adrstr = "0";
|
||||||
testadrNoBase = (tests[test+1].atohex())/(`XLEN/8);
|
ProgramLabelMap = $fopen(ProgramLabelMapFile, "r");
|
||||||
|
ProgramAddrMap = $fopen(ProgramAddrMapFile, "r");
|
||||||
|
while (!$feof(ProgramLabelMap)) begin
|
||||||
|
string addr, label;
|
||||||
|
integer returncode;
|
||||||
|
returncode = $fgets(label, ProgramLabelMap);
|
||||||
|
returncode = $fgets(addr, ProgramAddrMap);
|
||||||
|
if (label == "begin_signature\n") begin
|
||||||
|
adrstr = addr[4:7];
|
||||||
|
if (DEBUG) $display("adrstr: %s", adrstr);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (adrstr == "0") begin
|
||||||
|
$display("begin_signature addr not found in %s", ProgramLabelMapFile);
|
||||||
|
end
|
||||||
|
$fclose(ProgramLabelMap);
|
||||||
|
$fclose(ProgramAddrMap);
|
||||||
|
|
||||||
|
testadr = (`RAM_BASE+adrstr.atohex())/(`XLEN/8);
|
||||||
|
testadrNoBase = (adrstr.atohex())/(`XLEN/8);
|
||||||
#600; // give time for instructions in pipeline to finish
|
#600; // give time for instructions in pipeline to finish
|
||||||
if (TEST == "embench") begin
|
if (TEST == "embench") begin
|
||||||
// Writes contents of begin_signature to .sim.output file
|
// Writes contents of begin_signature to .sim.output file
|
||||||
@ -296,7 +315,8 @@ logic [3:0] dummy;
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
// move onto the next test, check to see if we're done
|
// move onto the next test, check to see if we're done
|
||||||
test = test + 2;
|
// test = test + 2;
|
||||||
|
test = test + 1;
|
||||||
if (test == tests.size()) begin
|
if (test == tests.size()) begin
|
||||||
if (totalerrors == 0) $display("SUCCESS! All tests ran without failures.");
|
if (totalerrors == 0) $display("SUCCESS! All tests ran without failures.");
|
||||||
else $display("FAIL: %d test programs had errors", totalerrors);
|
else $display("FAIL: %d test programs had errors", totalerrors);
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user