From 1aeb760d093189486efbf5adf3292881eda94eb0 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 24 Jul 2022 14:59:03 -0700 Subject: Writeback cache using explicit altsyncram instead of inferred memory. --- hdl/mem_cache.sv | 191 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 144 insertions(+), 47 deletions(-) (limited to 'hdl/mem_cache.sv') diff --git a/hdl/mem_cache.sv b/hdl/mem_cache.sv index 181d8d7..e7fcac7 100644 --- a/hdl/mem_cache.sv +++ b/hdl/mem_cache.sv @@ -6,8 +6,6 @@ module mem_cache ( input bit clock , input bit reset - , input bit clear - , output bit core_command_ready , input bit core_command_valid , input core_to_mem_t core_command_data @@ -32,6 +30,7 @@ module mem_cache typedef struct packed { bit valid; + bit dirty; address_tag_t address; } tag_t; @@ -40,73 +39,171 @@ module mem_cache ram_line_t data; } cache_entry_t; - (* ramstyle = "no_rw_check, M9K" *) cache_entry_t cache [(1<