mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Changed IMWriteDataM to IHWriteDataM.
This commit is contained in:
		
							parent
							
								
									421c6f9c48
								
							
						
					
					
						commit
						9d7ba19fe1
					
				@ -34,7 +34,7 @@ module atomic (
 | 
			
		||||
  input logic                clk,
 | 
			
		||||
  input logic                reset, StallW,
 | 
			
		||||
  input logic [`XLEN-1:0]    ReadDataM,
 | 
			
		||||
  input logic [`XLEN-1:0]    IMWriteDataM, 
 | 
			
		||||
  input logic [`XLEN-1:0]    IHWriteDataM, 
 | 
			
		||||
  input logic [`PA_BITS-1:0] PAdrM,
 | 
			
		||||
  input logic [6:0]          LSUFunct7M,
 | 
			
		||||
  input logic [2:0]          LSUFunct3M,
 | 
			
		||||
@ -48,9 +48,9 @@ module atomic (
 | 
			
		||||
  logic [`XLEN-1:0] AMOResult;
 | 
			
		||||
  logic               MemReadM;
 | 
			
		||||
 | 
			
		||||
  amoalu amoalu(.srca(ReadDataM), .srcb(IMWriteDataM), .funct(LSUFunct7M), .width(LSUFunct3M[1:0]), 
 | 
			
		||||
  amoalu amoalu(.srca(ReadDataM), .srcb(IHWriteDataM), .funct(LSUFunct7M), .width(LSUFunct3M[1:0]), 
 | 
			
		||||
                .result(AMOResult));
 | 
			
		||||
  mux2 #(`XLEN) wdmux(IMWriteDataM, AMOResult, LSUAtomicM[1], IMAWriteDataM);
 | 
			
		||||
  mux2 #(`XLEN) wdmux(IHWriteDataM, AMOResult, LSUAtomicM[1], IMAWriteDataM);
 | 
			
		||||
  assign MemReadM = PreLSURWM[1] & ~IgnoreRequest;
 | 
			
		||||
  lrsc lrsc(.clk, .reset, .StallW, .MemReadM, .PreLSURWM, .LSUAtomicM, .PAdrM,
 | 
			
		||||
    .SquashSCW, .LSURWM);
 | 
			
		||||
 | 
			
		||||
@ -111,7 +111,7 @@ module lsu (
 | 
			
		||||
  logic                     IgnoreRequestTLB;
 | 
			
		||||
  logic                     BusCommittedM, DCacheCommittedM;
 | 
			
		||||
  logic                     DataDAPageFaultM;
 | 
			
		||||
  logic [`XLEN-1:0]         IMWriteDataM, IMAWriteDataM;
 | 
			
		||||
  logic [`XLEN-1:0]         IHWriteDataM, IMAWriteDataM;
 | 
			
		||||
  logic [`LLEN-1:0]         IMAFWriteDataM;
 | 
			
		||||
  logic [`LLEN-1:0]         ReadDataM;
 | 
			
		||||
  logic [(`LLEN-1)/8:0]     ByteMaskM;
 | 
			
		||||
@ -133,7 +133,7 @@ module lsu (
 | 
			
		||||
      .FlushW, .DCacheStallM, .SATP_REGW, .PCF,
 | 
			
		||||
      .STATUS_MXR, .STATUS_SUM, .STATUS_MPRV, .STATUS_MPP, .PrivilegeModeW,
 | 
			
		||||
      .ReadDataM(ReadDataM[`XLEN-1:0]), .WriteDataM, .Funct3M, .LSUFunct3M, .Funct7M, .LSUFunct7M,
 | 
			
		||||
      .IEUAdrExtM, .PTE, .IMWriteDataM, .PageType, .PreLSURWM, .LSUAtomicM,
 | 
			
		||||
      .IEUAdrExtM, .PTE, .IHWriteDataM, .PageType, .PreLSURWM, .LSUAtomicM,
 | 
			
		||||
      .IHAdrM, .CPUBusy, .HPTWStall, .SelHPTW,
 | 
			
		||||
      .IgnoreRequestTLB);
 | 
			
		||||
  end else begin
 | 
			
		||||
@ -141,7 +141,7 @@ module lsu (
 | 
			
		||||
    assign CPUBusy = StallW; assign PreLSURWM = MemRWM; 
 | 
			
		||||
    assign IHAdrM = IEUAdrExtM;
 | 
			
		||||
    assign LSUFunct3M = Funct3M;  assign LSUFunct7M = Funct7M; assign LSUAtomicM = AtomicM;
 | 
			
		||||
    assign IMWriteDataM = WriteDataM;
 | 
			
		||||
    assign IHWriteDataM = WriteDataM;
 | 
			
		||||
   end
 | 
			
		||||
 | 
			
		||||
  // CommittedM tells the CPU's privilege unit the current instruction
 | 
			
		||||
@ -306,11 +306,11 @@ module lsu (
 | 
			
		||||
  // Atomic operations
 | 
			
		||||
  /////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
  if (`A_SUPPORTED) begin:atomic
 | 
			
		||||
    atomic atomic(.clk, .reset, .StallW, .ReadDataM(ReadDataM[`XLEN-1:0]), .IMWriteDataM, .PAdrM, 
 | 
			
		||||
    atomic atomic(.clk, .reset, .StallW, .ReadDataM(ReadDataM[`XLEN-1:0]), .IHWriteDataM, .PAdrM, 
 | 
			
		||||
      .LSUFunct7M, .LSUFunct3M, .LSUAtomicM, .PreLSURWM, .IgnoreRequest, 
 | 
			
		||||
      .IMAWriteDataM, .SquashSCW, .LSURWM);
 | 
			
		||||
  end else begin:lrsc
 | 
			
		||||
    assign SquashSCW = 0; assign LSURWM = PreLSURWM; assign IMAWriteDataM = IMWriteDataM;
 | 
			
		||||
    assign SquashSCW = 0; assign LSURWM = PreLSURWM; assign IMAWriteDataM = IHWriteDataM;
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  if (`F_SUPPORTED) 
 | 
			
		||||
 | 
			
		||||
@ -55,7 +55,7 @@ module hptw (
 | 
			
		||||
   	(* mark_debug = "true" *) output logic ITLBWriteF, DTLBWriteM, // write TLB with new entry
 | 
			
		||||
   	output logic [1:0]          PreLSURWM,
 | 
			
		||||
   	output logic [`XLEN+1:0]    IHAdrM,
 | 
			
		||||
   	output logic [`XLEN-1:0]    IMWriteDataM,
 | 
			
		||||
   	output logic [`XLEN-1:0]    IHWriteDataM,
 | 
			
		||||
   	output logic [1:0]          LSUAtomicM,
 | 
			
		||||
   	output logic [2:0]          LSUFunct3M,
 | 
			
		||||
   	output logic [6:0]          LSUFunct7M,
 | 
			
		||||
@ -295,8 +295,8 @@ module hptw (
 | 
			
		||||
  mux2 #(2) atomicmux(AtomicM, 2'b00, SelHPTW, LSUAtomicM);
 | 
			
		||||
  mux2 #(`XLEN+2) lsupadrmux(IEUAdrExtM, HPTWAdrExt, SelHPTWAdr, IHAdrM);
 | 
			
		||||
  if(`HPTW_WRITES_SUPPORTED)
 | 
			
		||||
    mux2 #(`XLEN) lsuwritedatamux(WriteDataM, PTE, SelHPTW, IMWriteDataM);
 | 
			
		||||
  else assign IMWriteDataM = WriteDataM;
 | 
			
		||||
    mux2 #(`XLEN) lsuwritedatamux(WriteDataM, PTE, SelHPTW, IHWriteDataM);
 | 
			
		||||
  else assign IHWriteDataM = WriteDataM;
 | 
			
		||||
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user