From 6492ed239dcd5724acb90723e16c2d5110f2b0b8 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 20 Mar 2022 13:11:05 -0700 Subject: Temporary change to PDP-8 internal memory to match controller protocol --- hdl/core.sv | 143 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 57 deletions(-) (limited to 'hdl/core.sv') diff --git a/hdl/core.sv b/hdl/core.sv index a71e318..8bbea98 100644 --- a/hdl/core.sv +++ b/hdl/core.sv @@ -1,60 +1,84 @@ +`include "defs.svh" + `ifdef SYNTHESIS `define lag(x) x `else `define lag(x) $past(x) `endif +`define DATA_BITS 12 + module mem ( input bit clk , input bit reset - , output bit ready - , input bit valid - , input bit write - , input bit [ADDR_BITS-1:0] address - , input bit [DATA_BITS-1:0] write_data + , output bit command_ready + , input bit command_valid + , input pdp_command_t command_data + , input bit read_ready , output bit read_valid - , output bit [DATA_BITS-1:0] read_data + , output pdp_read_response_t read_data ); -parameter ADDR_BITS; -parameter DATA_BITS; parameter INIT_FILE; -bit [DATA_BITS-1:0] storage [0:(1<