mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Add 32 bit privileged tests
This commit is contained in:
		
							parent
							
								
									aa74b14314
								
							
						
					
					
						commit
						531423d7e1
					
				@ -342,7 +342,7 @@ module testbench();
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  string tests64p[] = '{
 | 
			
		||||
    "rv64p/WALLY-CAUSE", "3000",
 | 
			
		||||
    "rv64p/WALLY-MCAUSE", "3000",
 | 
			
		||||
    "rv64p/WALLY-EPC", "3000",
 | 
			
		||||
    "rv64p/WALLY-TVAL", "3000",
 | 
			
		||||
    "rv64p/WALLY-MARCHID", "4000",
 | 
			
		||||
@ -351,6 +351,16 @@ module testbench();
 | 
			
		||||
    "rv64p/WALLY-MVENDORID", "4000"
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  string tests32p[] = '{
 | 
			
		||||
    "rv32p/WALLY-MCAUSE", "3000",
 | 
			
		||||
    "rv32p/WALLY-EPC", "3000",
 | 
			
		||||
    "rv32p/WALLY-TVAL", "3000",
 | 
			
		||||
    "rv32p/WALLY-MARCHID", "4000",
 | 
			
		||||
    "rv32p/WALLY-MIMPID", "4000",
 | 
			
		||||
    "rv32p/WALLY-MHARTID", "4000",
 | 
			
		||||
    "rv32p/WALLY-MVENDORID", "4000"
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  string tests64periph[] = '{
 | 
			
		||||
    "rv64i-periph/WALLY-PLIC", "2080"
 | 
			
		||||
  };
 | 
			
		||||
@ -397,12 +407,13 @@ module testbench();
 | 
			
		||||
      end
 | 
			
		||||
      //tests = {tests64a, tests};
 | 
			
		||||
      // tests = {tests, tests64p};
 | 
			
		||||
      tests = tests64p;
 | 
			
		||||
    end else begin // RV32
 | 
			
		||||
      // *** add the 32 bit bp tests
 | 
			
		||||
      if (TESTSPERIPH) begin 
 | 
			
		||||
        tests = tests32periph;
 | 
			
		||||
      end else begin
 | 
			
		||||
          tests = {tests32i};//,tests32periph}; *** broken at the moment
 | 
			
		||||
          tests = {tests32i, tests32p};//,tests32periph}; *** broken at the moment
 | 
			
		||||
          if (`C_SUPPORTED % 2 == 1) tests = {tests, tests32ic};    
 | 
			
		||||
          else                       tests = {tests, tests32iNOc};
 | 
			
		||||
          if (`M_SUPPORTED % 2 == 1) tests = {tests, tests32m};
 | 
			
		||||
@ -410,8 +421,9 @@ module testbench();
 | 
			
		||||
          if (`A_SUPPORTED) tests = {tests, tests32a};
 | 
			
		||||
          if (`MEM_VIRTMEM) tests = {tests32mmu, tests};
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      tests = tests32p;
 | 
			
		||||
    end
 | 
			
		||||
    //tests = tests64p;
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -274,7 +274,7 @@ def writeTest(storecmd, f, r, test, interrupt, code, mode = "m", resetHander = "
 | 
			
		||||
# csrrw, csrrs, csrrc, csrrwi, csrrsi, csrrci
 | 
			
		||||
author = "dottolia@hmc.edu"
 | 
			
		||||
xlens = [32, 64]
 | 
			
		||||
numrand = 10;
 | 
			
		||||
numrand = 8;
 | 
			
		||||
 | 
			
		||||
# setup
 | 
			
		||||
seed(0xC365DDEB9173AB42) # make tests reproducible
 | 
			
		||||
@ -295,8 +295,10 @@ for xlen in xlens:
 | 
			
		||||
    0x624B3E976C52DD14 % 2**xlen, 2**(xlen-1)-2, 2**(xlen-1)-1, 
 | 
			
		||||
    2**(xlen-1), 2**(xlen-1)+1, 0xC365DDEB9173AB42 % 2**xlen, 2**(xlen)-2, 2**(xlen)-1
 | 
			
		||||
  ]
 | 
			
		||||
 | 
			
		||||
  for mode in ["m", "s", "u"]:
 | 
			
		||||
    imperaspath = "../../../imperas-riscv-tests/riscv-test-suite/rv" + str(xlen) + "p/"
 | 
			
		||||
  basename = "WALLY-CAUSE"
 | 
			
		||||
    basename = "WALLY-" + mode.upper() + "CAUSE"
 | 
			
		||||
    fname = imperaspath + "src/" + basename + ".S"
 | 
			
		||||
    refname = imperaspath + "references/" + basename + ".reference_output"
 | 
			
		||||
    testnum = 0
 | 
			
		||||
 | 
			
		||||
@ -163,7 +163,7 @@ def writeTest(storecmd, f, r, test, expected, mode = "m", resetHander = ""):
 | 
			
		||||
# csrrw, csrrs, csrrc, csrrwi, csrrsi, csrrci
 | 
			
		||||
author = "dottolia@hmc.edu"
 | 
			
		||||
xlens = [32, 64]
 | 
			
		||||
numrand = 30;
 | 
			
		||||
numrand = 20;
 | 
			
		||||
 | 
			
		||||
# setup
 | 
			
		||||
seed(0xC363DDEB9173AB42) # make tests reproducible
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user