mirror of
https://github.com/garrettsworkshop/Warp-SE.git
synced 2025-02-19 20:30:43 +00:00
Firmware changes for board changes
This commit is contained in:
parent
fbdfe9464a
commit
20b207a62c
14
cpld/CFG_A.v
14
cpld/CFG_A.v
@ -5,6 +5,12 @@ module CFG(
|
|||||||
inout GA21,
|
inout GA21,
|
||||||
inout GA20,
|
inout GA20,
|
||||||
output SlowdownIOWriteGate,
|
output SlowdownIOWriteGate,
|
||||||
|
input [11:10] RA,
|
||||||
|
input [19:18] BA,
|
||||||
|
input RowA10,
|
||||||
|
output RA11_BA19,
|
||||||
|
output RA10,
|
||||||
|
inout nBG_BA18,
|
||||||
input DBG0_ROMWS,
|
input DBG0_ROMWS,
|
||||||
input DBG1_RAMWS,
|
input DBG1_RAMWS,
|
||||||
input DBG4_IOWS,
|
input DBG4_IOWS,
|
||||||
@ -13,16 +19,20 @@ module CFG(
|
|||||||
output IOWS);
|
output IOWS);
|
||||||
|
|
||||||
assign GA23 = 1'bZ;
|
assign GA23 = 1'bZ;
|
||||||
wire GA23Gate =
|
wire GA22Gate =
|
||||||
(A[23:20]==4'h6) ||
|
(A[23:20]==4'h6) ||
|
||||||
(A[23:20]==4'h7 && A[19:16]!=4'hF) ||
|
(A[23:20]==4'h7 && A[19:16]!=4'hF) ||
|
||||||
(A[23:20]==4'h5 && !A[19]);
|
(A[23:20]==4'h5 && !A[19]);
|
||||||
assign GA22 = ) ? 1'b0 : A[23];
|
assign GA22 = GA22Gate ? 1'b0 : A[23];
|
||||||
assign GA21 = 1'bZ;
|
assign GA21 = 1'bZ;
|
||||||
assign GA20 = 1'bZ;
|
assign GA20 = 1'bZ;
|
||||||
|
|
||||||
assign SlowdownIOWriteGate = 1;
|
assign SlowdownIOWriteGate = 1;
|
||||||
|
|
||||||
|
output RA11_BA19 = BA[19];
|
||||||
|
output RA10 = RowA10;
|
||||||
|
assign nBG_BA18 = BA[18];
|
||||||
|
|
||||||
assign ROMWS = DBG0_ROMWS;
|
assign ROMWS = DBG0_ROMWS;
|
||||||
assign RAMWS = DBG1_RAMWS;
|
assign RAMWS = DBG1_RAMWS;
|
||||||
assign IOWS = DBG4_IOWS;
|
assign IOWS = DBG4_IOWS;
|
||||||
|
@ -5,6 +5,12 @@ module CFG(
|
|||||||
inout GA21,
|
inout GA21,
|
||||||
inout GA20,
|
inout GA20,
|
||||||
output SlowdownIOWriteGate,
|
output SlowdownIOWriteGate,
|
||||||
|
input [11:10] RA,
|
||||||
|
input [19:18] BA,
|
||||||
|
input RowA10,
|
||||||
|
output RA11_BA19,
|
||||||
|
output RA10,
|
||||||
|
inout nBG_BA18,
|
||||||
input DBG0_ROMWS,
|
input DBG0_ROMWS,
|
||||||
input DBG1_RAMWS,
|
input DBG1_RAMWS,
|
||||||
input DBG4_IOWS,
|
input DBG4_IOWS,
|
||||||
@ -17,8 +23,16 @@ module CFG(
|
|||||||
assign GA21 = 1'bZ;
|
assign GA21 = 1'bZ;
|
||||||
assign GA20 = 1'bZ;
|
assign GA20 = 1'bZ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
assign SlowdownIOWriteGate = 0;
|
assign SlowdownIOWriteGate = 0;
|
||||||
|
|
||||||
|
output RA11_BA19 = RA[11];
|
||||||
|
output RA10 = RA[10];
|
||||||
|
assign nBG_BA18 = 1'bZ;
|
||||||
|
|
||||||
assign ROMWS = 0;
|
assign ROMWS = 0;
|
||||||
assign RAMWS = 0;
|
assign RAMWS = 0;
|
||||||
assign IOWS = 0;
|
assign IOWS = 0;
|
||||||
|
17
cpld/RAM.v
17
cpld/RAM.v
@ -6,6 +6,8 @@ module RAM(
|
|||||||
input BACT, input BACTr,
|
input BACT, input BACTr,
|
||||||
/* Select and ready signals */
|
/* Select and ready signals */
|
||||||
input RAMCS, input RAMCS0X, input ROMCS, input ROMCS4X,
|
input RAMCS, input RAMCS0X, input ROMCS, input ROMCS4X,
|
||||||
|
/* ROM size inputs */
|
||||||
|
input [1:0] ROMSize, input [1:0] ROMBank,
|
||||||
/* RAM/ROM wait state inputs */
|
/* RAM/ROM wait state inputs */
|
||||||
input RAMWS, input ROMWS,
|
input RAMWS, input ROMWS,
|
||||||
/* RAM/ROM ready output */
|
/* RAM/ROM ready output */
|
||||||
@ -13,8 +15,10 @@ module RAM(
|
|||||||
/* Refresh Counter Interface */
|
/* Refresh Counter Interface */
|
||||||
input RefReqIn, input RefUrgIn,
|
input RefReqIn, input RefUrgIn,
|
||||||
/* DRAM interface */
|
/* DRAM interface */
|
||||||
output [11:0] RA, output nRAS, output reg nCAS,
|
output nRAS, output reg nCAS,
|
||||||
output nLWE, output nUWE, output nOE,
|
output nLWE, output nUWE, output nOE,
|
||||||
|
/* DRAM address and ROM bank address */
|
||||||
|
output [11:0] RA, output RowA10, output [19:18] BA,
|
||||||
/* NOR flash interface */
|
/* NOR flash interface */
|
||||||
output nROMOE, output nROMWE);
|
output nROMOE, output nROMWE);
|
||||||
|
|
||||||
@ -43,7 +47,7 @@ module RAM(
|
|||||||
assign nUWE = !(!nUDS && RASEL && !nWE);
|
assign nUWE = !(!nUDS && RASEL && !nWE);
|
||||||
|
|
||||||
/* RAM /OE control */
|
/* RAM /OE control */
|
||||||
assign nOE = 0;
|
assign nOE = !nWE;
|
||||||
/*reg nOEr; assign nOE = nOEr;
|
/*reg nOEr; assign nOE = nOEr;
|
||||||
always @(posedge CLK, posedge nAS) begin
|
always @(posedge CLK, posedge nAS) begin
|
||||||
if (nAS) nOEr <= 1;
|
if (nAS) nOEr <= 1;
|
||||||
@ -63,11 +67,12 @@ module RAM(
|
|||||||
|
|
||||||
/* RAM address mux (and ROM address on RA8) */
|
/* RAM address mux (and ROM address on RA8) */
|
||||||
// RA11 doesn't do anything so both should be identical.
|
// RA11 doesn't do anything so both should be identical.
|
||||||
assign RA[11] = !RASEL ? A[19] : A[20]; // ROM address 19
|
assign RA[11] = !RASEL ? A[19] : A[20]; // ROM address 19
|
||||||
assign RA[03] = !RASEL ? A[19] : A[20];
|
assign RA[03] = !RASEL ? A[19] : A[20];
|
||||||
// RA10 has only row so different rows but same column.
|
// RA10 has only row so different rows but same column.
|
||||||
assign RA[10] = !RASEL ? A[17] : A[07];
|
assign RA[10] = !RASEL ? A[17] : A[07];
|
||||||
assign RA[02] = !RASEL ? A[16] : A[07];
|
assign RA[02] = !RASEL ? A[16] : A[07];
|
||||||
|
assign RowA10 = A[17];
|
||||||
// Remainder of RA bus is unpaired
|
// Remainder of RA bus is unpaired
|
||||||
assign RA[09] = !RASEL ? A[15] : A[08];
|
assign RA[09] = !RASEL ? A[15] : A[08];
|
||||||
assign RA[08] = !RASEL ? A[18] : A[21]; // ROM address 18
|
assign RA[08] = !RASEL ? A[18] : A[21]; // ROM address 18
|
||||||
@ -78,6 +83,8 @@ module RAM(
|
|||||||
assign RA[01] = !RASEL ? A[10] : A[02];
|
assign RA[01] = !RASEL ? A[10] : A[02];
|
||||||
assign RA[00] = !RASEL ? A[09] : A[01];
|
assign RA[00] = !RASEL ? A[09] : A[01];
|
||||||
|
|
||||||
|
assign BA[19:18] = 2'b11;
|
||||||
|
|
||||||
wire RS0toRef = // Refresh during first clock of non-RAM access
|
wire RS0toRef = // Refresh during first clock of non-RAM access
|
||||||
(RefReq && BACT && !BACTr && !RAMCS0X) ||
|
(RefReq && BACT && !BACTr && !RAMCS0X) ||
|
||||||
// Urgent refresh while bus inactive
|
// Urgent refresh while bus inactive
|
||||||
@ -89,14 +96,14 @@ module RAM(
|
|||||||
always @(posedge CLK) begin
|
always @(posedge CLK) begin
|
||||||
case (RS[2:0])
|
case (RS[2:0])
|
||||||
0: begin // Idle/ready
|
0: begin // Idle/ready
|
||||||
if (RAMReady) begin // Continue accessing RAM
|
if (RAMReady) begin // After wait state
|
||||||
RS <= 1; // Continue accessing RAM
|
RS <= 1; // Continue accessing RAM
|
||||||
RAMReady <= 1;
|
RAMReady <= 1;
|
||||||
RASEL <= 1;
|
RASEL <= 1;
|
||||||
RefCAS <= 0;
|
RefCAS <= 0;
|
||||||
RASEN <= 1;
|
RASEN <= 1;
|
||||||
end else if (RS0toRAM) begin // Wait state
|
end else if (RS0toRAM) begin // Wait state
|
||||||
RS <= 0;
|
RS <= RAMWS ? 0 : 1;
|
||||||
RAMReady <= 1;
|
RAMReady <= 1;
|
||||||
RASEL <= 0;
|
RASEL <= 0;
|
||||||
RefCAS <= 0;
|
RefCAS <= 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user