3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

blif: Use library cells' start_offset and upto for wideports.

Fixes #2729.
This commit is contained in:
Marcelina Kościelnicka 2021-05-05 20:31:27 +02:00
parent a6081b46ce
commit 32a0ce9d68
4 changed files with 54 additions and 10 deletions

20
tests/blif/bug2729.ys Normal file
View file

@ -0,0 +1,20 @@
read_verilog <<EOF
module cell (input [2:12] I, output [5:-5] O);
endmodule
module top(input [10:0] A, output [10:0] B);
cell my_cell(.I(A), .O(B));
endmodule
EOF
write_blif tmp-bug2729.blif
delete top
read_blif -wideports tmp-bug2729.blif
!rm tmp-bug2729.blif
rename -enumerate t:cell
dump
cd top
connect -assert -port _0_ I A
connect -assert -port _0_ O B

6
tests/blif/run-test.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -e
for x in *.ys; do
echo "Running $x.."
../../yosys -ql ${x%.ys}.log $x
done