build.{dsl,plat,res}: allow dir="oe".
Although a dir="oe" pin is generally equivalent to dir="io" pin with the i* signal(s) disconnected, they are not equivalent, because some pins may not be able to support input buffers at all, either because there are no input buffers, or because the input buffers are consumed by some other resource. E.g. this can happen on iCE40 when the input buffer is consumed by a PLL.
This commit is contained in:
parent
1eee7cd76f
commit
6fae06aea9
6 changed files with 45 additions and 12 deletions
|
|
@ -17,7 +17,7 @@ class PinsTestCase(FHDLTestCase):
|
|||
|
||||
def test_wrong_dir(self):
|
||||
with self.assertRaises(TypeError,
|
||||
msg="Direction must be one of \"i\", \"o\" or \"io\", not 'wrong'"):
|
||||
msg="Direction must be one of \"i\", \"o\", \"oe\", or \"io\", not 'wrong'"):
|
||||
p = Pins("A0 A1", dir="wrong")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -197,13 +197,14 @@ class ConstraintManagerTestCase(FHDLTestCase):
|
|||
|
||||
def test_wrong_request_with_dir(self):
|
||||
with self.assertRaises(TypeError,
|
||||
msg="Direction must be one of \"i\", \"o\", \"io\", or \"-\", not 'wrong'"):
|
||||
msg="Direction must be one of \"i\", \"o\", \"oe\", \"io\", or \"-\", "
|
||||
"not 'wrong'"):
|
||||
user_led = self.cm.request("user_led", 0, dir="wrong")
|
||||
|
||||
def test_wrong_request_with_dir_io(self):
|
||||
with self.assertRaises(ValueError,
|
||||
msg="Direction of (pins o A0) cannot be changed from \"o\" to \"i\"; direction "
|
||||
"can be changed from \"io\" to \"i\", from \"io\"to \"o\", or from anything "
|
||||
"can be changed from \"io\" to \"i\", \"o\", or \"oe\", or from anything "
|
||||
"to \"-\""):
|
||||
user_led = self.cm.request("user_led", 0, dir="i")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue