forked from M-Labs/artiq-zynq
pipeline GW: add docs & remove unused code
This commit is contained in:
parent
71b4d95a9d
commit
52c9413bd9
|
@ -265,46 +265,6 @@ class TX_Test_Packet(Module, AutoCSR):
|
|||
|
||||
# # #
|
||||
|
||||
# testdata_src = stream.Endpoint(upconn_layout)
|
||||
|
||||
# # Section 9.9.2 (CXP-001-2021)
|
||||
# # 0x00, 0x01 ... 0xFF need to be send 16 times
|
||||
# # cnt[8:12] is used to count up 16 times while cnt[:8] is the data
|
||||
# cnt = Signal(max=0x1000)
|
||||
# clr_cnt = Signal()
|
||||
# inc_cnt = Signal()
|
||||
|
||||
# self.sync += [
|
||||
# If(clr_cnt,
|
||||
# cnt.eq(cnt.reset),
|
||||
# ).Elif(inc_cnt,
|
||||
# cnt.eq(cnt + 1),
|
||||
# ),
|
||||
# ]
|
||||
|
||||
# self.submodules.fsm = fsm = FSM(reset_state="IDLE")
|
||||
|
||||
# fsm.act("IDLE",
|
||||
# clr_cnt.eq(1),
|
||||
# If(self.stb.re,
|
||||
# NextState("WRITE")
|
||||
# )
|
||||
# )
|
||||
|
||||
# fsm.act("WRITE",
|
||||
# testdata_src.stb.eq(1),
|
||||
# testdata_src.data.eq(cnt[:8]),
|
||||
# testdata_src.k.eq(0),
|
||||
# If(cnt == 0xFFF,
|
||||
# testdata_src.eop.eq(1),
|
||||
# If(testdata_src.ack, NextState("IDLE"))
|
||||
# ).Else(
|
||||
# inc_cnt.eq(testdata_src.ack)
|
||||
# )
|
||||
# )
|
||||
|
||||
# TODO: figure out why only 16 times doesn't work on the decoder
|
||||
|
||||
self.submodules.test_pattern_src = test_pattern_src = Code_Source(upconn_layout, [*range(0x100)]*16, [0]*0x100*16)
|
||||
self.submodules.pak_type_inserter = pak_type_inserter = Code_Inserter(upconn_layout, [0x04]*4, [0]*4)
|
||||
self.submodules.pak_wrp = pak_wrp = Packet_Wrapper(upconn_layout)
|
||||
|
@ -314,7 +274,6 @@ class TX_Test_Packet(Module, AutoCSR):
|
|||
]
|
||||
|
||||
self.source = pak_wrp.source
|
||||
|
||||
self.sync += [
|
||||
test_pattern_src.stb.eq(self.stb.re),
|
||||
If(self.stb.re,
|
||||
|
@ -430,7 +389,7 @@ class CXP_Data_Packet_Decode(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# TODO: decode packet type here
|
||||
# TODO: decode all packet type here
|
||||
|
||||
cnt = Signal(max=0x100)
|
||||
|
||||
|
@ -455,6 +414,9 @@ class CXP_Data_Packet_Decode(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# Section 9.9.1 (CXP-001-2021)
|
||||
# the received test data packet (0x00, 0x01 ... 0xFF)
|
||||
# need to be compared against the local test sequence generator
|
||||
fsm.act("VERIFY_TEST_PATTERN",
|
||||
self.sink.ack.eq(1),
|
||||
If(self.sink.stb,
|
||||
|
|
Loading…
Reference in New Issue