diff --git a/src/gateware/cxp_pipeline.py b/src/gateware/cxp_pipeline.py index d8f7af5..bd9e36c 100644 --- a/src/gateware/cxp_pipeline.py +++ b/src/gateware/cxp_pipeline.py @@ -382,6 +382,29 @@ class Receiver_Path(Module, AutoCSR): # TODO: self.packet_type = Signal(8) + # # # + + + self.submodules.trig_ack_checker = trig_ack_checker = CXP_Trig_Ack_Checker() + self.submodules.packet_decoder= packet_decoder = CXP_Data_Packet_Decode() + self.sync += [ + If(trig_ack_checker.ack, + self.trig_ack.eq(1), + ).Elif(self.trig_clr, + self.trig_ack.eq(0), + ) + + ] + + pipeline = [ trig_ack_checker, packet_decoder ] + + for s, d in zip(pipeline, pipeline[1:]): + self.comb += s.source.connect(d.sink) + + self.sink = pipeline[0].sink + self.source = pipeline[-1].source + + class CXP_Data_Packet_Decode(Module): def __init__(self):