6 cp content1.dat temp
/content2.dat
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"
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"
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"
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."
40 echo "Execution failed, which is OK."
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."
48 echo "Execution failed, which is OK."