diff options
author | Rodrigo Alejandro Melo <rodrigomelo9@gmail.com> | 2020-02-01 17:41:10 -0300 |
---|---|---|
committer | Rodrigo Alejandro Melo <rodrigomelo9@gmail.com> | 2020-02-01 17:41:10 -0300 |
commit | 43396fae2c03b876557a73d3f3c19f4cd5161251 (patch) | |
tree | 24d6df3dda4c277313d08bd3b2228d16e4a1cdd5 /tests/memfile/run-test.sh | |
parent | b4c30cfc8d49c9028b67f7ba5710ed959f6f8f57 (diff) | |
download | yosys-43396fae2c03b876557a73d3f3c19f4cd5161251.tar.gz yosys-43396fae2c03b876557a73d3f3c19f4cd5161251.tar.bz2 yosys-43396fae2c03b876557a73d3f3c19f4cd5161251.zip |
Added a test for the Memory Content File inclusion using $readmemb
Signed-off-by: Rodrigo Alejandro Melo <rodrigomelo9@gmail.com>
Diffstat (limited to 'tests/memfile/run-test.sh')
-rwxr-xr-x | tests/memfile/run-test.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/memfile/run-test.sh b/tests/memfile/run-test.sh new file mode 100755 index 000000000..3a88b81de --- /dev/null +++ b/tests/memfile/run-test.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +echo "* Creating Memory Content Files" + +for i in {1..64} +do + echo "00001111000000001111111100000000" >> tempfile1.dat +done + +mkdir -p temp +cp tempfile1.dat temp/tempfile2.dat + +cd .. + +echo "* Running from the parent directory" +echo " * Memory Content File: tempfile1.dat" +../yosys -qp "read_verilog -defer memfile/memory.v; chparam -set MEMFILE \"tempfile1.dat\" memory; synth -top memory" +echo " * Memory Content File: temp/tempfile2.dat" +../yosys -qp "read_verilog -defer memfile/memory.v; chparam -set MEMFILE \"temp/tempfile2.dat\" memory; synth -top memory" + +cd memfile + +echo "* Running from the same directory" +echo " * Memory Content File: tempfile1.dat" +../../yosys -qp "read_verilog -defer memory.v; chparam -set MEMFILE \"tempfile1.dat\" memory; synth -top memory" +echo " * Memory Content File: temp/tempfile2.dat" +../../yosys -qp "read_verilog -defer memory.v; chparam -set MEMFILE \"temp/tempfile2.dat\" memory; synth -top memory" + +cd temp + +echo "* Running from a child directory" +echo " * Memory Content File: tempfile1.dat" +../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"tempfile1.dat\" memory; synth -top memory" +echo " * Memory Content File: temp/tempfile2.dat" +../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"temp/tempfile2.dat\" memory; synth -top memory" +echo " * Memory Content File: tempfile2.dat" +../../../yosys -qp "read_verilog -defer ../memory.v; chparam -set MEMFILE \"temp/tempfile2.dat\" memory; synth -top memory" + +echo "* Done" |