mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-09 21:25:23 +00:00
Update lrsc.sv
Program clean up
This commit is contained in:
parent
d21fd3da44
commit
a45f2fd044
@ -29,23 +29,23 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
module lrsc import cvw::*; #(parameter cvw_t P) (
|
module lrsc import cvw::*; #(parameter cvw_t P) (
|
||||||
input logic clk,
|
input logic clk,
|
||||||
input logic reset,
|
input logic reset,
|
||||||
input logic StallW,
|
input logic StallW,
|
||||||
input logic MemReadM, // Memory read
|
input logic MemReadM, // Memory read
|
||||||
input logic [1:0] PreLSURWM, // Memory operation from the HPTW or IEU [1]: read, [0]: write
|
input logic [1:0] PreLSURWM, // Memory operation from the HPTW or IEU [1]: read, [0]: write
|
||||||
output logic [1:0] LSURWM, // Memory operation after potential squash of SC
|
output logic [1:0] LSURWM, // Memory operation after potential squash of SC
|
||||||
input logic [1:0] LSUAtomicM, // Atomic memory operaiton
|
input logic [1:0] LSUAtomicM, // Atomic memory operaiton
|
||||||
input logic [P.PA_BITS-1:0] PAdrM, // Physical memory address
|
input logic [P.PA_BITS-1:0] PAdrM, // Physical memory address
|
||||||
output logic SquashSCW // Squash the store conditional by not allowing rf write
|
output logic SquashSCW // Squash the store conditional by not allowing rf write
|
||||||
);
|
);
|
||||||
|
|
||||||
// possible bug: *** double check if PreLSURWM needs to be flushed by ignorerequest.
|
// possible bug: *** double check if PreLSURWM needs to be flushed by ignorerequest.
|
||||||
// Handle atomic load reserved / store conditional
|
// Handle atomic load reserved / store conditional
|
||||||
logic [P.PA_BITS-1:2] ReservationPAdrW;
|
logic [P.PA_BITS-1:2] ReservationPAdrW;
|
||||||
logic ReservationValidM, ReservationValidW;
|
logic ReservationValidM, ReservationValidW;
|
||||||
logic lrM, scM, WriteAdrMatchM;
|
logic lrM, scM, WriteAdrMatchM;
|
||||||
logic SquashSCM;
|
logic SquashSCM;
|
||||||
|
|
||||||
assign lrM = MemReadM & LSUAtomicM[0];
|
assign lrM = MemReadM & LSUAtomicM[0];
|
||||||
assign scM = PreLSURWM[0] & LSUAtomicM[0];
|
assign scM = PreLSURWM[0] & LSUAtomicM[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user