artiq-zynq/sim_comb.py
morgan 3748bff2e1 temp: flake,libunwind,scripts,notes,diagram
flake: download llvm11 binary instead of compiling
local_run: preset cxp zc706 dev board ip addr
flake: add pillow for sim
libunwind build: suppress libunwind warning
2025-01-22 13:41:19 +08:00

29 lines
497 B
Python

from migen import *
from misoc.interconnect import stream
class Frame(Module):
def __init__(self):
self.a = Signal()
self.b = Signal()
self.comb += [
self.a.eq(self.b),
# self.b.eq(self.a),
]
dut = Frame()
def check_case():
yield dut.a.eq(1)
yield
yield dut.a.eq(0)
yield
for i in range(10):
yield
def testbench():
yield from check_case()
run_simulation(dut, testbench(), vcd_name="sim-cxp.vcd")