com/spi: use .format in tb
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 09:44:05 +0000 (10:44 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 09:44:05 +0000 (10:44 +0100)
misoclib/com/spi/test/spi_master_tb.py

index 32abfd8e39ba55c979d91bf20d41e0788ece3aef..3459a56f701e21764da7dc6ff64b2e650f64303d 100644 (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)
\ No newline at end of file