From 53bc4c08bd078da673eb793eb5266e7d72e3d8c5 Mon Sep 17 00:00:00 2001 From: Zane Kaminski Date: Mon, 7 Oct 2024 07:53:41 -0400 Subject: [PATCH] New RAM /OE control so it doesn't bus fight --- cpld/RAM.v | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpld/RAM.v b/cpld/RAM.v index 153fc12..f336cac 100644 --- a/cpld/RAM.v +++ b/cpld/RAM.v @@ -37,9 +37,14 @@ module RAM( /* RAM control signals */ assign nRAS = !((!nAS && RAMCS && RASEN) || RASrf); - assign nOE = 0;//!( !nAS && RAMCS && BACTr); assign nLWE = !(!nLDS && 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 */ assign nROMOE = !(!nAS && ROMCS && nWE);