From: Tobias Platen Date: Thu, 30 Jul 2020 16:57:46 +0000 (+0200) Subject: add CacheRecord X-Git-Tag: semi_working_ecp5~483 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ac45c6d76c4db1ae3654fdc0a9e3d28441165f6;p=soc.git add CacheRecord --- 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):