abc9: suppress warnings when no compatible + used flop boxes formed
[yosys.git] / tests / memfile / run-test.sh
1 #!/bin/bash
2
3 set -e
4
5 mkdir -p temp
6 cp content1.dat temp/content2.dat
7
8 cd ..
9
10 echo "Running from the parent directory with content1.dat"
11 ../yosys -qp "read_verilog -defer memfile/memory.v; chparam -set MEMFILE \"content1.dat\" memory"
12 echo "Running from the parent directory with temp/content2.dat"
13 ../yosys -qp "read_verilog -defer memfile/memory.v; chparam -set MEMFILE \"temp/content2.dat\" memory"
14 echo "Running from the parent directory with memfile/temp/content2.dat"
15 ../yosys -qp "read_verilog -defer memfile/memory.v; chparam -set MEMFILE \"memfile/temp/content2.dat\" memory"
16
17 cd memfile
18
19 echo "Running from the same directory with content1.dat"
20 ../../yosys -qp "read_verilog -defer memory.v; chparam -set MEMFILE \"content1.dat\" memory"
21 echo "Running from the same directory with temp/content2.dat"
22 ../../yosys -qp "read_verilog -defer memory.v; chparam -set MEMFILE \"temp/content2.dat\" memory"
23
24 cd temp
25
26 echo "Running from a child directory with content1.dat"
27 ../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"content1.dat\" memory"
28 echo "Running from a child directory with temp/content2.dat"
29 ../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"temp/content2.dat\" memory"
30 echo "Running from a child directory with content2.dat"
31 ../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"temp/content2.dat\" memory"
32
33 cd ..
34
35 echo "Checking a failure when zero length filename is provided"
36 if ../../yosys -qp "read_verilog memory.v"; then
37 echo "The execution should fail but it didn't happen, which is WRONG."
38 exit 1
39 else
40 echo "Execution failed, which is OK."
41 fi
42
43 echo "Checking a failure when not existing filename is provided"
44 if ../../yosys -qp "read_verilog -defer memory.v; chparam -set MEMFILE \"content3.dat\" memory"; then
45 echo "The execution should fail but it didn't happen, which is WRONG."
46 exit 1
47 else
48 echo "Execution failed, which is OK."
49 fi