core/Trigger: also apply mask to trigger value (avoid having doing it in software).
This commit is contained in:
parent
12be70325e
commit
219a90122f
|
@ -80,7 +80,7 @@ class _Trigger(Module, AutoCSR):
|
|||
self.submodules += flush
|
||||
self.comb += [
|
||||
flush.wait.eq(~(~enable & enable_d)), # flush when disabling
|
||||
hit.eq((sink.data & mem.source.mask) == mem.source.value),
|
||||
hit.eq((sink.data & mem.source.mask) == (mem.source.value & mem.source.mask)),
|
||||
mem.source.ready.eq((enable & hit) | ~flush.done),
|
||||
]
|
||||
|
||||
|
@ -92,7 +92,6 @@ class _Trigger(Module, AutoCSR):
|
|||
source.hit.eq(done)
|
||||
]
|
||||
|
||||
|
||||
class _SubSampler(Module, AutoCSR):
|
||||
def __init__(self, data_width):
|
||||
self.sink = sink = stream.Endpoint(core_layout(data_width))
|
||||
|
|
Loading…
Reference in New Issue