# see sync_behaviors.py
# for why we need Settle()
+ # debug print the bus address/data
yield Settle()
yield from print_sig(sram.bus.adr)
yield from print_sig(sram.bus.dat_r, "h")
+ # check the result
+ data = yield sram.bus.dat_r
+ assert data == 0
+
# set necessary signal to read bus
# at address 4
yield sram.bus.we.eq(0)
yield sram.bus.stb.eq(1)
yield
+ # see sync_behaviors.py
+ # for why we need Settle()
+ # debug print the bus address/data
yield Settle()
yield from print_sig(sram.bus.adr)
yield from print_sig(sram.bus.dat_r, "h")
+ # check the result
+ data = yield sram.bus.dat_r
+ assert data == 0xdeadbeef
+
# disable signals
yield sram.bus.cyc.eq(0)
yield sram.bus.stb.eq(0)