From 4bc47c959fcd8c01a6bfc7cfb762e515d6bf0b22 Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Sun, 25 Feb 2024 09:16:17 +1100 Subject: [PATCH] test/spi_mmap: lint and autoformat with Ruff --- test/test_spi_mmap.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/test_spi_mmap.py b/test/test_spi_mmap.py index 8915eef23..6b08dbb4b 100644 --- a/test/test_spi_mmap.py +++ b/test/test_spi_mmap.py @@ -6,27 +6,28 @@ # SPDX-License-Identifier: BSD-2-Clause import unittest -import random -from migen import * +from migen import Record -from litex.gen.sim import * +from litex.gen.sim import run_simulation from litex.soc.cores.spi.spi_mmap import SPIMaster + class TestSPIMMAP(unittest.TestCase): def test_spi_master(self): pads = Record([("clk", 1), ("cs_n", 4), ("mosi", 1), ("miso", 1)]) - dut = SPIMaster(pads=pads, data_width=32, sys_clk_freq=int(100e6)) + dut = SPIMaster(pads=pads, data_width=32, sys_clk_freq=int(100e6)) + def generator(dut): data = [ 0x12345678, - 0xdeadbeef, + 0xDEADBEEF, ] - #data = [ + # data = [ # 0x80000001, # 0x80000001, - #] + # ] # Config: Mode0, Loopback, Sys-Clk/4 yield dut.loopback.eq(1)