From dd9faf509e69d2bac47c37b38155733f1c0d4dd0 Mon Sep 17 00:00:00 2001 From: Raphael Jacquot Date: Mon, 18 Mar 2019 07:33:24 +0100 Subject: [PATCH] initialize ram with random crap --- saturn_hp48gx_sysram.v | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/saturn_hp48gx_sysram.v b/saturn_hp48gx_sysram.v index b9e6749..fa837f7 100644 --- a/saturn_hp48gx_sysram.v +++ b/saturn_hp48gx_sysram.v @@ -104,6 +104,13 @@ initial begin length_conf = 1'b0; base_addr = 20'b0; length = 20'b0; + +`ifdef SIM + /* initialize ram to random crap, just like in the fpga */ + for(local_pc = (2**`SYSRAM_BITS)-1; local_pc != 20'hFFFFF; local_pc = local_pc - 20'h1) + sysram_data[local_pc] = $urandom%15; +`endif + end /*