mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Remove imem from testbenches
This commit is contained in:
		
							parent
							
								
									ccff1e6c99
								
							
						
					
					
						commit
						d281ecd067
					
				@ -72,6 +72,9 @@ module wallypipelinedsoc (
 | 
				
			|||||||
  // instantiate processor and memories
 | 
					  // instantiate processor and memories
 | 
				
			||||||
  wallypipelinedhart hart(.*);
 | 
					  wallypipelinedhart hart(.*);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  imem imem(.AdrF(PCF[`XLEN-1:1]), .*); // temporary until uncore memory is finished***
 | 
					  // *** Temporary driving of access fault to low until PMA checker is complete
 | 
				
			||||||
 | 
					  assign InstrAccessFaultF = '0;
 | 
				
			||||||
 | 
					  // instructions now come from uncore memory. This line can be removed at any time.
 | 
				
			||||||
 | 
					  // imem imem(.AdrF(PCF[`XLEN-1:1]), .*); // temporary until uncore memory is finished***
 | 
				
			||||||
  uncore uncore(.HWDATAIN(HWDATA), .*);
 | 
					  uncore uncore(.HWDATAIN(HWDATA), .*);
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
@ -99,8 +99,6 @@ module testbench_busybear();
 | 
				
			|||||||
  initial begin
 | 
					  initial begin
 | 
				
			||||||
    $readmemh("/courses/e190ax/busybear_boot_new/bootmem.txt", dut.uncore.bootdtim.RAM, 'h1000 >> 3);
 | 
					    $readmemh("/courses/e190ax/busybear_boot_new/bootmem.txt", dut.uncore.bootdtim.RAM, 'h1000 >> 3);
 | 
				
			||||||
    $readmemh("/courses/e190ax/busybear_boot_new/ram.txt", dut.uncore.dtim.RAM);
 | 
					    $readmemh("/courses/e190ax/busybear_boot_new/ram.txt", dut.uncore.dtim.RAM);
 | 
				
			||||||
    $readmemh("/courses/e190ax/busybear_boot_new/bootmem.txt", dut.imem.bootram, 'h1000 >> 3);
 | 
					 | 
				
			||||||
    $readmemh("/courses/e190ax/busybear_boot_new/ram.txt", dut.imem.RAM);
 | 
					 | 
				
			||||||
    $readmemb(`TWO_BIT_PRELOAD, dut.hart.ifu.bpred.Predictor.DirPredictor.PHT.memory);
 | 
					    $readmemb(`TWO_BIT_PRELOAD, dut.hart.ifu.bpred.Predictor.DirPredictor.PHT.memory);
 | 
				
			||||||
    $readmemb(`BTB_PRELOAD, dut.hart.ifu.bpred.TargetPredictor.memory.memory);
 | 
					    $readmemb(`BTB_PRELOAD, dut.hart.ifu.bpred.TargetPredictor.memory.memory);
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
@ -78,7 +78,6 @@ module testbench();
 | 
				
			|||||||
      totalerrors = 0;
 | 
					      totalerrors = 0;
 | 
				
			||||||
      // read test vectors into memory
 | 
					      // read test vectors into memory
 | 
				
			||||||
      memfilename = tests[0];
 | 
					      memfilename = tests[0];
 | 
				
			||||||
      $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
      for(j=18710; j < 65535; j = j+1)
 | 
					      for(j=18710; j < 65535; j = j+1)
 | 
				
			||||||
        dut.uncore.dtim.RAM[j] = 64'b0;
 | 
					        dut.uncore.dtim.RAM[j] = 64'b0;
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,6 @@ module testbench();
 | 
				
			|||||||
      totalerrors = 0;
 | 
					      totalerrors = 0;
 | 
				
			||||||
      // read test vectors into memory
 | 
					      // read test vectors into memory
 | 
				
			||||||
      memfilename = tests[0];
 | 
					      memfilename = tests[0];
 | 
				
			||||||
      $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
      for(j=268437702; j < 268566528; j = j+1)
 | 
					      for(j=268437702; j < 268566528; j = j+1)
 | 
				
			||||||
        dut.uncore.dtim.RAM[j] = 64'b0;
 | 
					        dut.uncore.dtim.RAM[j] = 64'b0;
 | 
				
			||||||
 | 
				
			|||||||
@ -450,7 +450,6 @@ module testbench();
 | 
				
			|||||||
      end
 | 
					      end
 | 
				
			||||||
      // read test vectors into memory
 | 
					      // read test vectors into memory
 | 
				
			||||||
      memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
					      memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
				
			||||||
      $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
      ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
					      ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
				
			||||||
      ProgramLabelMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.lab"};
 | 
					      ProgramLabelMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.lab"};
 | 
				
			||||||
@ -525,7 +524,6 @@ module testbench();
 | 
				
			|||||||
        end
 | 
					        end
 | 
				
			||||||
        else begin
 | 
					        else begin
 | 
				
			||||||
          memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
					          memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
				
			||||||
          $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
          $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					          $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
          $display("Read memfile %s", memfilename);
 | 
					          $display("Read memfile %s", memfilename);
 | 
				
			||||||
	  ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
						  ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
				
			||||||
 | 
				
			|||||||
@ -116,7 +116,6 @@ module testbench();
 | 
				
			|||||||
      end
 | 
					      end
 | 
				
			||||||
      // read test vectors into memory
 | 
					      // read test vectors into memory
 | 
				
			||||||
      memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
					      memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
				
			||||||
      $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					      $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
      ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
					      ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
				
			||||||
      ProgramLabelMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.lab"};
 | 
					      ProgramLabelMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.lab"};
 | 
				
			||||||
@ -191,7 +190,6 @@ module testbench();
 | 
				
			|||||||
        end
 | 
					        end
 | 
				
			||||||
        else begin
 | 
					        else begin
 | 
				
			||||||
          memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
					          memfilename = {"../../imperas-riscv-tests/work/", tests[test], ".elf.memfile"};
 | 
				
			||||||
          $readmemh(memfilename, dut.imem.RAM);
 | 
					 | 
				
			||||||
          $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
					          $readmemh(memfilename, dut.uncore.dtim.RAM);
 | 
				
			||||||
          $display("Read memfile %s", memfilename);
 | 
					          $display("Read memfile %s", memfilename);
 | 
				
			||||||
    ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
					    ProgramAddrMapFile = {"../../imperas-riscv-tests/work/", tests[test], ".elf.objdump.addr"};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user