-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for scoreboard filtering functions (#20)
When you register a monitor, you can now provide a scoreboard_filter argument in order to transform/drop a transaction: ```python from copy import copy class Testbench: def __init__(self, dut): ... self.register( "x_mon", StreamMonitor(...), scoreboard_filter=self.filter_x_mon ) def filter_x_mon(self, component, event, transaction): masked = copy(transaction) masked.data &= 0x0000_FFFF return masked ``` You can also entirely drop a transaction by returning `None` from the filter function. This PR also fixes an issue where if no channels of a filter funnel exist but all contain values, the scoreboard did not detect the early failure and just timed out.
- Loading branch information
Showing
3 changed files
with
85 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters