lib.io: add i_clk and o_clk to pin layout with xdr>=1.
This commit is contained in:
parent
a1940c5528
commit
b42043f764
2 changed files with 29 additions and 1 deletions
|
|
@ -60,34 +60,40 @@ class PinLayoutSDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_i(self):
|
||||
layout_1 = pin_layout(1, dir="i", xdr=1)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="i", xdr=1)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i": ((2, False), DIR_NONE),
|
||||
})
|
||||
|
||||
def test_pin_layout_o(self):
|
||||
layout_1 = pin_layout(1, dir="o", xdr=1)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="o", xdr=1)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((2, False), DIR_NONE),
|
||||
})
|
||||
|
||||
def test_pin_layout_oe(self):
|
||||
layout_1 = pin_layout(1, dir="oe", xdr=1)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((1, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="oe", xdr=1)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((2, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
|
@ -95,14 +101,18 @@ class PinLayoutSDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_io(self):
|
||||
layout_1 = pin_layout(1, dir="io", xdr=1)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i": ((1, False), DIR_NONE),
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((1, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="io", xdr=1)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i": ((2, False), DIR_NONE),
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o": ((2, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
|
@ -112,12 +122,14 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_i(self):
|
||||
layout_1 = pin_layout(1, dir="i", xdr=2)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i0": ((1, False), DIR_NONE),
|
||||
"i1": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="i", xdr=2)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i0": ((2, False), DIR_NONE),
|
||||
"i1": ((2, False), DIR_NONE),
|
||||
})
|
||||
|
|
@ -125,12 +137,14 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_o(self):
|
||||
layout_1 = pin_layout(1, dir="o", xdr=2)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((1, False), DIR_NONE),
|
||||
"o1": ((1, False), DIR_NONE),
|
||||
})
|
||||
|
||||
layout_2 = pin_layout(2, dir="o", xdr=2)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((2, False), DIR_NONE),
|
||||
"o1": ((2, False), DIR_NONE),
|
||||
})
|
||||
|
|
@ -138,6 +152,7 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_oe(self):
|
||||
layout_1 = pin_layout(1, dir="oe", xdr=2)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((1, False), DIR_NONE),
|
||||
"o1": ((1, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
|
|
@ -145,6 +160,7 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
|
||||
layout_2 = pin_layout(2, dir="oe", xdr=2)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((2, False), DIR_NONE),
|
||||
"o1": ((2, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
|
|
@ -153,8 +169,10 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
def test_pin_layout_io(self):
|
||||
layout_1 = pin_layout(1, dir="io", xdr=2)
|
||||
self.assertEqual(layout_1.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i0": ((1, False), DIR_NONE),
|
||||
"i1": ((1, False), DIR_NONE),
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((1, False), DIR_NONE),
|
||||
"o1": ((1, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
|
|
@ -162,8 +180,10 @@ class PinLayoutDDRTestCase(FHDLTestCase):
|
|||
|
||||
layout_2 = pin_layout(2, dir="io", xdr=2)
|
||||
self.assertEqual(layout_2.fields, {
|
||||
"i_clk": ((1, False), DIR_NONE),
|
||||
"i0": ((2, False), DIR_NONE),
|
||||
"i1": ((2, False), DIR_NONE),
|
||||
"o_clk": ((1, False), DIR_NONE),
|
||||
"o0": ((2, False), DIR_NONE),
|
||||
"o1": ((2, False), DIR_NONE),
|
||||
"oe": ((1, False), DIR_NONE),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue