From 0ac45c6d76c4db1ae3654fdc0a9e3d28441165f6 Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Thu, 30 Jul 2020 18:57:46 +0200 Subject: [PATCH] add CacheRecord --- src/soc/experiment/l0_cache.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/soc/experiment/l0_cache.py b/src/soc/experiment/l0_cache.py index cc74c538..dffb5ae7 100644 --- a/src/soc/experiment/l0_cache.py +++ b/src/soc/experiment/l0_cache.py @@ -99,6 +99,26 @@ class DataMergerRecord(Record): self.data.reset_less = True self.en.reset_less = True +class CacheRecord(Record): + def __init__(self, name=None): + layout = (('addr', 37), + ('a_even', 7), + ('bytemask_even', 16), + ('data_even', 128), + ('a_odd', 7), + ('bytemask_odd', 16), + ('data_odd', 128)) + Record.__init__(self, Layout(layout), name=name) + + self.addr.reset_less = True + self.a_even.reset_less = True + self.bytemask_even.reset_less = True + self.data_even.reset_less = True + self.a_odd.reset_less = True + self.bytemask_odd.reset_less = True + self.data_odd.reset_less = True + + # TODO: formal verification class DataMerger(Elaboratable): -- 2.30.2