interrupt_map = {}
cpu_type = None
def __init__(self, platform, clk_freq):
- self.uart2wb = UART2Wishbone(platform.request("serial"), clk_freq)
+ self.uart2wb = UART2Wishbone(platform.request("serial"), clk_freq, baud=921600)
# CSR bridge 0x00000000 (shadow @0x00000000)
self.wishbone2csr = wishbone2csr.WB2CSR(bus_csr=csr.Interface(self.csr_data_width))
self.cont_remover = SATACONTRemover(phy_description(32))
self.comb += [
self.cont_inserter.source.connect(phy.sink),
- phy.source.connect(self.cont_remover.sink)
+ phy.source.connect(self.cont_remover.sink),
+ self.cont_remover.source.ack.eq(1)
]
self.sync += [
self.cont_inserter.sink.stb.eq(1),
crg = self.sata_phy.crg
debug = (
- trx.rxresetdone,
- trx.txresetdone,
-
- trx.rxuserrdy,
- trx.txuserrdy,
-
- trx.rxelecidle,
- trx.rxcominitdet,
- trx.rxcomwakedet,
-
- trx.txcomfinish,
- trx.txcominit,
- trx.txcomwake,
-
ctrl.ready,
ctrl.sink.data,
ctrl.sink.charisk,
self.sata_phy.sink.stb,
self.sata_phy.sink.data,
self.sata_phy.sink.charisk,
+
+ self.stim.cont_remover.source.stb,
+ self.stim.cont_remover.source.data,
+ self.stim.cont_remover.source.charisk
)
self.comb += platform.request("user_led", 2).eq(crg.ready)
self.comb += platform.request("user_led", 3).eq(ctrl.ready)
- self.mila = MiLa(depth=512, dat=Cat(*debug))
+ self.mila = MiLa(depth=2048, dat=Cat(*debug))
self.mila.add_port(Term)
if export_mila:
mila = MiLaDriver(wb.regs, "mila", use_rle=False)
wb.open()
###
-trigger0 = mila.trx_rxelecidle0_o*0
-mask0 = mila.trx_rxelecidle0_m
-
-#trigger0 = mila.ctrl_align_detect_o
-#mask0 = mila.ctrl_align_detect_m
+trigger0 = mila.cont_remover_source_stb_o*1
+mask0 = mila.cont_remover_source_stb_m
trigger0 = 0
mask0 = 0
mila.prog_sum("term")
# Trigger / wait / receive
-mila.trigger(offset=8, length=512)
+mila.trigger(offset=32, length=1024)
mila.wait_done()
mila.read()
mila.export("dump.vcd")