forked from M-Labs/artiq-zynq
cxp pipeline GW: add eop marker
This commit is contained in:
parent
ca3f6e4bba
commit
7ea3d563e6
@ -611,3 +611,23 @@ class DChar_Dropper(Module):
|
||||
self.sink.ack.eq(~self.source.stb | self.source.ack),
|
||||
]
|
||||
|
||||
class EOP_Marker(Module):
|
||||
def __init__(self):
|
||||
self.sink = stream.Endpoint(word_layout_dchar)
|
||||
self.source = stream.Endpoint(word_layout_dchar)
|
||||
|
||||
# # #
|
||||
|
||||
self.sync += [
|
||||
If((~self.source.stb | self.source.ack),
|
||||
If(~((self.sink.dchar == KCode["pak_end"]) & (self.sink.dchar_k == 1)),
|
||||
self.sink.connect(self.source, omit={"ack", "eop"}),
|
||||
).Else(
|
||||
self.source.stb.eq(0),
|
||||
)
|
||||
),
|
||||
]
|
||||
self.comb += [
|
||||
self.sink.ack.eq(~self.source.stb | self.source.ack),
|
||||
self.source.eop.eq(((self.sink.dchar == KCode["pak_end"]) & (self.sink.dchar_k == 1))),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user