projects
/
soc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stop on shadow for the moment
[soc.git]
/
src
/
scoreboard
/
shadow.py
diff --git
a/src/scoreboard/shadow.py
b/src/scoreboard/shadow.py
index ec83038d0260d52de1115f53411e2f8b9377decc..034f34fc4ffc558f562fe4b29c4ef9b1a504166c 100644
(file)
--- a/
src/scoreboard/shadow.py
+++ b/
src/scoreboard/shadow.py
@@
-19,8
+19,9
@@
class Shadow(Elaboratable):
notes:
* when shadow_wid = 0, recover and shadown are Consts (i.e. do nothing)
"""
notes:
* when shadow_wid = 0, recover and shadown are Consts (i.e. do nothing)
"""
- def __init__(self, shadow_wid=0):
+ def __init__(self, shadow_wid=0
, syncreset=False
):
self.shadow_wid = shadow_wid
self.shadow_wid = shadow_wid
+ self.syncreset = syncreset
if shadow_wid:
# inputs
if shadow_wid:
# inputs
@@
-41,7
+42,7
@@
class Shadow(Elaboratable):
m = Module()
s_latches = []
for i in range(self.shadow_wid):
m = Module()
s_latches = []
for i in range(self.shadow_wid):
- sh = ShadowFn()
+ sh = ShadowFn(
self.syncreset
)
setattr(m.submodules, "shadow%d" % i, sh)
s_latches.append(sh)
setattr(m.submodules, "shadow%d" % i, sh)
s_latches.append(sh)
@@
-115,7
+116,8
@@
class ShadowMatrix(Elaboratable):
Unit Matrices by way of over-enabling (ORing) into Go_Read and
Go_Write, resetting every cell that is required to "die"
"""
Unit Matrices by way of over-enabling (ORing) into Go_Read and
Go_Write, resetting every cell that is required to "die"
"""
- def __init__(self, n_fus, shadow_wid=0):
+ def __init__(self, n_fus, shadow_wid=0, syncreset=False):
+ self.syncreset = syncreset
self.n_fus = n_fus
self.shadow_wid = shadow_wid
self.n_fus = n_fus
self.shadow_wid = shadow_wid
@@
-136,7
+138,7
@@
class ShadowMatrix(Elaboratable):
m = Module()
shadows = []
for i in range(self.n_fus):
m = Module()
shadows = []
for i in range(self.n_fus):
- sh = Shadow(self.shadow_wid)
+ sh = Shadow(self.shadow_wid
, self.syncreset
)
setattr(m.submodules, "sh%d" % i, sh)
shadows.append(sh)
# connect shadow/fail/good to all shadows
setattr(m.submodules, "sh%d" % i, sh)
shadows.append(sh)
# connect shadow/fail/good to all shadows