From 4a2d2b4881f733134a4299ff1233449460ddeb4d Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sat, 22 Jan 2022 19:28:29 +0100 Subject: [PATCH] Restructured Amaranth code to be able to import sibling modules --- re-bba/.gitignore | 3 +- re-bba/Counter.py | 74 ---------- re-bba/ExiClock.py | 110 -------------- re-bba/LedBlinker.py | 22 --- re-bba/ReBba/Components/Debouncer.py | 39 +++++ re-bba/ReBba/Components/ExiClock.py | 45 ++++++ re-bba/ReBba/Components/ExiDecoder.py | 23 +++ re-bba/ReBba/Components/ExiRequest.py | 51 +++++++ re-bba/ReBba/Components/ShiftRegister.py | 29 ++++ re-bba/ReBba/ExiDecoders/GetId.py | 19 +++ re-bba/{re-bba.py => ReBba/ReBba.py} | 44 ++++-- re-bba/ReBba/TestBenches/DebouncerTb.py | 54 +++++++ re-bba/ReBba/TestBenches/ExiClockTb.py | 48 +++++++ re-bba/ReBba/TestBenches/ExiRequestTb.py | 65 +++++++++ re-bba/ReBba/TestBenches/ShiftRegisterTb.py | 79 ++++++++++ .../TestBenches/SimHelpers/ExiSimHelper.py | 30 ++++ .../{ => ReBba}/amaranth_boards/__init__.py | 0 .../amaranth_boards/alchitry_au.py | 0 .../{ => ReBba}/amaranth_boards/arrow_deca.py | 0 re-bba/{ => ReBba}/amaranth_boards/arty_a7.py | 0 re-bba/{ => ReBba}/amaranth_boards/arty_s7.py | 0 re-bba/{ => ReBba}/amaranth_boards/arty_z7.py | 0 re-bba/{ => ReBba}/amaranth_boards/atlys.py | 0 .../{ => ReBba}/amaranth_boards/blackice.py | 0 .../amaranth_boards/blackice_ii.py | 0 .../amaranth_boards/chameleon96.py | 0 .../amaranth_boards/colorlight_5a75b_r7_0.py | 0 re-bba/{ => ReBba}/amaranth_boards/de0.py | 0 re-bba/{ => ReBba}/amaranth_boards/de0_cv.py | 0 .../{ => ReBba}/amaranth_boards/de10_lite.py | 0 .../{ => ReBba}/amaranth_boards/de10_nano.py | 0 re-bba/{ => ReBba}/amaranth_boards/de1_soc.py | 0 .../{ => ReBba}/amaranth_boards/ebaz4205.py | 0 .../amaranth_boards/ecp5_5g_evn.py | 0 re-bba/{ => ReBba}/amaranth_boards/ecpix5.py | 0 .../amaranth_boards/extensions/__init__.py | 0 .../amaranth_boards/extensions/pmod.py | 0 .../amaranth_boards/fomu_hacker.py | 0 .../{ => ReBba}/amaranth_boards/fomu_pvt.py | 0 .../{ => ReBba}/amaranth_boards/genesys2.py | 0 .../amaranth_boards/ice40_hx1k_blink_evn.py | 0 .../amaranth_boards/ice40_hx8k_b_evn.py | 0 .../amaranth_boards/ice40_up5k_b_evn.py | 0 .../{ => ReBba}/amaranth_boards/icebreaker.py | 0 .../amaranth_boards/icebreaker_bitsy.py | 0 .../{ => ReBba}/amaranth_boards/icestick.py | 0 .../{ => ReBba}/amaranth_boards/icesugar.py | 0 .../amaranth_boards/icesugar_nano.py | 0 re-bba/{ => ReBba}/amaranth_boards/kc705.py | 0 re-bba/{ => ReBba}/amaranth_boards/kcu105.py | 0 .../{ => ReBba}/amaranth_boards/machxo3_sk.py | 0 re-bba/{ => ReBba}/amaranth_boards/mercury.py | 0 .../amaranth_boards/microzed_z010.py | 0 .../amaranth_boards/microzed_z020.py | 0 re-bba/{ => ReBba}/amaranth_boards/mister.py | 0 .../amaranth_boards/nandland_go.py | 0 .../{ => ReBba}/amaranth_boards/nexys4ddr.py | 0 .../amaranth_boards/numato_mimas.py | 0 .../amaranth_boards/orangecrab_r0_1.py | 0 .../amaranth_boards/orangecrab_r0_2.py | 0 .../amaranth_boards/quickfeather.py | 0 .../amaranth_boards/resources/__init__.py | 0 .../amaranth_boards/resources/display.py | 0 .../amaranth_boards/resources/interface.py | 0 .../amaranth_boards/resources/memory.py | 0 .../amaranth_boards/resources/user.py | 0 .../amaranth_boards/rz_easyfpga_a2_2.py | 0 .../{ => ReBba}/amaranth_boards/sk_xc6slx9.py | 0 .../amaranth_boards/supercon19badge.py | 0 .../amaranth_boards/te0714_03_50_2I.py | 0 .../amaranth_boards/test/__init__.py | 0 .../amaranth_boards/test/blinky.py | 0 .../amaranth_boards/tinyfpga_ax1.py | 0 .../amaranth_boards/tinyfpga_ax2.py | 0 .../amaranth_boards/tinyfpga_bx.py | 0 re-bba/{ => ReBba}/amaranth_boards/ulx3s.py | 0 .../{ => ReBba}/amaranth_boards/upduino_v1.py | 0 .../{ => ReBba}/amaranth_boards/upduino_v2.py | 0 .../{ => ReBba}/amaranth_boards/versa_ecp5.py | 0 .../amaranth_boards/versa_ecp5_5g.py | 0 .../amaranth_boards/zturn_lite_z007s.py | 0 .../amaranth_boards/zturn_lite_z010.py | 0 re-bba/ShiftRegister.py | 136 ------------------ .../__pycache__/__init__.cpython-310.pyc | Bin 356 -> 0 bytes .../__pycache__/icebreaker.cpython-310.pyc | Bin 2222 -> 0 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 238 -> 0 bytes .../__pycache__/display.cpython-310.pyc | Bin 1313 -> 0 bytes .../__pycache__/interface.cpython-310.pyc | Bin 4185 -> 0 bytes .../__pycache__/memory.cpython-310.pyc | Bin 5243 -> 0 bytes .../__pycache__/user.cpython-310.pyc | Bin 1516 -> 0 bytes re-bba/setup.py | 3 + 91 files changed, 518 insertions(+), 356 deletions(-) delete mode 100644 re-bba/Counter.py delete mode 100644 re-bba/ExiClock.py delete mode 100644 re-bba/LedBlinker.py create mode 100644 re-bba/ReBba/Components/Debouncer.py create mode 100644 re-bba/ReBba/Components/ExiClock.py create mode 100644 re-bba/ReBba/Components/ExiDecoder.py create mode 100644 re-bba/ReBba/Components/ExiRequest.py create mode 100644 re-bba/ReBba/Components/ShiftRegister.py create mode 100644 re-bba/ReBba/ExiDecoders/GetId.py rename re-bba/{re-bba.py => ReBba/ReBba.py} (60%) create mode 100644 re-bba/ReBba/TestBenches/DebouncerTb.py create mode 100644 re-bba/ReBba/TestBenches/ExiClockTb.py create mode 100644 re-bba/ReBba/TestBenches/ExiRequestTb.py create mode 100644 re-bba/ReBba/TestBenches/ShiftRegisterTb.py create mode 100644 re-bba/ReBba/TestBenches/SimHelpers/ExiSimHelper.py rename re-bba/{ => ReBba}/amaranth_boards/__init__.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/alchitry_au.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/arrow_deca.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/arty_a7.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/arty_s7.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/arty_z7.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/atlys.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/blackice.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/blackice_ii.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/chameleon96.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/colorlight_5a75b_r7_0.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/de0.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/de0_cv.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/de10_lite.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/de10_nano.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/de1_soc.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ebaz4205.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ecp5_5g_evn.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ecpix5.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/extensions/__init__.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/extensions/pmod.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/fomu_hacker.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/fomu_pvt.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/genesys2.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ice40_hx1k_blink_evn.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ice40_hx8k_b_evn.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ice40_up5k_b_evn.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/icebreaker.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/icebreaker_bitsy.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/icestick.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/icesugar.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/icesugar_nano.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/kc705.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/kcu105.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/machxo3_sk.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/mercury.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/microzed_z010.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/microzed_z020.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/mister.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/nandland_go.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/nexys4ddr.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/numato_mimas.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/orangecrab_r0_1.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/orangecrab_r0_2.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/quickfeather.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/resources/__init__.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/resources/display.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/resources/interface.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/resources/memory.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/resources/user.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/rz_easyfpga_a2_2.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/sk_xc6slx9.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/supercon19badge.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/te0714_03_50_2I.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/test/__init__.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/test/blinky.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/tinyfpga_ax1.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/tinyfpga_ax2.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/tinyfpga_bx.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/ulx3s.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/upduino_v1.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/upduino_v2.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/versa_ecp5.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/versa_ecp5_5g.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/zturn_lite_z007s.py (100%) rename re-bba/{ => ReBba}/amaranth_boards/zturn_lite_z010.py (100%) delete mode 100644 re-bba/ShiftRegister.py delete mode 100644 re-bba/amaranth_boards/__pycache__/__init__.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/__pycache__/icebreaker.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/resources/__pycache__/__init__.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/resources/__pycache__/display.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/resources/__pycache__/interface.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/resources/__pycache__/memory.cpython-310.pyc delete mode 100644 re-bba/amaranth_boards/resources/__pycache__/user.cpython-310.pyc create mode 100644 re-bba/setup.py diff --git a/re-bba/.gitignore b/re-bba/.gitignore index e632d54..dc0d13e 100644 --- a/re-bba/.gitignore +++ b/re-bba/.gitignore @@ -1,3 +1,4 @@ *.vcd *.v -**/__pycache__ \ No newline at end of file +**/__pycache__ +venv diff --git a/re-bba/Counter.py b/re-bba/Counter.py deleted file mode 100644 index e0b5d57..0000000 --- a/re-bba/Counter.py +++ /dev/null @@ -1,74 +0,0 @@ -from amaranth import * - -class UpCounter(Elaboratable): - """ - A 16-bit up counter with a fixed limit. - - Parameters - ---------- - limit : int - The value at which the counter overflows. - - Attributes - ---------- - en : Signal, in - The counter is incremented if ``en`` is asserted, and retains - its value otherwise. - ovf : Signal, out - ``ovf`` is asserted when the counter reaches its limit. - """ - def __init__(self, limit): - self.limit = limit - - # Ports - self.en = Signal() - self.ovf = Signal() - - # State - self.count = Signal(16) - - def elaborate(self, platform): - m = Module() - - m.d.comb += self.ovf.eq(self.count == self.limit) - - with m.If(self.en): - with m.If(self.ovf): - m.d.sync += self.count.eq(0) - with m.Else(): - m.d.sync += self.count.eq(self.count + 1) - - return m - -from amaranth.sim import Simulator - -dut = UpCounter(25) -def bench(): - # Disabled counter should not overflow. - yield dut.en.eq(0) - for _ in range(30): - yield - assert not (yield dut.ovf) - - # Once enabled, the counter should overflow in 25 cycles. - yield dut.en.eq(1) - for _ in range(25): - yield - assert not (yield dut.ovf) - yield - assert (yield dut.ovf) - - # The overflow should clear in one cycle. - yield - assert not (yield dut.ovf) - - -sim = Simulator(dut) -sim.add_clock(1e-6) # 1 MHz -sim.add_sync_process(bench) -with sim.write_vcd("up_counter.vcd"): - sim.run() - -from amaranth_boards.icebreaker import * - -ICEBreakerPlatform().build(UpCounter(25), do_program=True) \ No newline at end of file diff --git a/re-bba/ExiClock.py b/re-bba/ExiClock.py deleted file mode 100644 index 0159893..0000000 --- a/re-bba/ExiClock.py +++ /dev/null @@ -1,110 +0,0 @@ - -import enum -import sys -import os - -from amaranth.build import Platform -from amaranth import * -from amaranth.sim import Simulator - -class ClockState(enum.Enum): - LOW = 0 - FALLING = 1 - HIGH = 2 - RISING = 3 - -class ExiClock(Elaboratable): - - def __init__(self): - # Ports - self.exiClk = Signal() - self.exiClkState = Signal(2) - - # State - self.prevExiClkValid = Signal() - self.prevExiClk = Signal() - self.prevExiClkState = Signal(2) - - - def elaborate(self, platform: Platform): - m = Module() - - with m.If(self.prevExiClkValid): - with m.If(self.prevExiClkState == ClockState.FALLING): - m.d.comb += self.exiClkState.eq(ClockState.LOW) - with m.Elif(self.prevExiClkState == ClockState.RISING): - m.d.comb += self.exiClkState.eq(ClockState.HIGH) - with m.Else(): - with m.If(self.prevExiClk ^ self.exiClk): - m.d.comb += self.exiClkState.eq(Cat(1, self.exiClk)) - with m.Else(): - m.d.comb += self.exiClkState.eq(Cat(0, self.exiClk)) - - m.d.sync += self.prevExiClkState.eq(self.exiClkState) - - m.d.sync += self.prevExiClk.eq(self.exiClk) - m.d.sync += self.prevExiClkValid.eq(1) - - return m - -##### -# TestBench -##### -class TestBench: - def __init__(self): - pass - - def FlipExiClock(self, dut): - yield dut.exiClk.eq(~dut.exiClk) - - def clockTest(self): - dut = self.dut - - yield dut.exiClk.eq(0) - yield - yield from self.FlipExiClock(dut) - yield - assert (yield dut.exiClkState) == ClockState.RISING.value - yield - assert (yield dut.exiClkState) == ClockState.HIGH.value - yield - yield from self.FlipExiClock(dut) - yield - assert (yield dut.exiClkState) == ClockState.FALLING.value - yield - assert (yield dut.exiClkState) == ClockState.LOW.value - yield - - - def simulate(self): - self.dut = ExiClock() - - sim = Simulator(self.dut) - sim.add_clock(1e-6) # 1 MHz - sim.add_sync_process(self.clockTest) - - with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ExiClock.vcd"): - sim.run() - -##### -# Main portion -##### - -def main(): - if(len(sys.argv) == 2): - - if sys.argv[1] == "s": - bench = TestBench() - bench.simulate() - - if sys.argv[1] == "v": - mod = ExiClock() - with open(os.path.dirname(os.path.abspath(__file__)) + "/ExiClock.v", "w") as f: - f.write(verilog.convert(mod, ports=[mod.exiClk, mod.exiClkState])) - - else: - bench = TestBench() - bench.simulate() - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/re-bba/LedBlinker.py b/re-bba/LedBlinker.py deleted file mode 100644 index b5f44ed..0000000 --- a/re-bba/LedBlinker.py +++ /dev/null @@ -1,22 +0,0 @@ -from amaranth import * - -class LEDBlinker(Elaboratable): - def elaborate(self, platform): - m = Module() - - led = platform.request("led") - - half_freq = int(platform.default_clk_frequency // 2) - timer = Signal(range(half_freq + 1)) - - with m.If(timer == half_freq): - m.d.sync += led.eq(~led) - m.d.sync += timer.eq(0) - with m.Else(): - m.d.sync += timer.eq(timer + 1) - - return m - -from amaranth_boards.icebreaker import * - -ICEBreakerPlatform().build(LEDBlinker(), do_program=True) \ No newline at end of file diff --git a/re-bba/ReBba/Components/Debouncer.py b/re-bba/ReBba/Components/Debouncer.py new file mode 100644 index 0000000..101f0c5 --- /dev/null +++ b/re-bba/ReBba/Components/Debouncer.py @@ -0,0 +1,39 @@ + +from amaranth.build import Platform +from amaranth import * + +class Debouncer(Elaboratable): + + def __init__(self, cycles: int): + #signals + self.input = Signal() + self.output = Signal() + + #state + self.count = Signal(range(0, cycles+1), reset=cycles) + self.state = Signal() + self.prevInValid = Signal() + self.prevIn = Signal() + + def elaborate(self, platform: Platform): + m = Module() + + with m.If(self.prevInValid): + with m.If(self.count == 0): + with m.If(self.prevIn ^ self.input): + m.d.sync += self.count.eq(self.count.reset) + m.d.sync += self.state.eq(self.input) + with m.Elif(self.input == self.state): + m.d.sync += self.count.eq(self.count.reset) + m.d.sync += self.state.eq(self.input) + with m.Else(): + m.d.sync += self.count.eq(self.count - 1) + with m.Else(): + m.d.sync += self.count.eq(0) + m.d.sync += self.prevInValid.eq(Const(1)) + m.d.sync += self.state.eq(self.input) + + m.d.sync += self.prevIn.eq(self.input) + m.d.comb += self.output.eq(self.state) + + return m \ No newline at end of file diff --git a/re-bba/ReBba/Components/ExiClock.py b/re-bba/ReBba/Components/ExiClock.py new file mode 100644 index 0000000..855a81e --- /dev/null +++ b/re-bba/ReBba/Components/ExiClock.py @@ -0,0 +1,45 @@ + +import enum + +from amaranth.build import Platform +from amaranth import * + +class ClockState(enum.Enum): + LOW = 0 + FALLING = 1 + HIGH = 2 + RISING = 3 + +class ExiClock(Elaboratable): + + def __init__(self): + # Ports + self.exiClk = Signal() + self.exiClkState = Signal(2) + + # State + self.prevExiClkValid = Signal() + self.prevExiClk = Signal() + self.prevExiClkState = Signal(2) + + + def elaborate(self, platform: Platform): + m = Module() + + with m.If(self.prevExiClkValid): + with m.If(self.prevExiClkState == ClockState.FALLING): + m.d.comb += self.exiClkState.eq(ClockState.LOW) + with m.Elif(self.prevExiClkState == ClockState.RISING): + m.d.comb += self.exiClkState.eq(ClockState.HIGH) + with m.Else(): + with m.If(self.prevExiClk ^ self.exiClk): + m.d.comb += self.exiClkState.eq(Cat(1, self.exiClk)) + with m.Else(): + m.d.comb += self.exiClkState.eq(Cat(0, self.exiClk)) + + m.d.sync += self.prevExiClkState.eq(self.exiClkState) + + m.d.sync += self.prevExiClk.eq(self.exiClk) + m.d.sync += self.prevExiClkValid.eq(1) + + return m \ No newline at end of file diff --git a/re-bba/ReBba/Components/ExiDecoder.py b/re-bba/ReBba/Components/ExiDecoder.py new file mode 100644 index 0000000..f0b441e --- /dev/null +++ b/re-bba/ReBba/Components/ExiDecoder.py @@ -0,0 +1,23 @@ +from amaranth.build import Platform +from amaranth import * + +from ExiDecoders.GetId import GetId + +class ExiDecoder(Elaboratable): + + def __init__(self): + #ports + self.request = Signal(16) + self.request_type = Signal(1) + #state + + def elaborate(self, platform: Platform): + m = Module() + + getId = GetId() + m.submodules += getId + + m.d.comb += getId.request.eq(self.request) + m.d.comb += self.request_type[0].eq(getId.isGetId) + + return m \ No newline at end of file diff --git a/re-bba/ReBba/Components/ExiRequest.py b/re-bba/ReBba/Components/ExiRequest.py new file mode 100644 index 0000000..eed9cf6 --- /dev/null +++ b/re-bba/ReBba/Components/ExiRequest.py @@ -0,0 +1,51 @@ + +from ReBba.Components.ShiftRegister import ShiftRegister +from ReBba.Components.ExiClock import ClockState + +from amaranth import Const, Elaboratable, Module, Signal +from amaranth.build import Platform + + +class ExiRequest(Elaboratable): + + def __init__(self): + #ports + self.request = Signal(16) + self.nen = Signal(1) + self.rst = Signal(1) + self.exiClkState = Signal(2) + self.exiIn = Signal(1) + self.requestComplete = Signal(1) + + #state + self.disableShift = Signal(1, reset=0) + self.shiftRegister = ShiftRegister(16) + self.clockCount = Signal(5, reset=0) + + def elaborate(self, platform: Platform): + m = Module() + + m.submodules += self.shiftRegister + + m.d.comb += self.request.eq(self.shiftRegister.data) + m.d.comb += self.shiftRegister.inb.eq(self.exiIn) + m.d.comb += self.shiftRegister.exiClkState.eq(self.exiClkState) + m.d.comb += self.shiftRegister.nen.eq(self.disableShift) + + with m.If(~self.nen): + with m.If(self.clockCount != 16): + with m.If(self.exiClkState == ClockState.FALLING): + m.d.sync += self.clockCount.eq(self.clockCount + 1) + + with m.If(self.clockCount == 16): + m.d.comb += self.disableShift.eq(Const(1)) + m.d.comb += self.requestComplete.eq(Const(1)) + + with m.If(self.rst): + m.d.comb += self.request.eq(self.request.reset) + m.d.sync += self.clockCount.eq(self.clockCount.reset) + m.d.comb += self.disableShift.eq(self.disableShift.reset) + + m.d.comb += self.shiftRegister.rst.eq(self.rst) + + return m \ No newline at end of file diff --git a/re-bba/ReBba/Components/ShiftRegister.py b/re-bba/ReBba/Components/ShiftRegister.py new file mode 100644 index 0000000..83b5b08 --- /dev/null +++ b/re-bba/ReBba/Components/ShiftRegister.py @@ -0,0 +1,29 @@ + +from ReBba.Components.ExiClock import ClockState + +from amaranth import * +from amaranth.build import Platform + +class ShiftRegister(Elaboratable): + def __init__(self, width): + self.width = width + + # Ports + self.nen = Signal() + self.exiClkState = Signal(2) + self.rst = Signal() + self.inb = Signal() + self.data = Signal(self.width, reset=0) + + def elaborate(self, platform: Platform): + m = Module() + + with m.If(self.rst): + m.d.sync += self.data.eq(self.data.reset) + + with m.If(~self.nen): + with m.If(self.exiClkState == ClockState.FALLING): + m.d.sync += self.data.eq(self.data.shift_left(1) | self.inb ) + + return m + diff --git a/re-bba/ReBba/ExiDecoders/GetId.py b/re-bba/ReBba/ExiDecoders/GetId.py new file mode 100644 index 0000000..bab5812 --- /dev/null +++ b/re-bba/ReBba/ExiDecoders/GetId.py @@ -0,0 +1,19 @@ +from amaranth.build import Platform +from amaranth import Signal, Const, Module, Elaboratable + +class GetId(Elaboratable): + + def __init__(self): + self.request = Signal(16) + self.isGetId = Signal() + pass + + def elaborate(self, platform: Platform): + m = Module() + + with m.If(self.request == 0): + m.d.comb += self.isGetId.eq(Const(1)) + with m.Else(): + m.d.comb += self.isGetId.eq(Const(0)) + + return m \ No newline at end of file diff --git a/re-bba/re-bba.py b/re-bba/ReBba/ReBba.py similarity index 60% rename from re-bba/re-bba.py rename to re-bba/ReBba/ReBba.py index dc7f5b1..0d3e3d1 100644 --- a/re-bba/re-bba.py +++ b/re-bba/ReBba/ReBba.py @@ -7,7 +7,9 @@ from amaranth.sim import Simulator from amaranth_boards.icebreaker import * from ExiClock import ExiClock -from ShiftRegister import ShiftRegister +from ExiRequest import ExiRequest +from Debouncer import Debouncer +from ExiDecoder import ExiDecoder class ReBba(Elaboratable): def __init__(self): @@ -16,6 +18,9 @@ class ReBba(Elaboratable): def elaborate(self, platform: Platform): m = Module() + uledg = platform.request("led_g", 0) + uledr = platform.request("led_r", 0) + led1 = platform.request("led_g", 1) led2 = platform.request("led_g", 4) led3 = platform.request("led_g", 2) @@ -26,23 +31,36 @@ class ReBba(Elaboratable): btn2 = platform.request("button", 2) btn3 = platform.request("button", 3) + debounce1 = Debouncer(10000) + m.submodules += debounce1 + + m.d.comb += debounce1.input.eq(btn3) + exiClk = ExiClock() m.submodules += exiClk - sr = ShiftRegister(5) - m.submodules += sr + + m.d.comb += exiClk.exiClk.eq(debounce1.output) + + exiReq = ExiRequest() + m.submodules += exiReq - m.d.comb += led1.eq(sr.data[0]) - m.d.comb += led2.eq(sr.data[1]) - m.d.comb += led3.eq(sr.data[2]) - m.d.comb += led4.eq(sr.data[3]) - m.d.comb += led5.eq(sr.data[4]) + m.d.comb += exiReq.exiClkState.eq(exiClk.exiClkState) + m.d.comb += exiReq.exiIn.eq(btn1) + m.d.comb += exiReq.rst.eq(btn2) - m.d.comb += exiClk.exiClk.eq(btn3) + m.d.comb += led1.eq(exiReq.request[0]) + m.d.comb += led2.eq(exiReq.request[1]) + m.d.comb += led3.eq(exiReq.request[2]) + m.d.comb += led4.eq(exiReq.request[3]) - m.d.comb += sr.rst.eq(btn2) - m.d.comb += sr.inb.eq(btn1) - m.d.comb += sr.nen.eq(Const(0)) - m.d.comb += sr.exiClkState.eq(exiClk.exiClkState) + m.d.comb += led5.eq(exiReq.requestComplete) + + exiDec = ExiDecoder() + m.submodules += exiDec + + m.d.comb += exiDec.request.eq(exiReq.request) + m.d.comb += uledr.eq(exiDec.request_type[0]) + m.d.comb += uledg.eq(exiReq.requestComplete) return m diff --git a/re-bba/ReBba/TestBenches/DebouncerTb.py b/re-bba/ReBba/TestBenches/DebouncerTb.py new file mode 100644 index 0000000..8fe42ea --- /dev/null +++ b/re-bba/ReBba/TestBenches/DebouncerTb.py @@ -0,0 +1,54 @@ +from ReBba.Components.Debouncer import Debouncer + +from amaranth import Const +from amaranth.sim import Simulator + +import os + +class TestBench: + def __init__(self): + pass + + def holdTest(self): + dut = self.dut + yield + yield + + yield dut.input.eq(Const(1)) + yield + yield dut.input.eq(Const(0)) + yield + + for _ in range(5): + assert(yield(dut.output) == 1) + yield + + yield dut.input.eq(Const(1)) + yield + yield dut.input.eq(Const(0)) + yield + + for _ in range(16): + assert(yield(dut.output) == 1) + yield + + assert(yield(dut.output) == 0) + yield + yield + + def simulate(self): + self.dut = Debouncer(15) + + sim = Simulator(self.dut) + sim.add_clock(1e-6) # 1 MHz + sim.add_sync_process(self.holdTest) + + with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/Debouncer.vcd"): + sim.run() + +def main(): + bench = TestBench() + bench.simulate() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/re-bba/ReBba/TestBenches/ExiClockTb.py b/re-bba/ReBba/TestBenches/ExiClockTb.py new file mode 100644 index 0000000..8d40059 --- /dev/null +++ b/re-bba/ReBba/TestBenches/ExiClockTb.py @@ -0,0 +1,48 @@ +from ReBba.Components.ExiClock import ClockState, ExiClock +from ReBba.TestBenches.SimHelpers.ExiSimHelper import exiClockCycle + +from amaranth.sim import Simulator + +import os + +class TestBench: + def __init__(self): + pass + + def FlipExiClock(self, dut): + yield dut.exiClk.eq(~dut.exiClk) + + def clockTest(self): + dut = self.dut + + yield dut.exiClk.eq(0) + yield + yield from self.FlipExiClock(dut) + yield + assert (yield dut.exiClkState) == ClockState.RISING.value + yield + assert (yield dut.exiClkState) == ClockState.HIGH.value + yield + yield from self.FlipExiClock(dut) + yield + assert (yield dut.exiClkState) == ClockState.FALLING.value + yield + assert (yield dut.exiClkState) == ClockState.LOW.value + yield + + def simulate(self): + self.dut = ExiClock() + + sim = Simulator(self.dut) + sim.add_clock(1e-6) # 1 MHz + sim.add_sync_process(self.clockTest) + + with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ExiClock.vcd"): + sim.run() + +def main(): + bench = TestBench() + bench.simulate() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/re-bba/ReBba/TestBenches/ExiRequestTb.py b/re-bba/ReBba/TestBenches/ExiRequestTb.py new file mode 100644 index 0000000..c837df0 --- /dev/null +++ b/re-bba/ReBba/TestBenches/ExiRequestTb.py @@ -0,0 +1,65 @@ +from ReBba.Components.ExiRequest import ExiRequest + +from SimHelpers.ExiSimHelper import exiClockCycle, resetDut + +from amaranth import Const +from amaranth.sim import Simulator + +import os + +class TestBench: + def __init__(self): + pass + + def requestTest(self): + dut = self.dut + + yield dut.nen.eq(Const(0)) + + def afterLow0(): + assert((yield dut.requestComplete) == 0) + + def afterLow1(): + assert((yield dut.requestComplete) == 1) + + + for i in range(15): + yield dut.exiIn.eq(~dut.exiIn) + yield from exiClockCycle(dut.exiClkState, AfterLow=afterLow0) + + yield dut.exiIn.eq(~dut.exiIn) + yield from exiClockCycle(dut.exiClkState, AfterLow=afterLow1) + + assert((yield dut.requestComplete) == 1) + yield from exiClockCycle(dut.exiClkState) + assert((yield dut.requestComplete) == 1) + + yield from resetDut(dut.rst) + + for i in range(15): + yield dut.exiIn.eq(~dut.exiIn) + yield from exiClockCycle(dut.exiClkState, AfterLow=afterLow0) + + yield dut.exiIn.eq(~dut.exiIn) + yield from exiClockCycle(dut.exiClkState, AfterLow=afterLow1) + + def simulate(self): + self.dut = ExiRequest() + + sim = Simulator(self.dut) + sim.add_clock(1e-6) # 1 MHz + sim.add_sync_process(self.requestTest) + + with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ExiRequest.vcd"): + sim.run() + +##### +# Main portion +##### + +def main(): + bench = TestBench() + bench.simulate() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/re-bba/ReBba/TestBenches/ShiftRegisterTb.py b/re-bba/ReBba/TestBenches/ShiftRegisterTb.py new file mode 100644 index 0000000..0e4c5ce --- /dev/null +++ b/re-bba/ReBba/TestBenches/ShiftRegisterTb.py @@ -0,0 +1,79 @@ +from amaranth import Elaboratable +from ReBba.Components.ShiftRegister import ShiftRegister + +from ReBba.TestBenches.SimHelpers.ExiSimHelper import exiClockCycle + +from amaranth.sim import Simulator + +import os + +class TestBench: + def __init__(self): + pass + + def enabled_test(self): + dut = self.dut + + def afterAny(): + assert not (yield dut.data) + + # Disabled ShiftRegister should not Change. + yield dut.nen.eq(1) + for _ in range(10): + yield dut.inb.eq(~dut.inb) + yield from exiClockCycle(dut.exiClkState, AfterHigh=afterAny, AfterFalling=afterAny, AfterLow=afterAny, AfterRising=afterAny) + + def normal_operation(self): + dut = self.dut + + def oracle(i): + if i == 0: return 0x01 + if i == 1: return 0x02 + if i == 2: return 0x05 + if i == 3: return 0x0A + if i == 4: return 0x15 + if i == 5: return 0x2A + if i == 6: return 0x55 + if i == 7: return 0xAA + if i == 8: return 0x55 + if i == 9: return 0xAA + + expectedOutput = 0 + + def afterLow(): + assert (yield dut.data) == expectedOutput + + yield dut.nen.eq(0) + for i in range(10): + expectedOutput = oracle(i) + yield dut.inb.eq(~dut.inb) + yield from exiClockCycle(dut.exiClkState, AfterLow=afterLow) + + def simulate(self): + self.dut = ShiftRegister(8) + + sim = Simulator(self.dut) + sim.add_clock(1e-6) # 1 MHz + sim.add_sync_process(self.enabled_test) + + with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ShiftRegister_enable.vcd"): + sim.run() + + self.dut = ShiftRegister(8) + + sim = Simulator(self.dut) + sim.add_clock(1e-6) # 1 MHz + sim.add_sync_process(self.normal_operation) + + with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ShiftRegister_shift.vcd"): + sim.run() + +def main(): + bench = TestBench() + bench.simulate() + +if __name__ == "__main__": + main() + + + diff --git a/re-bba/ReBba/TestBenches/SimHelpers/ExiSimHelper.py b/re-bba/ReBba/TestBenches/SimHelpers/ExiSimHelper.py new file mode 100644 index 0000000..9acb6d8 --- /dev/null +++ b/re-bba/ReBba/TestBenches/SimHelpers/ExiSimHelper.py @@ -0,0 +1,30 @@ +from typing import Callable +from ReBba.Components.ExiClock import ClockState +from amaranth import Const, Elaboratable, Signal + +def empty(): + yield None + +def exiClockCycle(exiClock: Signal, AfterHigh: Callable = empty, AfterFalling: Callable = empty, AfterLow: Callable = empty, AfterRising: Callable = empty): + yield exiClock.eq(ClockState.HIGH) + yield + yield from AfterHigh() + yield + + yield exiClock.eq(ClockState.FALLING) + yield from AfterFalling() + + yield exiClock.eq(ClockState.LOW) + yield + yield from AfterLow() + yield + + yield exiClock.eq(ClockState.RISING) + yield from AfterRising() + +def resetDut(rst: Signal): + yield + yield rst.eq(Const(1)) + yield + yield rst.eq(Const(0)) + yield \ No newline at end of file diff --git a/re-bba/amaranth_boards/__init__.py b/re-bba/ReBba/amaranth_boards/__init__.py similarity index 100% rename from re-bba/amaranth_boards/__init__.py rename to re-bba/ReBba/amaranth_boards/__init__.py diff --git a/re-bba/amaranth_boards/alchitry_au.py b/re-bba/ReBba/amaranth_boards/alchitry_au.py similarity index 100% rename from re-bba/amaranth_boards/alchitry_au.py rename to re-bba/ReBba/amaranth_boards/alchitry_au.py diff --git a/re-bba/amaranth_boards/arrow_deca.py b/re-bba/ReBba/amaranth_boards/arrow_deca.py similarity index 100% rename from re-bba/amaranth_boards/arrow_deca.py rename to re-bba/ReBba/amaranth_boards/arrow_deca.py diff --git a/re-bba/amaranth_boards/arty_a7.py b/re-bba/ReBba/amaranth_boards/arty_a7.py similarity index 100% rename from re-bba/amaranth_boards/arty_a7.py rename to re-bba/ReBba/amaranth_boards/arty_a7.py diff --git a/re-bba/amaranth_boards/arty_s7.py b/re-bba/ReBba/amaranth_boards/arty_s7.py similarity index 100% rename from re-bba/amaranth_boards/arty_s7.py rename to re-bba/ReBba/amaranth_boards/arty_s7.py diff --git a/re-bba/amaranth_boards/arty_z7.py b/re-bba/ReBba/amaranth_boards/arty_z7.py similarity index 100% rename from re-bba/amaranth_boards/arty_z7.py rename to re-bba/ReBba/amaranth_boards/arty_z7.py diff --git a/re-bba/amaranth_boards/atlys.py b/re-bba/ReBba/amaranth_boards/atlys.py similarity index 100% rename from re-bba/amaranth_boards/atlys.py rename to re-bba/ReBba/amaranth_boards/atlys.py diff --git a/re-bba/amaranth_boards/blackice.py b/re-bba/ReBba/amaranth_boards/blackice.py similarity index 100% rename from re-bba/amaranth_boards/blackice.py rename to re-bba/ReBba/amaranth_boards/blackice.py diff --git a/re-bba/amaranth_boards/blackice_ii.py b/re-bba/ReBba/amaranth_boards/blackice_ii.py similarity index 100% rename from re-bba/amaranth_boards/blackice_ii.py rename to re-bba/ReBba/amaranth_boards/blackice_ii.py diff --git a/re-bba/amaranth_boards/chameleon96.py b/re-bba/ReBba/amaranth_boards/chameleon96.py similarity index 100% rename from re-bba/amaranth_boards/chameleon96.py rename to re-bba/ReBba/amaranth_boards/chameleon96.py diff --git a/re-bba/amaranth_boards/colorlight_5a75b_r7_0.py b/re-bba/ReBba/amaranth_boards/colorlight_5a75b_r7_0.py similarity index 100% rename from re-bba/amaranth_boards/colorlight_5a75b_r7_0.py rename to re-bba/ReBba/amaranth_boards/colorlight_5a75b_r7_0.py diff --git a/re-bba/amaranth_boards/de0.py b/re-bba/ReBba/amaranth_boards/de0.py similarity index 100% rename from re-bba/amaranth_boards/de0.py rename to re-bba/ReBba/amaranth_boards/de0.py diff --git a/re-bba/amaranth_boards/de0_cv.py b/re-bba/ReBba/amaranth_boards/de0_cv.py similarity index 100% rename from re-bba/amaranth_boards/de0_cv.py rename to re-bba/ReBba/amaranth_boards/de0_cv.py diff --git a/re-bba/amaranth_boards/de10_lite.py b/re-bba/ReBba/amaranth_boards/de10_lite.py similarity index 100% rename from re-bba/amaranth_boards/de10_lite.py rename to re-bba/ReBba/amaranth_boards/de10_lite.py diff --git a/re-bba/amaranth_boards/de10_nano.py b/re-bba/ReBba/amaranth_boards/de10_nano.py similarity index 100% rename from re-bba/amaranth_boards/de10_nano.py rename to re-bba/ReBba/amaranth_boards/de10_nano.py diff --git a/re-bba/amaranth_boards/de1_soc.py b/re-bba/ReBba/amaranth_boards/de1_soc.py similarity index 100% rename from re-bba/amaranth_boards/de1_soc.py rename to re-bba/ReBba/amaranth_boards/de1_soc.py diff --git a/re-bba/amaranth_boards/ebaz4205.py b/re-bba/ReBba/amaranth_boards/ebaz4205.py similarity index 100% rename from re-bba/amaranth_boards/ebaz4205.py rename to re-bba/ReBba/amaranth_boards/ebaz4205.py diff --git a/re-bba/amaranth_boards/ecp5_5g_evn.py b/re-bba/ReBba/amaranth_boards/ecp5_5g_evn.py similarity index 100% rename from re-bba/amaranth_boards/ecp5_5g_evn.py rename to re-bba/ReBba/amaranth_boards/ecp5_5g_evn.py diff --git a/re-bba/amaranth_boards/ecpix5.py b/re-bba/ReBba/amaranth_boards/ecpix5.py similarity index 100% rename from re-bba/amaranth_boards/ecpix5.py rename to re-bba/ReBba/amaranth_boards/ecpix5.py diff --git a/re-bba/amaranth_boards/extensions/__init__.py b/re-bba/ReBba/amaranth_boards/extensions/__init__.py similarity index 100% rename from re-bba/amaranth_boards/extensions/__init__.py rename to re-bba/ReBba/amaranth_boards/extensions/__init__.py diff --git a/re-bba/amaranth_boards/extensions/pmod.py b/re-bba/ReBba/amaranth_boards/extensions/pmod.py similarity index 100% rename from re-bba/amaranth_boards/extensions/pmod.py rename to re-bba/ReBba/amaranth_boards/extensions/pmod.py diff --git a/re-bba/amaranth_boards/fomu_hacker.py b/re-bba/ReBba/amaranth_boards/fomu_hacker.py similarity index 100% rename from re-bba/amaranth_boards/fomu_hacker.py rename to re-bba/ReBba/amaranth_boards/fomu_hacker.py diff --git a/re-bba/amaranth_boards/fomu_pvt.py b/re-bba/ReBba/amaranth_boards/fomu_pvt.py similarity index 100% rename from re-bba/amaranth_boards/fomu_pvt.py rename to re-bba/ReBba/amaranth_boards/fomu_pvt.py diff --git a/re-bba/amaranth_boards/genesys2.py b/re-bba/ReBba/amaranth_boards/genesys2.py similarity index 100% rename from re-bba/amaranth_boards/genesys2.py rename to re-bba/ReBba/amaranth_boards/genesys2.py diff --git a/re-bba/amaranth_boards/ice40_hx1k_blink_evn.py b/re-bba/ReBba/amaranth_boards/ice40_hx1k_blink_evn.py similarity index 100% rename from re-bba/amaranth_boards/ice40_hx1k_blink_evn.py rename to re-bba/ReBba/amaranth_boards/ice40_hx1k_blink_evn.py diff --git a/re-bba/amaranth_boards/ice40_hx8k_b_evn.py b/re-bba/ReBba/amaranth_boards/ice40_hx8k_b_evn.py similarity index 100% rename from re-bba/amaranth_boards/ice40_hx8k_b_evn.py rename to re-bba/ReBba/amaranth_boards/ice40_hx8k_b_evn.py diff --git a/re-bba/amaranth_boards/ice40_up5k_b_evn.py b/re-bba/ReBba/amaranth_boards/ice40_up5k_b_evn.py similarity index 100% rename from re-bba/amaranth_boards/ice40_up5k_b_evn.py rename to re-bba/ReBba/amaranth_boards/ice40_up5k_b_evn.py diff --git a/re-bba/amaranth_boards/icebreaker.py b/re-bba/ReBba/amaranth_boards/icebreaker.py similarity index 100% rename from re-bba/amaranth_boards/icebreaker.py rename to re-bba/ReBba/amaranth_boards/icebreaker.py diff --git a/re-bba/amaranth_boards/icebreaker_bitsy.py b/re-bba/ReBba/amaranth_boards/icebreaker_bitsy.py similarity index 100% rename from re-bba/amaranth_boards/icebreaker_bitsy.py rename to re-bba/ReBba/amaranth_boards/icebreaker_bitsy.py diff --git a/re-bba/amaranth_boards/icestick.py b/re-bba/ReBba/amaranth_boards/icestick.py similarity index 100% rename from re-bba/amaranth_boards/icestick.py rename to re-bba/ReBba/amaranth_boards/icestick.py diff --git a/re-bba/amaranth_boards/icesugar.py b/re-bba/ReBba/amaranth_boards/icesugar.py similarity index 100% rename from re-bba/amaranth_boards/icesugar.py rename to re-bba/ReBba/amaranth_boards/icesugar.py diff --git a/re-bba/amaranth_boards/icesugar_nano.py b/re-bba/ReBba/amaranth_boards/icesugar_nano.py similarity index 100% rename from re-bba/amaranth_boards/icesugar_nano.py rename to re-bba/ReBba/amaranth_boards/icesugar_nano.py diff --git a/re-bba/amaranth_boards/kc705.py b/re-bba/ReBba/amaranth_boards/kc705.py similarity index 100% rename from re-bba/amaranth_boards/kc705.py rename to re-bba/ReBba/amaranth_boards/kc705.py diff --git a/re-bba/amaranth_boards/kcu105.py b/re-bba/ReBba/amaranth_boards/kcu105.py similarity index 100% rename from re-bba/amaranth_boards/kcu105.py rename to re-bba/ReBba/amaranth_boards/kcu105.py diff --git a/re-bba/amaranth_boards/machxo3_sk.py b/re-bba/ReBba/amaranth_boards/machxo3_sk.py similarity index 100% rename from re-bba/amaranth_boards/machxo3_sk.py rename to re-bba/ReBba/amaranth_boards/machxo3_sk.py diff --git a/re-bba/amaranth_boards/mercury.py b/re-bba/ReBba/amaranth_boards/mercury.py similarity index 100% rename from re-bba/amaranth_boards/mercury.py rename to re-bba/ReBba/amaranth_boards/mercury.py diff --git a/re-bba/amaranth_boards/microzed_z010.py b/re-bba/ReBba/amaranth_boards/microzed_z010.py similarity index 100% rename from re-bba/amaranth_boards/microzed_z010.py rename to re-bba/ReBba/amaranth_boards/microzed_z010.py diff --git a/re-bba/amaranth_boards/microzed_z020.py b/re-bba/ReBba/amaranth_boards/microzed_z020.py similarity index 100% rename from re-bba/amaranth_boards/microzed_z020.py rename to re-bba/ReBba/amaranth_boards/microzed_z020.py diff --git a/re-bba/amaranth_boards/mister.py b/re-bba/ReBba/amaranth_boards/mister.py similarity index 100% rename from re-bba/amaranth_boards/mister.py rename to re-bba/ReBba/amaranth_boards/mister.py diff --git a/re-bba/amaranth_boards/nandland_go.py b/re-bba/ReBba/amaranth_boards/nandland_go.py similarity index 100% rename from re-bba/amaranth_boards/nandland_go.py rename to re-bba/ReBba/amaranth_boards/nandland_go.py diff --git a/re-bba/amaranth_boards/nexys4ddr.py b/re-bba/ReBba/amaranth_boards/nexys4ddr.py similarity index 100% rename from re-bba/amaranth_boards/nexys4ddr.py rename to re-bba/ReBba/amaranth_boards/nexys4ddr.py diff --git a/re-bba/amaranth_boards/numato_mimas.py b/re-bba/ReBba/amaranth_boards/numato_mimas.py similarity index 100% rename from re-bba/amaranth_boards/numato_mimas.py rename to re-bba/ReBba/amaranth_boards/numato_mimas.py diff --git a/re-bba/amaranth_boards/orangecrab_r0_1.py b/re-bba/ReBba/amaranth_boards/orangecrab_r0_1.py similarity index 100% rename from re-bba/amaranth_boards/orangecrab_r0_1.py rename to re-bba/ReBba/amaranth_boards/orangecrab_r0_1.py diff --git a/re-bba/amaranth_boards/orangecrab_r0_2.py b/re-bba/ReBba/amaranth_boards/orangecrab_r0_2.py similarity index 100% rename from re-bba/amaranth_boards/orangecrab_r0_2.py rename to re-bba/ReBba/amaranth_boards/orangecrab_r0_2.py diff --git a/re-bba/amaranth_boards/quickfeather.py b/re-bba/ReBba/amaranth_boards/quickfeather.py similarity index 100% rename from re-bba/amaranth_boards/quickfeather.py rename to re-bba/ReBba/amaranth_boards/quickfeather.py diff --git a/re-bba/amaranth_boards/resources/__init__.py b/re-bba/ReBba/amaranth_boards/resources/__init__.py similarity index 100% rename from re-bba/amaranth_boards/resources/__init__.py rename to re-bba/ReBba/amaranth_boards/resources/__init__.py diff --git a/re-bba/amaranth_boards/resources/display.py b/re-bba/ReBba/amaranth_boards/resources/display.py similarity index 100% rename from re-bba/amaranth_boards/resources/display.py rename to re-bba/ReBba/amaranth_boards/resources/display.py diff --git a/re-bba/amaranth_boards/resources/interface.py b/re-bba/ReBba/amaranth_boards/resources/interface.py similarity index 100% rename from re-bba/amaranth_boards/resources/interface.py rename to re-bba/ReBba/amaranth_boards/resources/interface.py diff --git a/re-bba/amaranth_boards/resources/memory.py b/re-bba/ReBba/amaranth_boards/resources/memory.py similarity index 100% rename from re-bba/amaranth_boards/resources/memory.py rename to re-bba/ReBba/amaranth_boards/resources/memory.py diff --git a/re-bba/amaranth_boards/resources/user.py b/re-bba/ReBba/amaranth_boards/resources/user.py similarity index 100% rename from re-bba/amaranth_boards/resources/user.py rename to re-bba/ReBba/amaranth_boards/resources/user.py diff --git a/re-bba/amaranth_boards/rz_easyfpga_a2_2.py b/re-bba/ReBba/amaranth_boards/rz_easyfpga_a2_2.py similarity index 100% rename from re-bba/amaranth_boards/rz_easyfpga_a2_2.py rename to re-bba/ReBba/amaranth_boards/rz_easyfpga_a2_2.py diff --git a/re-bba/amaranth_boards/sk_xc6slx9.py b/re-bba/ReBba/amaranth_boards/sk_xc6slx9.py similarity index 100% rename from re-bba/amaranth_boards/sk_xc6slx9.py rename to re-bba/ReBba/amaranth_boards/sk_xc6slx9.py diff --git a/re-bba/amaranth_boards/supercon19badge.py b/re-bba/ReBba/amaranth_boards/supercon19badge.py similarity index 100% rename from re-bba/amaranth_boards/supercon19badge.py rename to re-bba/ReBba/amaranth_boards/supercon19badge.py diff --git a/re-bba/amaranth_boards/te0714_03_50_2I.py b/re-bba/ReBba/amaranth_boards/te0714_03_50_2I.py similarity index 100% rename from re-bba/amaranth_boards/te0714_03_50_2I.py rename to re-bba/ReBba/amaranth_boards/te0714_03_50_2I.py diff --git a/re-bba/amaranth_boards/test/__init__.py b/re-bba/ReBba/amaranth_boards/test/__init__.py similarity index 100% rename from re-bba/amaranth_boards/test/__init__.py rename to re-bba/ReBba/amaranth_boards/test/__init__.py diff --git a/re-bba/amaranth_boards/test/blinky.py b/re-bba/ReBba/amaranth_boards/test/blinky.py similarity index 100% rename from re-bba/amaranth_boards/test/blinky.py rename to re-bba/ReBba/amaranth_boards/test/blinky.py diff --git a/re-bba/amaranth_boards/tinyfpga_ax1.py b/re-bba/ReBba/amaranth_boards/tinyfpga_ax1.py similarity index 100% rename from re-bba/amaranth_boards/tinyfpga_ax1.py rename to re-bba/ReBba/amaranth_boards/tinyfpga_ax1.py diff --git a/re-bba/amaranth_boards/tinyfpga_ax2.py b/re-bba/ReBba/amaranth_boards/tinyfpga_ax2.py similarity index 100% rename from re-bba/amaranth_boards/tinyfpga_ax2.py rename to re-bba/ReBba/amaranth_boards/tinyfpga_ax2.py diff --git a/re-bba/amaranth_boards/tinyfpga_bx.py b/re-bba/ReBba/amaranth_boards/tinyfpga_bx.py similarity index 100% rename from re-bba/amaranth_boards/tinyfpga_bx.py rename to re-bba/ReBba/amaranth_boards/tinyfpga_bx.py diff --git a/re-bba/amaranth_boards/ulx3s.py b/re-bba/ReBba/amaranth_boards/ulx3s.py similarity index 100% rename from re-bba/amaranth_boards/ulx3s.py rename to re-bba/ReBba/amaranth_boards/ulx3s.py diff --git a/re-bba/amaranth_boards/upduino_v1.py b/re-bba/ReBba/amaranth_boards/upduino_v1.py similarity index 100% rename from re-bba/amaranth_boards/upduino_v1.py rename to re-bba/ReBba/amaranth_boards/upduino_v1.py diff --git a/re-bba/amaranth_boards/upduino_v2.py b/re-bba/ReBba/amaranth_boards/upduino_v2.py similarity index 100% rename from re-bba/amaranth_boards/upduino_v2.py rename to re-bba/ReBba/amaranth_boards/upduino_v2.py diff --git a/re-bba/amaranth_boards/versa_ecp5.py b/re-bba/ReBba/amaranth_boards/versa_ecp5.py similarity index 100% rename from re-bba/amaranth_boards/versa_ecp5.py rename to re-bba/ReBba/amaranth_boards/versa_ecp5.py diff --git a/re-bba/amaranth_boards/versa_ecp5_5g.py b/re-bba/ReBba/amaranth_boards/versa_ecp5_5g.py similarity index 100% rename from re-bba/amaranth_boards/versa_ecp5_5g.py rename to re-bba/ReBba/amaranth_boards/versa_ecp5_5g.py diff --git a/re-bba/amaranth_boards/zturn_lite_z007s.py b/re-bba/ReBba/amaranth_boards/zturn_lite_z007s.py similarity index 100% rename from re-bba/amaranth_boards/zturn_lite_z007s.py rename to re-bba/ReBba/amaranth_boards/zturn_lite_z007s.py diff --git a/re-bba/amaranth_boards/zturn_lite_z010.py b/re-bba/ReBba/amaranth_boards/zturn_lite_z010.py similarity index 100% rename from re-bba/amaranth_boards/zturn_lite_z010.py rename to re-bba/ReBba/amaranth_boards/zturn_lite_z010.py diff --git a/re-bba/ShiftRegister.py b/re-bba/ShiftRegister.py deleted file mode 100644 index 0fde821..0000000 --- a/re-bba/ShiftRegister.py +++ /dev/null @@ -1,136 +0,0 @@ - -import os -import sys -from amaranth import * -from amaranth.build import Platform -from amaranth.back import verilog -from amaranth.sim import Simulator -from ExiClock import ClockState - -##### -# Hardware Description. -##### - -class ShiftRegister(Elaboratable): - def __init__(self, width): - self.width = width - - # Ports - self.nen = Signal() - self.exiClkState = Signal(2) - self.rst = Signal() - self.inb = Signal() - self.data = Signal(self.width, reset=0) - - def elaborate(self, platform: Platform): - m = Module() - - with m.If(self.rst): - m.d.sync += self.data.eq(self.data.reset) - - with m.If(~self.nen): - with m.If(self.exiClkState == ClockState.FALLING): - m.d.sync += self.data.eq(self.data.shift_left(1) | self.inb ) - - return m - -##### -# TestBench -##### -class TestBench: - def __init__(self): - pass - - def simExiClock(self, dut): - yield dut.exiClk.eq(~dut.exiClk) - - def enabled_test(self): - dut = self.dut - - # Disabled ShiftRegister should not Change. - yield dut.nen.eq(1) - for _ in range(10): - yield dut.inb.eq(~dut.inb) - yield from self.simExiClock(dut) - yield from self.simExiClock(dut) - assert not (yield dut.data) - yield - yield - yield - yield from self.simExiClock(dut) - yield from self.simExiClock(dut) - assert not (yield dut.data) - yield - yield - yield - - def normal_operation(self): - dut = self.dut - - def oracle(i): - if i == 0: return 0x01 - if i == 1: return 0x02 - if i == 2: return 0x05 - if i == 3: return 0x0A - if i == 4: return 0x15 - if i == 5: return 0x2A - if i == 6: return 0x55 - if i == 7: return 0xAA - if i == 8: return 0x55 - if i == 9: return 0xAA - - yield dut.nen.eq(0) - for i in range(10): - yield dut.inb.eq(~dut.inb) - yield from self.simExiClock(dut) - yield - yield - yield from self.simExiClock(dut) - yield - yield - assert (yield dut.data) == oracle(i) - - def simulate(self): - self.dut = ShiftRegister(8) - - sim = Simulator(self.dut) - sim.add_clock(1e-6) # 1 MHz - sim.add_sync_process(self.enabled_test) - - with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ShiftRegister_enable.vcd"): - sim.run() - - self.dut = ShiftRegister(8) - - sim = Simulator(self.dut) - sim.add_clock(1e-6) # 1 MHz - sim.add_sync_process(self.normal_operation) - - with sim.write_vcd(os.path.dirname(os.path.abspath(__file__)) + "/ShiftRegister_shift.vcd"): - sim.run() - -##### -# Main portion -##### - -def main(): - if(len(sys.argv) == 2): - - if sys.argv[1] == "s": - bench = TestBench() - bench.simulate() - - if sys.argv[1] == "v": - mod = ShiftRegister(8) - with open(os.path.dirname(os.path.abspath(__file__)) + "/shift_register.v", "w") as f: - f.write(verilog.convert(mod, ports=[mod.exiClk, mod.inb, mod.data])) - - else: - bench = TestBench() - bench.simulate() - -if __name__ == "__main__": - main() - - - diff --git a/re-bba/amaranth_boards/__pycache__/__init__.cpython-310.pyc b/re-bba/amaranth_boards/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 2c56ce69cbc59537b2e474deee0916a2f558be3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 356 zcmYjM!AiqG5S`t|CbkU}5s%&@)U${bFCKdFB3K#%!=_m^HrWl6)X;uSd-Q)i?bVaN zAcAf}6la*nyf=?wM*IE%Y)p4=V#Wd98}dIqORjB|_ZGINTQ7lxWstLwGnj+&9gw}v z34jAuOL3s9^E$#;%C*t4)dxB4Bl&a=+h3;T;!ts!te>~08{@p4&-L{#F|xNEgi zx>kW}4%58QRAp&Q_Chd6e;j}PW;km-H$<9@`y#1KwK7A*LM&I}Q6e^^(-B{Rnzvi{ zym+{b3ewMVS(OpVNgRs_#a$PPT#!)J6UJIlQbvfWN-M)At{RL0>Y+MS4h{hcWoRFpSyP^ zgpw!c)vEefDG!jh{y%xz*F5poO8tz|rn6^EQIp(hc6R1BGdnvwx91NGBqVrlA3Sq^ zOiI#oA)J0x5IzM8c3~hAL7s$r9AN~q?8#*z%bo&U0j>g9>j-O0648kI7$mB96da=l z(YIuFE3%50B^v8UI6)H!Nt(EyIz&hUK0pUM5{VI`DRia>x>X3^{W00p#VqFNBu!ynFu@c1}sHJ zUW+wARPqiPg%!?{bL8EwOvbt*&LHUDBj?El@;(_S=1B%0bd9G7579K40E-VhN;Er1 zE*{S=k;@&WuHfN1)RSBxSBXWgk?Z8f6OBxsM439-$2r*l707jxeAHF?_{mNLdiAa7 zB|xpWqSJt0dn=j+^!gjo6d5Hss8s%m^8bu+hS+50v4qc%*^*?Ls<)NRG0`bl&d+evfYwn+gVjMJee=9lDC2l(!6|;Z_{B=elCi#2Tv;d- zdGg+hQz{ph?-bVV>}lDonV+)|i-D7+aJAKF23&76cPI}3t8Fk)k3 z7!|`=VSsEf6~Q962&f9N|A^=!(jri>216*_M+fkk6Zuenr0k;ug(wH=zI=!d(f8>` zYN#FP`^vsr2Mv8`(yoR9SDWrOW#?fdI8$kaK?s-Jwo_|(Q~*Co>=HmPZq;sWfXjUfE*p$a zRx0i!s~pcZ+-;Y+&2ZDH_%0*C2Bci+-IY_VhkQ8neXqLdHkyvu2y?d!qIRN)gD8X2 zXyVo0#n-Rbsn^_=tr2cGj>yY#c*1d@>)M`}ryS?ow(Io}tP{EeDezd!t!}w>ij#!a z+_o1wqL+;|8u)EirC42s?+a^-o?qR`UZdri)B2t&<;bt`JX~I!h^$UkQZz9W<>baEy{@?}F6%&i Y{Dx#8Lk2>+l2(k5fuj@}LF&tY0gFUDX#fBK diff --git a/re-bba/amaranth_boards/resources/__pycache__/__init__.cpython-310.pyc b/re-bba/amaranth_boards/resources/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 9ad9bb940ed577b29dec49a0f589de0ae953b818..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmYk0F%E)25Jh(Zbv1Ge8%*#3#t`EHY_u}O%`Uq{46tMt3T|WTeXMA$yn>a3Quvek zZ+`M88RPpif{JbraYjD-@Gl3$7RN5o6j3xM#~A;@8iMIk_x^@U3# lK=lP{8c4K_InT}bX*ie%V; z#HxHj7iF0(Kfq70nk}pT0vov3c0-}Wk&oxj8BgxL=Zv#<+aqvopMMwM9729zaP_hw zcn-JT0+2+~guEt_Nh@MKD!H`b=F&OivLV?=)?@XIduGX|v|z@P{D5@53wWP&si9BJ z%8OW!6EWR92%}e_&L(OYn%0}$oy%bFWtST!$Hs}%lThV`53@8iw#aj(hqw`5Ex6nD za~Ga^jS>=(cYfiYlblMLvjS2r+yWAj{M7!yzEDbP)&`a?WF27HLbd^{wUBjz@ z5mpdxBj7*(NmRKI8ZK0%)jb%_hPqrMmkCDQyT z7-T|8Tu`}B_v?x_##3d%KG+N00pM(vUj4ZcxzwY}v}>7GWzRrQ(_z`ZGOM{kF-1IG zXw=f6Uts_SZ5GYH4C+Yh)T+%{F&qR&b6#iAwrI@j3|ba#X9L%e?%eLxj%Yiy?7wVf ztbNR=Xv{6+N)HZAtG0{}mQe~T=`w{UuBx?E1vNA5NGmK-`DJvXd)7%L)E%6<57710 zBOK4)P){&?jPMWv+gOp;E#<6W4MPrqdug-ff@`x7&k7}-55;b tM4Cnrh$IPuQqc1KD|@0@)Eavnp3 zhU%WhMr|ozOK@?H9MB$24oH@A<%0MT95~ehAt4d@FK`LZTh-e;(_=^Us@|=t_o=V< zcOS7n zt99P7&3)cN-zmP$JI4+Wco)64LiUasU*gMXJN3vFj9les(C4CWjh|JTa~SzG{t|k< zdgROeJla0Dc8&0rXV|L|n$mnL^klGi_0|Ws;(R<6qgVzv#PzFntFwFa#%bfm*0s8^ zay=38sMyCXN8>D$PE-^km$n$E z@rbraUk7Cgg$(^3N?w|VQNYlgJu*sGTBTh&rCWOY?sem#`Op++%Qm-;jQs4+jNh85 z+aEKr!JP*IcOP^!8!|wvdtf~1mAxls!MImgrNN!jCpSE{AF@B0rcvqI(3#wA=omMq zrnpsMI>4~9+rU@~!z)Yxj8z5=jIA(76{ZV}y)ciXFu$)bJz$)Ld0d70V})4)#$CX8 z3iEk|Sq8>iz_b+RFN7&uWQD@M>y#b7Qug@jG5gd+_?+1p!3FilP_s~SDo7FIH%4iE z*i|6bd_bbBJkcM($gZ4qA_4x@`= zSk-PvhmnY~;?7_=jsz!wj@JBkk`=Mok4Ew4Ec*K$?j($B4{(&*-F2EvOP9mPr*vc^->m@T-IucO)zB z35rZXVJc`@(IwF%L1Ejsr;#Y0G8yoAKboe+Ad3#MR5H#(S6WeaU%Js`5@%etcBjKU zImn_^+BcIdm;OoqNOwOvOw#+|l6ZwCewD;mF01w`RtUEWA?-*UhoD=mz z*Ku%`j8A*hMzFDh+w)l}m{Te3KlEa#`&sYA!b zyneOFHCpIz5T(kQQf0+eBX3g%BTv23dtwwON3J5MSV;tE*LkXS4s;B8IV~~Rj7@c2xgehH}7u+w616F#UnYWBjDZE=d+B+}fAYz@w*Gare;yj7( zK=kcI@F;Y|H>u|h5^q9ChdjO`zJ+?|OE;Sy4r4LnZ5k^slAtKmp8Yn}>KxL3qo5B_ za`NJu-Sn064Pj&(lv{vl(^!NK;xQ|vgS?81nFT0xY9el-K~Y{4@xPE8pfeLx>nf^M zq?j*jC+5qQ^V+~LQ1FLkTRG8!6AW&bE_WVV71e5u3raGT#^ZkNUQM;vs?jZA*aAko zd9T6{Wm~+16=vqiuFS39&{jIVgQiaJ;L+R;ni#!Kz7YOd&GYvPt1gClyVmn)U31U+LimElmtIZwExv?HbGah>m7S1@x8e4F zdlHLeawis1syZYaBxGM#+R1zl6BXvD9Wq6{DDK zQ6K8XMx+z|93`h4&n5%GJjyVn0q?t$X_`(avVAn1=7XasO=j-^VAMz8lRH4Y?Vg~c z!S`e=dH_F<@5xy6Iwm$N9(UD!;5GD?*sk=xx(iwjy-uz76wf=gv0dISJv_+u`zL_0 z`CzhOY>x1}j00%0{|VJp$XnBVs2m_D?m}N|lj^4=6kH+y52Je+ae$JqL1UCT{+`<<2umUJZOy5j*6;1b%DXJB|K

tPloV`n^(y!gw2E%pc8BX2VbV*B_M@6K3`;0G>>?P1igw*ef8pGq-{=7 za@t_PbYxIUQd}$}KH6XUOeH5FYo9ML6^Hh#nQEVY7C9;kG*`K^T&1*{twKW0v6Tn^ z_*DYop`=c(jIOLo4<#g3R4Bvutx3K$V=Y(1ZvfOJr`M^k@dToW%I{Dra@t@UraC_p zq`^uW96^HEz{{U2++V%Pux diff --git a/re-bba/amaranth_boards/resources/__pycache__/memory.cpython-310.pyc b/re-bba/amaranth_boards/resources/__pycache__/memory.cpython-310.pyc deleted file mode 100644 index 0804a39a9b75626740c1a4226919a3a272f617c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5243 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 RshGuLOT@2j$vA1tKLMo{O4|Sc diff --git a/re-bba/setup.py b/re-bba/setup.py new file mode 100644 index 0000000..472320f --- /dev/null +++ b/re-bba/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup, find_packages + +setup(name='ReBba', version='0.1', packages=find_packages()) \ No newline at end of file