mirror of https://github.com/YosysHQ/yosys.git
Added tests/various/submod_extract.ys
This commit is contained in:
parent
267c615640
commit
b21ebe1859
1
Makefile
1
Makefile
|
@ -225,6 +225,7 @@ test: $(TARGETS) $(EXTRA_TARGETS)
|
||||||
cd tests/share && bash run-test.sh
|
cd tests/share && bash run-test.sh
|
||||||
cd tests/techmap && bash run-test.sh
|
cd tests/techmap && bash run-test.sh
|
||||||
cd tests/memories && bash run-test.sh
|
cd tests/memories && bash run-test.sh
|
||||||
|
cd tests/various && bash run-test.sh
|
||||||
cd tests/sat && bash run-test.sh
|
cd tests/sat && bash run-test.sh
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Passed \"make test\"."
|
@echo " Passed \"make test\"."
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
for x in *.ys; do
|
||||||
|
echo "Running $x.."
|
||||||
|
../../yosys -ql ${x%.ys}.log $x
|
||||||
|
done
|
|
@ -0,0 +1,21 @@
|
||||||
|
read_verilog << EOT
|
||||||
|
module test(input [7:0] a, b, c, d, output [7:0] x, y, z);
|
||||||
|
assign x = a + b, y = b + c, z = c + d;
|
||||||
|
endmodule
|
||||||
|
EOT
|
||||||
|
|
||||||
|
copy test gold
|
||||||
|
rename test gate
|
||||||
|
|
||||||
|
submod -name mycell gate/x %ci*
|
||||||
|
design -copy-to mymap mycell
|
||||||
|
extract -map %mymap gate
|
||||||
|
|
||||||
|
select -assert-count 3 gold/t:*
|
||||||
|
select -assert-count 3 gold/t:$add
|
||||||
|
|
||||||
|
select -assert-count 3 gate/t:*
|
||||||
|
select -assert-count 3 gate/t:mycell
|
||||||
|
|
||||||
|
miter -equiv -flatten gold gate miter
|
||||||
|
sat -verify -prove trigger 0 miter
|
Loading…
Reference in New Issue