// output logic [`XLEN-1:0] MMUReadPTE, // *** it seems like this is the value out of the ahblite that gets sent back to the ptw. I don;t think it needs to get checked until the next paddr has been extracted from it.
inputlogicMMUTranslate,// *** rename to HPTWReq
// output logic MMUReady, // *** Similar reason to mmuReadPTE
inputlogic[`XLEN-1:0]MMUPAdr,
// signal from CPU
inputlogic[1:0]MemRWM,
inputlogic[2:0]Funct3M,
inputlogic[1:0]AtomicM,
inputlogic[`XLEN-1:0]MemAdrM,// memory addrress to be checked coming from the CPU. *** this will be used to arbitrate to decide HADDR going into the PM checks, but it also gets sent in its normal form to the lsu because we need the virtual address for the tlb.
inputlogic[31:0]HADDR,// *** replace all of these H inputs with physical adress once pma checkers have been edited to use paddr as well.
inputlogic[2:0]HSIZE,
inputlogicHWRITE,
inputlogicAtomicAccessM,WriteAccessM,ReadAccessM,// execute access is hardwired to zero in this mmu because we're only working with data in the M stage.
*/
generate
if(`XLEN==32)begin
assignFunct3MtoLSU=MMUTranslate?3'b010:Funct3M;// *** is this the right thing for the msB?
endelsebegin
assignFunct3MtoLSU=MMUTranslate?3'b011:Funct3M;// *** is this the right thing for the msB?
end
endgenerate
assignAtomicMtoLSU=MMUTranslate?2'b00:AtomicM;
assignMemRWMtoLSU=MemRWM;// *** along with the rest of the lsu, the mmu uses memrwm in it's pure form so I think we can just forward it through
assignDisableTranslation=MMUTranslate;
// assign HADDRtoLSU = MMUTranslate ? MMUPAdr : MemAdrM; // *** Potentially a huge breaking point since the PM checks always get HADDR from ahblite and not necessarily just these two sources. this will need to be looked over when we fix PM to only take physical addresses.
// assign HSIZEtoLSU = {1'b0, Funct3MtoLSU[1:0]}; // the Hsize is always just the funct3M indicating the size of the data transfer.