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
)
57 self
.load
= Signal() # this is a load
60 self
.reserve
= Signal()
61 self
.atomic
= Signal() # part of a multi-transfer atomic op
62 self
.atomic_last
= Signal()
63 self
.virt_mode
= Signal()
64 self
.priv_mode
= Signal()
65 self
.addr
= Signal(64)
66 self
.data
= Signal(64) # valid the cycle after valid=1
67 self
.byte_sel
= Signal(8)
70 class LoadStore1ToMMUType(RecordObject
):
71 def __init__(self
, name
=None):
72 super().__init
__(name
=name
)
80 self
.sprn
= Signal(10)
81 self
.addr
= Signal(64)
85 class MMUToLoadStore1Type(RecordObject
):
86 def __init__(self
, name
=None):
87 super().__init
__(name
=name
)
90 self
.invalid
= Signal()
91 self
.badtree
= Signal()
92 self
.segerr
= Signal()
93 self
.perm_error
= Signal()
94 self
.rc_error
= Signal()
95 self
.sprval
= Signal(64)
98 class MMUToDCacheType(RecordObject
):
99 def __init__(self
, name
=None):
100 super().__init
__(name
=name
)
101 self
.valid
= Signal()
102 self
.tlbie
= Signal()
103 self
.doall
= Signal()
104 self
.tlbld
= Signal()
105 self
.addr
= Signal(64)
106 self
.pte
= Signal(64)
109 class MMUToICacheType(RecordObject
):
110 def __init__(self
, name
=None):
111 super().__init
__(name
=name
)
112 self
.tlbld
= Signal()
113 self
.tlbie
= Signal()
114 self
.doall
= Signal()
115 self
.addr
= Signal(64)
116 self
.pte
= Signal(64)