com/spi: use .format in tb

This commit is contained in:
Florent Kermarrec 2015-03-03 10:44:05 +01:00
parent 0716dadaf2
commit 7c058a52c9
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ class TB(Module):
yield
self.spi_slave.set_miso(0x123457)
yield from spi_access(selfp, 8, 0x123457)
print("%08x" %self.spi_slave.get_mosi())
print("%08x" %selfp.spi_master._miso.status)
print("{:08x}".format(self.spi_slave.get_mosi()))
print("{:08x}".format(selfp.spi_master._miso.status))
if __name__ == "__main__":
run_simulation(TB(), ncycles=1000, vcd_name="my.vcd", keep_files=True)