build.dsl: clean up inversion logic.
* Add invert= argument to DiffPairs() constructor, like in Pins().
* Make PinsN() and DiffPairsN() pass invert= to the corresponding
construtor instead of mutating.
This commit is contained in:
parent
87454b0b6f
commit
e3207b74f4
2 changed files with 8 additions and 8 deletions
|
|
@ -94,6 +94,10 @@ class DiffPairsTestCase(FHDLTestCase):
|
|||
self.assertEqual(dp.n.names, ["B0"])
|
||||
self.assertEqual(dp.invert, True)
|
||||
|
||||
def test_invert_arg(self):
|
||||
dp = DiffPairs(p="A0", n="B0", invert=True)
|
||||
self.assertEqual(dp.invert, True)
|
||||
|
||||
def test_conn(self):
|
||||
dp = DiffPairs(p="0 1 2", n="3 4 5", conn=("pmod", 0))
|
||||
self.assertEqual(list(dp), [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue