New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for yosys' $anyconst and $anyseq cells #25
Conversation
nmigen/hdl/ast.py
Outdated
|
||
|
||
class AnyConst(AnyValue): | ||
def __init__(self, shape): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a no-op--this class does not need the __init__
method. (Though, once you remove it, you should change src_loc_at
above.)
nmigen/hdl/ast.py
Outdated
|
||
class AnySeq(AnyValue): | ||
def __init__(self, shape): | ||
super().__init__(shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
==========================================
- Coverage 80.4% 80.08% -0.33%
==========================================
Files 19 19
Lines 2986 3018 +32
Branches 644 648 +4
==========================================
+ Hits 2401 2417 +16
- Misses 541 555 +14
- Partials 44 46 +2
Continue to review full report at Codecov.
|
AnyConst
andAnySeq
correspond to to the$anyconst
and$anyseq
RTLIL cells. They are useful for formal verification to represent "any value that doesn't change", and "any value that can change to another arbitrary value each clock cycle" respectively.Usage is analogous to declaring a
Constant
orSignal
: