From 36736bfc50d661034132d0194dc34761c2f54c9a Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Wed, 24 Jun 2020 11:28:11 -0400 Subject: [PATCH] Add specification for load store interface --- src/soc/experiment/lsmem.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/soc/experiment/lsmem.py diff --git a/src/soc/experiment/lsmem.py b/src/soc/experiment/lsmem.py new file mode 100644 index 00000000..bff64776 --- /dev/null +++ b/src/soc/experiment/lsmem.py @@ -0,0 +1,24 @@ +from nmigen import Signal + +class LoadStoreUnitInterface: + def __init__(self): + + #self.dbus = Record(wishbone_layout) + + self.x_addr = Signal(32) # The address used for loads/stores + self.x_mask = Signal(4) # Mask of which bytes to write + self.x_load = Signal() # set to do a memory load + self.x_store = Signal() # set to do a memory store + self.x_store_data = Signal(32) # The data to write when storing + self.x_stall = Signal() # input - do nothing until low + self.x_valid = Signal() + self.m_stall = Signal() # input - do nothing until low + self.m_valid = Signal() # when this is high and m_busy is + # low, the data for the memory load can be read from m_load_data + + self.x_busy = Signal() # set when the memory is busy + self.m_busy = Signal() # set when the memory is busy + self.m_load_data = Signal(32) # Data returned from a memory read + self.m_load_error = Signal() # Whether there was an error when loading + self.m_store_error = Signal() # Whether there was an error when storing + self.m_badaddr = Signal(30) # The address of the load/store error -- 2.30.2