forked from Github_Repos/cvw
		
	Merge branch 'main' of https://github.com/davidharrishmc/riscv-wally into main
This commit is contained in:
		
						commit
						91f6858de7
					
				| @ -9,27 +9,37 @@ | ||||
| ################################## | ||||
| 
 | ||||
| # edit this line to add more configurations | ||||
| confignames = ["rv32ic", "rv64ic"] | ||||
| confignames = ["rv32ic", "rv64ic", "busybear"] | ||||
| 
 | ||||
| import multiprocessing, os | ||||
| 
 | ||||
| fail = 0 | ||||
| 
 | ||||
| def search_log_for_text(text, logfile): | ||||
|     """Search through the given log file for text, returning True if it is found or False if it is not""" | ||||
|     grepcmd = "grep -e '%s' '%s' > /dev/null" % (text, logfile) | ||||
|     return os.system(grepcmd) == 0 | ||||
| 
 | ||||
| def test_config(config, print_res=True): | ||||
|   """Run the given config, and return 0 if it suceeds and 1 if it fails""" | ||||
|   logname = "wally_"+config+".log" | ||||
|   cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch-parallel.do ../config/" + config + " " + config + "\n!\n" | ||||
|   os.system(cmd) | ||||
| 
 | ||||
|   # check for success.  grep returns 0 if found, 1 if not found | ||||
|   cmd = "grep 'All tests ran without failures' " + logname + "> /dev/null" | ||||
|   grepval = os.system(cmd) | ||||
|   if (grepval): | ||||
|     if print_res:print(logname+": failures detected") | ||||
|     return 1 | ||||
|   if config == "busybear": | ||||
|     cmd = "echo 'quit' | vsim -do wally-busybear.do -c >" + logname | ||||
|     os.system(cmd) | ||||
|     # check for success.  grep returns 0 if found, 1 if not found | ||||
|     passed = search_log_for_text("no more .* to read", logname) | ||||
|   else: | ||||
|     cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch-parallel.do ../config/" + config + " " + config + "\n!\n" | ||||
|     os.system(cmd) | ||||
|     # check for success.  grep returns 0 if found, 1 if not found | ||||
|     passed = search_log_for_text("All tests ran without failures", logname) | ||||
|   if passed: | ||||
|     if print_res:print(logname+": Success") | ||||
|     return 0 | ||||
|   else: | ||||
|     if print_res:print(logname+": failures detected") | ||||
|     return 1 | ||||
| 
 | ||||
| 
 | ||||
| pool = multiprocessing.Pool(min(len(confignames), 12)) | ||||
| fail = sum(pool.map(test_config, confignames)) | ||||
|  | ||||
| @ -42,8 +42,6 @@ module extend ( | ||||
|       3'b011:   ExtImmD = {{(`XLEN-20){InstrD[31]}}, InstrD[19:12], InstrD[20], InstrD[30:21], 1'b0};  | ||||
|                // U-type (lui, auipc)
 | ||||
|       3'b100:  ExtImmD = {{(`XLEN-31){InstrD[31]}}, InstrD[30:12], 12'b0};  | ||||
|       /* verilator lint_off WIDTH */ | ||||
|       default: ExtImmD = 'bx; // undefined
 | ||||
|       /* verilator lint_on WIDTH */ | ||||
|       default: ExtImmD = {(`XLEN-1){1'bx}}; // undefined
 | ||||
|     endcase              | ||||
| endmodule | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user