test/spi_mmap: lint and autoformat with Ruff
This commit is contained in:
parent
2e67f6a1a3
commit
4bc47c959f
|
@ -6,22 +6,23 @@
|
||||||
# SPDX-License-Identifier: BSD-2-Clause
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
import unittest
|
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
|
from litex.soc.cores.spi.spi_mmap import SPIMaster
|
||||||
|
|
||||||
|
|
||||||
class TestSPIMMAP(unittest.TestCase):
|
class TestSPIMMAP(unittest.TestCase):
|
||||||
def test_spi_master(self):
|
def test_spi_master(self):
|
||||||
pads = Record([("clk", 1), ("cs_n", 4), ("mosi", 1), ("miso", 1)])
|
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):
|
def generator(dut):
|
||||||
data = [
|
data = [
|
||||||
0x12345678,
|
0x12345678,
|
||||||
0xdeadbeef,
|
0xDEADBEEF,
|
||||||
]
|
]
|
||||||
# data = [
|
# data = [
|
||||||
# 0x80000001,
|
# 0x80000001,
|
||||||
|
|
Loading…
Reference in New Issue