From: Florent Kermarrec Date: Tue, 3 Mar 2015 09:44:05 +0000 (+0100) Subject: com/spi: use .format in tb X-Git-Tag: 24jan2021_ls180~2512 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c058a52c9a01c5c081388797306f30b2bd21786;p=litex.git com/spi: use .format in tb --- diff --git a/misoclib/com/spi/test/spi_master_tb.py b/misoclib/com/spi/test/spi_master_tb.py index 32abfd8e..3459a56f 100644 --- a/misoclib/com/spi/test/spi_master_tb.py +++ b/misoclib/com/spi/test/spi_master_tb.py @@ -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