Skip to content
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

Merged
merged 3 commits into from Jan 15, 2019

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Jan 15, 2019

AnyConst and AnySeq 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 or Signal:

self.foo = AnyConst(2)
self.bar = AnySeq(16)



class AnyConst(AnyValue):
def __init__(self, shape):
Copy link
Contributor

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.)


class AnySeq(AnyValue):
def __init__(self, shape):
super().__init__(shape)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@codecov
Copy link

codecov bot commented Jan 15, 2019

Codecov Report

Merging #25 into master will decrease coverage by 0.32%.
The diff coverage is 50%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
nmigen/back/pysim.py 95.26% <100%> (+0.03%) ⬆️
nmigen/hdl/xfrm.py 92.38% <40%> (-1.88%) ⬇️
nmigen/hdl/ast.py 80.75% <44.44%> (-1.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1880686...5f5166c. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants