diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2020-03-02 21:40:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 21:40:09 +0100 |
commit | 968956badb977984133b00c38d0a08f3e2d0b854 (patch) | |
tree | 08e308cfa903dc4e7f706ce627fd60bdc2d3b5bc /tests/techmap/iopadmap.ys | |
parent | 4f889b2f57b732083dd4bf336a0d361f70e5b2d0 (diff) | |
download | yosys-968956badb977984133b00c38d0a08f3e2d0b854.tar.gz yosys-968956badb977984133b00c38d0a08f3e2d0b854.tar.bz2 yosys-968956badb977984133b00c38d0a08f3e2d0b854.zip |
iopadmap: Look harder for already-present buffers. (#1731)
iopadmap: Look harder for already-present buffers.
Fixes #1720.
Diffstat (limited to 'tests/techmap/iopadmap.ys')
-rw-r--r-- | tests/techmap/iopadmap.ys | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/techmap/iopadmap.ys b/tests/techmap/iopadmap.ys index 0bcc71cce..25ea94dfc 100644 --- a/tests/techmap/iopadmap.ys +++ b/tests/techmap/iopadmap.ys @@ -4,12 +4,15 @@ module obuf (input i, (* iopad_external_pin *) output o); endmodule module obuft (input i, input oe, (* iopad_external_pin *) output o); endmodule module iobuf (input i, input oe, output o, (* iopad_external_pin *) inout io); endmodule +module buf_inside (input i, output o); +obuf b (.i(i), .o(o)); +endmodule + module a(input i, output o); assign o = i; endmodule module b(input i, output o); -assign o = i; ibuf b (.i(i), .o(o)); endmodule @@ -42,12 +45,22 @@ assign io = i; assign o = io; endmodule +module i(input i, output o); +buf_inside b (.i(i), .o(o)); +endmodule + +module j(input i, output o); +wire tmp; +obuf b (.i(i), .o(tmp)); +assign o = tmp; +endmodule + EOT opt_clean tribuf simplemap -iopadmap -bits -inpad ibuf o:i -outpad obuf i:o -toutpad obuft oe:i:o -tinoutpad iobuf oe:o:i:io +iopadmap -bits -inpad ibuf o:i -outpad obuf i:o -toutpad obuft oe:i:o -tinoutpad iobuf oe:o:i:io a b c d e f g h i j opt_clean select -assert-count 1 a/t:ibuf @@ -121,6 +134,12 @@ select -assert-count 1 h/t:ibuf select -assert-count 1 h/t:iobuf select -assert-count 1 h/t:obuf +select -assert-count 1 i/t:ibuf +select -assert-count 0 i/t:obuf + +select -assert-count 1 j/t:ibuf +select -assert-count 1 j/t:obuf + # Check that \init attributes get moved from output buffer # to buffer input |