amaranth
amaranth copied to clipboard
Individual Pin Inversion
This PR implements individual pin inversion as discussed in RFC #510. I was unsure about changing the internal representation of invert from a single bool to a tuple of bool. Is that a breaking change and should methods in vendor still support being passed a single bool?
Codecov Report
Merging #514 into master will increase coverage by
0.04%. The diff coverage is89.47%.
@@ Coverage Diff @@
## master #514 +/- ##
==========================================
+ Coverage 81.34% 81.38% +0.04%
==========================================
Files 49 49
Lines 6412 6426 +14
Branches 1279 1286 +7
==========================================
+ Hits 5216 5230 +14
Misses 1007 1007
Partials 189 189
| Impacted Files | Coverage Δ | |
|---|---|---|
| nmigen/build/plat.py | 26.56% <0.00%> (ø) |
|
| nmigen/build/dsl.py | 96.57% <100.00%> (+0.29%) |
:arrow_up: |
| nmigen/build/res.py | 82.65% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update df70aae...ba3f28d. Read the comment docs.
I would strongly prefer it if there was only a single invert property, containing a tuple of booleans or perhaps more nicely a single int that can be XOR'd in the vendor code.
I would strongly prefer it if there was only a single
invertproperty
In the DSL? That would introduce a bunch of breaking changes (for example the repr of the Pins and DiffPairs objects), Moreover, the invert property of those DSL object would not be implementable as is (or am I wrong?). However, I am fine with that as well.
In the DSL?
Internally. Let me review your changes more carefully first, though.
Okay :+1:
@anuejn This PR is pretty old at this point. Are you still interested in pursuing it?
Oh sorry, I completely forgot about this PR. I still really want this functionality, and I am willing to continue. It would be sad if the work that already went into this was lost.
That said, I am on holiday for the following two weeks but would continue afterward if it is okay for you. Otherwise also feel free to close this PR for now, and I'll reopen another when I get back to it.
No problem if you want to continue pursuing it. I think the existing RFC, despite not being written quite to the same high standard that we now require, seems to be good enough to pick up working on this feature. (Among my reasons are that it's not a core language feature and the platform system is likely to get a major reshape before 1.0.)
closing this and maybe re-implementing it on top of rfc-55 once it lands