Line 90... |
Line 90... |
ftest.write(" if (dut.reg_file_.b2v_latch_" + reg + "_lo.latch!==8'h" + hex[2:] + ") $fdisplay(f,\"* Reg " + reg + " " + reg[1] + "=%h !=" + hex[2:] + "\",dut.reg_file_.b2v_latch_" + reg + "_lo.latch);\n")
|
ftest.write(" if (dut.reg_file_.b2v_latch_" + reg + "_lo.latch!==8'h" + hex[2:] + ") $fdisplay(f,\"* Reg " + reg + " " + reg[1] + "=%h !=" + hex[2:] + "\",dut.reg_file_.b2v_latch_" + reg + "_lo.latch);\n")
|
ftest.write(" if (dut.reg_file_.b2v_latch_" + reg + "_hi.latch!==8'h" + hex[0:2] + ") $fdisplay(f,\"* Reg " + reg + " " + reg[0] + "=%h !=" + hex[0:2] + "\",dut.reg_file_.b2v_latch_" + reg + "_hi.latch);\n")
|
ftest.write(" if (dut.reg_file_.b2v_latch_" + reg + "_hi.latch!==8'h" + hex[0:2] + ") $fdisplay(f,\"* Reg " + reg + " " + reg[0] + "=%h !=" + hex[0:2] + "\",dut.reg_file_.b2v_latch_" + reg + "_hi.latch);\n")
|
|
|
#---------------------------- START -----------------------------------
|
#---------------------------- START -----------------------------------
|
# Create a file that should be included in the test_fuse source
|
# Create a file that should be included in the test_fuse source
|
ftest = open('test_fuse.i', 'w')
|
ftest = open('test_fuse.vh', 'w')
|
ftest.write("// Automatically generated by genfuse.py\n\n")
|
ftest.write("// Automatically generated by genfuse.py\n\n")
|
|
|
# Initial pre-test state is reset and control signals asserted
|
# Initial pre-test state is reset and control signals asserted
|
ftest.write("force dut.reg_file_.reg_gp_we=0;\n")
|
ftest.write("force dut.reg_file_.reg_gp_we=0;\n")
|
ftest.write("force dut.reg_control_.ctl_reg_sys_we=0;\n")
|
ftest.write("force dut.reg_control_.ctl_reg_sys_we=0;\n")
|
Line 280... |
Line 280... |
|
|
# Write out the total number of clocks that this set of tests takes to execute
|
# Write out the total number of clocks that this set of tests takes to execute
|
ftest.write("`define TOTAL_CLKS " + str(total_clks) + "\n")
|
ftest.write("`define TOTAL_CLKS " + str(total_clks) + "\n")
|
ftest.write("$fdisplay(f,\"=== Tests completed ===\");\n")
|
ftest.write("$fdisplay(f,\"=== Tests completed ===\");\n")
|
|
|
# Touch a file that includes 'test_fuse.i' to ensure it will recompile correctly
|
# Touch a file that includes 'test_fuse.vh' to ensure it will recompile correctly
|
os.utime("test_fuse.sv", None)
|
os.utime("test_fuse.sv", None)
|
|
|
No newline at end of file
|
No newline at end of file
|