New RAM /OE control so it doesn't bus fight

This commit is contained in:
Zane Kaminski 2024-10-07 07:53:41 -04:00
parent a7632a3057
commit 53bc4c08bd

View File

@ -37,10 +37,15 @@ module RAM(
/* RAM control signals */ /* RAM control signals */
assign nRAS = !((!nAS && RAMCS && RASEN) || RASrf); assign nRAS = !((!nAS && RAMCS && RASEN) || RASrf);
assign nOE = 0;//!( !nAS && RAMCS && BACTr);
assign nLWE = !(!nLDS && RASEL && !nWE); assign nLWE = !(!nLDS && RASEL && !nWE);
assign nUWE = !(!nUDS && RASEL && !nWE); assign nUWE = !(!nUDS && RASEL && !nWE);
/* RAM /OE control */
always @(posedge CLK) begin
if (nAS) nOE <= 1;
else nOE <= !(BACT && RAMCS0X && nWE);
end
/* ROM control signals */ /* ROM control signals */
assign nROMOE = !(!nAS && ROMCS && nWE); assign nROMOE = !(!nAS && ROMCS && nWE);
assign nROMWE = !(!nAS && ROMCS4X && !nWE && BACTr); assign nROMWE = !(!nAS && ROMCS4X && !nWE && BACTr);