projects
/
nmigen-soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c8849f
)
test in sram for deliberately delaying response
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 4 Aug 2020 18:29:59 +0000
(19:29 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 4 Aug 2020 18:29:59 +0000
(19:29 +0100)
nmigen_soc/wishbone/sram.py
patch
|
blob
|
history
diff --git
a/nmigen_soc/wishbone/sram.py
b/nmigen_soc/wishbone/sram.py
index dbb76155d264dee887df5dc2c9bda7cf03bb012c..22b0efdd330f2af99dc25bcdc0133f95b0e59957 100644
(file)
--- a/
nmigen_soc/wishbone/sram.py
+++ b/
nmigen_soc/wishbone/sram.py
@@
-98,6
+98,13
@@
class SRAM(Elaboratable):
# generate ack
m.d.sync += self.bus.ack.eq(0)
with m.If(self.bus.cyc & self.bus.stb & ~self.bus.ack):
- m.d.sync += self.bus.ack.eq(1)
+ if False: # test which deliberately delays response
+ counter = Signal(3)
+ m.d.sync += counter.eq(counter + 1)
+ with m.If(counter == 7):
+ m.d.sync += self.bus.ack.eq(1)
+ m.d.sync += counter.eq(0)
+ else:
+ m.d.sync += self.bus.ack.eq(1)
return m