amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Individual Pin Inversion

Open anuejn opened this issue 5 years ago • 8 comments

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?

anuejn avatar Oct 23 '20 16:10 anuejn

Codecov Report

Merging #514 into master will increase coverage by 0.04%. The diff coverage is 89.47%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update df70aae...ba3f28d. Read the comment docs.

codecov[bot] avatar Oct 23 '20 16:10 codecov[bot]

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.

whitequark avatar Oct 23 '20 16:10 whitequark

I would strongly prefer it if there was only a single invert property

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.

anuejn avatar Oct 23 '20 16:10 anuejn

In the DSL?

Internally. Let me review your changes more carefully first, though.

whitequark avatar Oct 23 '20 16:10 whitequark

Okay :+1:

anuejn avatar Oct 23 '20 16:10 anuejn

@anuejn This PR is pretty old at this point. Are you still interested in pursuing it?

whitequark avatar Feb 09 '24 17:02 whitequark

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.

anuejn avatar Feb 10 '24 14:02 anuejn

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

whitequark avatar Feb 10 '24 14:02 whitequark

closing this and maybe re-implementing it on top of rfc-55 once it lands

anuejn avatar Mar 11 '24 02:03 anuejn