Line 5... |
Line 5... |
// 4004 Timing and I/O Interfaces
|
// 4004 Timing and I/O Interfaces
|
//
|
//
|
// This file is part of the MCS-4 project hosted at OpenCores:
|
// This file is part of the MCS-4 project hosted at OpenCores:
|
// http://www.opencores.org/cores/mcs-4/
|
// http://www.opencores.org/cores/mcs-4/
|
//
|
//
|
// Copyright © 2012, 2020 by Reece Pollack <rrpollack@opencores.org>
|
// Copyright © 2012, 2021 by Reece Pollack <rrpollack@opencores.org>
|
//
|
//
|
// These materials are provided under the Creative Commons
|
// These materials are provided under the Creative Commons
|
// "Attribution-NonCommercial-ShareAlike" Public License. They
|
// "Attribution-NonCommercial-ShareAlike" (CC BY-NC-SA) Public License.
|
// are NOT "public domain" and are protected by copyright.
|
// They are NOT "public domain", and are protected by copyright.
|
//
|
//
|
// This work based on materials provided by Intel Corporation and
|
// This work based on materials provided by Intel Corporation and
|
// others under the same license. See the file doc/License for
|
// others under the same license. See the file doc/License for
|
// details of this license.
|
// details of this license.
|
//
|
//
|
Line 43... |
Line 43... |
// External I/O Pad conditioning
|
// External I/O Pad conditioning
|
inout wire [3:0] data,
|
inout wire [3:0] data,
|
inout wire [3:0] data_pad,
|
inout wire [3:0] data_pad,
|
input wire test_pad,
|
input wire test_pad,
|
output reg n0432,
|
output reg n0432,
|
output reg sync_pad,
|
output wire sync_pad,
|
input wire cmrom,
|
input wire cmrom,
|
output wire cmrom_pad,
|
output wire cmrom_pad,
|
input wire cmram0,
|
input wire cmram0,
|
output wire cmram0_pad,
|
output wire cmram0_pad,
|
input wire cmram1,
|
input wire cmram1,
|
Line 67... |
Line 67... |
assign cmram2_pad = cmram2;
|
assign cmram2_pad = cmram2;
|
assign cmram3_pad = cmram3;
|
assign cmram3_pad = cmram3;
|
|
|
|
|
// Generate the 8 execution phase indicators
|
// Generate the 8 execution phase indicators
|
reg [0:7] master = 8'h00;
|
timing_generator timing_generator (
|
reg [0:7] slave = 8'h00;
|
.sysclk (sysclk),
|
always @(posedge sysclk) begin
|
.clk1 (clk1),
|
if (clk2)
|
.clk2 (clk2),
|
master <= {~|slave[0:6], slave[0:6]};
|
.a12 (a12),
|
else
|
.a22 (a22),
|
sync_pad <= master[7];
|
.a32 (a32),
|
|
.m12 (m12),
|
if (clk1)
|
.m22 (m22),
|
slave <= master;
|
.x12 (x12),
|
end
|
.x22 (x22),
|
|
.x32 (x32),
|
assign a12 = slave[0];
|
.sync (sync_pad)
|
assign a22 = slave[1];
|
);
|
assign a32 = slave[2];
|
|
assign m12 = slave[3];
|
|
assign m22 = slave[4];
|
|
assign x12 = slave[5];
|
|
assign x22 = slave[6];
|
|
assign x32 = slave[7];
|
|
|
|
|
|
// Generate the DRAM Input Gate signal
|
// Generate the DRAM Input Gate signal
|
// Properly called M12+M22+CLK1~(M11&M12)
|
// Properly called M12+M22+CLK1~(M11&M12)
|
wire n0279 = ~(a32 | m12);
|
wire n0279 = ~(a32 | m12);
|
reg n0278;
|
reg n0278;
|
Line 102... |
Line 95... |
wire n0708 = ~((n0278 & clk1) | m12 | m22);
|
wire n0708 = ~((n0278 & clk1) | m12 | m22);
|
assign gate = ~n0708;
|
assign gate = ~n0708;
|
|
|
|
|
// Generate a clean POC signal
|
// Generate a clean POC signal
|
always @(posedge sysclk) begin
|
always @(posedge sysclk or posedge poc_pad) begin
|
if (poc_pad) poc <= 1'b1;
|
if (poc_pad) poc <= 1'b1;
|
else if (a12) poc <= 1'b0;
|
else if (a12) poc <= 1'b0;
|
else poc <= poc;
|
|
end
|
end
|
|
|
// Generate a clean ~TEST signal (n0432)
|
// Generate a clean ~TEST signal (n0432)
|
always @(posedge sysclk) begin
|
always @(posedge sysclk) begin
|
n0432 <= ~test_pad;
|
n0432 <= ~test_pad;
|