diff --git a/src/gateware/cxp_frame_pipeline.py b/src/gateware/cxp_frame_pipeline.py index 5a20dba..2a1b793 100644 --- a/src/gateware/cxp_frame_pipeline.py +++ b/src/gateware/cxp_frame_pipeline.py @@ -401,7 +401,7 @@ class Frame_Header_Decoder(Module): class Custom_Pixel_Gearbox(Module): def __init__(self, size): - assert size in [8, 10, 12, 16] + assert size in [8, 10, 12, 14, 16] self.x_size = Signal(3*char_width) @@ -491,6 +491,13 @@ class Custom_Pixel_Gearbox(Module): } # mod 8 self.sync += Case(self.x_size[:3], stb_cases) + case 14: + stb_cases = { + 9: extra_stb.eq(1), + 13: extra_stb.eq(1), + } + # mod 16 + self.sync += Case(self.x_size[:4], stb_cases) # NOTE: @@ -589,7 +596,7 @@ class Frame_Deserializer(Module): # TODO: fix the edge case where 5 x_size is not working # the issue arises when the 4th pixel is sent with eop (e.g. 10bits & x_size = 5,6) # eating the rest of the bits - self.submodules.gearbox = gearbox = Custom_Pixel_Gearbox(12) + self.submodules.gearbox = gearbox = Custom_Pixel_Gearbox(14) self.sync += gearbox.x_size.eq(self.x_size), self.comb += eol_inserter.source.connect(gearbox.sink) @@ -754,6 +761,8 @@ class Frame_Packet_Router(Module): for i, d in enumerate(downconns): # eop is needed for arbiter and crc checker to work correctly + # TODO: move eop inserter inside of broadcaster + # TODO: change arbiter to use K27.7 as eop instead eop_marker = EOP_Inserter() self.submodules += eop_marker self.comb += [