3 based on Anton Blanchard microwatt common.vhdl
6 from nmutil
.iocontrol
import RecordObject
7 from nmigen
import Signal
9 from openpower
.exceptions
import LDSTException
12 class DCacheToLoadStore1Type(RecordObject
):
13 def __init__(self
, name
=None):
14 super().__init
__(name
=name
)
16 self
.data
= Signal(64)
17 self
.store_done
= Signal()
19 self
.cache_paradox
= Signal()
22 class DCacheToMMUType(RecordObject
):
23 def __init__(self
, name
=None):
24 super().__init
__(name
=name
)
28 self
.data
= Signal(64)
31 class Fetch1ToICacheType(RecordObject
):
32 def __init__(self
, name
=None):
33 super().__init
__(name
=name
)
35 self
.virt_mode
= Signal()
36 self
.priv_mode
= Signal()
37 self
.stop_mark
= Signal()
38 self
.sequential
= Signal()
42 class ICacheToDecode1Type(RecordObject
):
43 def __init__(self
, name
=None):
44 super().__init
__(name
=name
)
46 self
.stop_mark
= Signal()
47 self
.fetch_failed
= Signal()
49 self
.insn
= Signal(32)
52 class LoadStore1ToDCacheType(RecordObject
):
53 def __init__(self
, name
=None):
54 super().__init
__(name
=name
)
56 self
.load
= Signal() # this is a load
59 self
.reserve
= Signal()
60 self
.virt_mode
= Signal()
61 self
.priv_mode
= Signal()
62 self
.addr
= Signal(64)
63 self
.data
= Signal(64)
64 self
.byte_sel
= Signal(8)
67 class LoadStore1ToMMUType(RecordObject
):
68 def __init__(self
, name
=None):
69 super().__init
__(name
=name
)
77 self
.sprn
= Signal(10)
78 self
.addr
= Signal(64)
82 class MMUToLoadStore1Type(RecordObject
):
83 def __init__(self
, name
=None):
84 super().__init
__(name
=name
)
87 self
.invalid
= Signal()
88 self
.badtree
= Signal()
89 self
.segerr
= Signal()
90 self
.perm_error
= Signal()
91 self
.rc_error
= Signal()
92 self
.sprval
= Signal(64)
95 class MMUToDCacheType(RecordObject
):
96 def __init__(self
, name
=None):
97 super().__init
__(name
=name
)
100 self
.doall
= Signal()
101 self
.tlbld
= Signal()
102 self
.addr
= Signal(64)
103 self
.pte
= Signal(64)
106 class MMUToICacheType(RecordObject
):
107 def __init__(self
, name
=None):
108 super().__init
__(name
=name
)
109 self
.tlbld
= Signal()
110 self
.tlbie
= Signal()
111 self
.doall
= Signal()
112 self
.addr
= Signal(64)
113 self
.pte
= Signal(64)