Files
bholman cb40fed3b9 Introduce Coco 3 Plus for MiSTer
Add original-firmware Sound & Speech, four configurable Multi-Pak sockets,
bounded per-slot ROM allocation and a nine-page menu organized around devices
and media. Repair inherited clock/reset/CPU-memory/video paths and add explicit
conditional external-I/O timing contracts. Preserve native Main startup-file
ordering, saved layouts, stock-core separation and the coco3plus media profile.

Provide native Windows tool downloads, pinned ToolShed ROM assembly, fresh
Quartus builds, functional and fitted timing checks, reviewed release packaging
and passwordless SSH installation with backups. Retain original component
notices, document contribution copyright and keep SSC ROM inputs outside Git.

Validation: Quartus17.0.2 Build602 seed5, zero errors; 15 functional jobs,
368 both-corner timing scopes and eight tooling-integrity checks pass.
The renamed build reaches Disk BASIC, PRINT1+1 returns2 and SSC loads ready.
Physical cold power cycling and conditional board-delay assumptions remain
separate. Full original upstream histories are preserved before this single
consolidated implementation commit.
2026-11-18 16:00:45 -07:00

32 lines
1.2 KiB
Systemverilog

// Original Coco 3 Plus contributions: Copyright (c) 2026 Brian K. Holman.
// Original component notices/terms retained; see COPYRIGHT.md and LICENSING.md.
// Research request boundary for the MiSTer 57 MHz CPU / 114 MHz SDRAM interface.
// Captures the complete selected CPU/GART/AMW payload after the core raises req.
// The clocks are related PLL outputs; all crossings retain normal timing checks.
module cpu_sdram_bridge (
input clk, fast_clk, reset,
input [24:0] cpu_addr,
input [7:0] cpu_din,
input cpu_req, cpu_rnw, memory_ack,
output cpu_ack,
output reg [24:0] memory_addr,
output reg [7:0] memory_din,
output reg memory_rnw,
output reg memory_req = 1'b0
);
// A falling fast-clock observation avoids the coincident positive-fast /
// negative-system edge for ACK. Both half-period transfers remain timed.
reg ack_phase = 1'b0;
always @(negedge fast_clk) ack_phase <= reset ? 1'b0 : memory_ack;
assign cpu_ack = cpu_req && memory_req && ack_phase;
always @(negedge clk) begin
if (reset || !cpu_req) memory_req <= 1'b0;
else if (!memory_req && !ack_phase) begin
memory_addr <= cpu_addr;
memory_din <= cpu_din;
memory_rnw <= cpu_rnw;
memory_req <= 1'b1;
end
end
endmodule