mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-03 15:47:58 +00:00
Merge a8485a2adf into a54bca5493
This commit is contained in:
commit
23a4b4ae2b
127 changed files with 1404 additions and 1342 deletions
9
tests/arch/analogdevices/generate_mk.py
Normal file
9
tests/arch/analogdevices/generate_mk.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
import mem_gen
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
python3 mem_gen.py
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash
|
||||
8
tests/arch/anlogic/generate_mk.py
Normal file
8
tests/arch/anlogic/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/ecp5/generate_mk.py
Normal file
8
tests/arch/ecp5/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/efinix/generate_mk.py
Normal file
8
tests/arch/efinix/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
|
|
@ -13,7 +13,7 @@ design -load postopt # load the post-opt design (otherwise equiv_opt loads the p
|
|||
cd fsm # Constrain all select calls below inside the top module
|
||||
|
||||
select -assert-count 6 t:LUTFF
|
||||
select -assert-max 4 t:LUT2
|
||||
select -assert-max 2 t:LUT3
|
||||
select -assert-max 9 t:LUT4
|
||||
select -assert-max 5 t:LUT2
|
||||
select -assert-max 4 t:LUT3
|
||||
select -assert-max 8 t:LUT4
|
||||
select -assert-none t:LUT2 t:LUT3 t:LUT4 t:LUTFF %% t:* %D
|
||||
|
|
|
|||
8
tests/arch/fabulous/generate_mk.py
Normal file
8
tests/arch/fabulous/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
8
tests/arch/gatemate/generate_mk.py
Normal file
8
tests/arch/gatemate/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
52
tests/arch/generate_mk.py
Normal file
52
tests/arch/generate_mk.py
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.append("..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
techlibs_dir = Path("../../techlibs")
|
||||
|
||||
# Architecture-specific defines
|
||||
defines = {
|
||||
"ice40": ["ICE40_HX", "ICE40_LP", "ICE40_U"]
|
||||
}
|
||||
|
||||
def archs():
|
||||
# Loop over architectures
|
||||
for arch in techlibs_dir.iterdir():
|
||||
if not arch.is_dir():
|
||||
continue
|
||||
arch_name = arch.name
|
||||
|
||||
for path in arch.rglob("cells_sim.v"):
|
||||
rel_parts = path.relative_to(techlibs_dir).parts
|
||||
target_base = "_".join(rel_parts[-len(rel_parts):]).replace(".v", "")
|
||||
path_str = str(path)
|
||||
if arch_name in defines:
|
||||
for defn in defines[arch_name]:
|
||||
target_name = f"{target_base}_{defn}"
|
||||
cmd = f"iverilog -t null -I{arch} -D{defn} -DNO_ICE40_DEFAULT_ASSIGNMENTS {path_str}"
|
||||
gen_tests_makefile.generate_target(target_name, cmd)
|
||||
else:
|
||||
target_name = f"{target_base}"
|
||||
cmd = f"iverilog -t null -I{arch} -g2005-sv {path_str}"
|
||||
gen_tests_makefile.generate_target(target_name, cmd)
|
||||
|
||||
def common():
|
||||
for path in ["../../techlibs/common/simcells.v", "../../techlibs/common/simlib.v"]:
|
||||
path_obj = Path(path)
|
||||
target_name = path_obj.stem
|
||||
cmd = f"iverilog -t null {path}"
|
||||
gen_tests_makefile.generate_target(target_name, cmd)
|
||||
|
||||
def main():
|
||||
def callback():
|
||||
archs()
|
||||
common()
|
||||
|
||||
gen_tests_makefile.generate_custom(callback)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
8
tests/arch/gowin/generate_mk.py
Normal file
8
tests/arch/gowin/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/ice40/generate_mk.py
Normal file
8
tests/arch/ice40/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/intel_alm/generate_mk.py
Normal file
8
tests/arch/intel_alm/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/machxo2/generate_mk.py
Normal file
8
tests/arch/machxo2/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/microchip/generate_mk.py
Normal file
8
tests/arch/microchip/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/nanoxplore/generate_mk.py
Normal file
8
tests/arch/nanoxplore/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/nexus/generate_mk.py
Normal file
8
tests/arch/nexus/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
8
tests/arch/quicklogic/pp3/generate_mk.py
Normal file
8
tests/arch/quicklogic/pp3/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
9
tests/arch/quicklogic/qlf_k6n10f/generate_mk.py
Normal file
9
tests/arch/quicklogic/qlf_k6n10f/generate_mk.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
import mem_gen
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
python3 mem_gen.py
|
||||
source ../../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
source ../common-env.sh
|
||||
|
||||
set -e
|
||||
|
||||
declare -A defines=( ["ice40"]="ICE40_HX ICE40_LP ICE40_U" )
|
||||
|
||||
echo "Running syntax check on arch sim models"
|
||||
for arch in ../../techlibs/*; do
|
||||
find $arch -name cells_sim.v | while read path; do
|
||||
arch_name=$(basename -- $arch)
|
||||
if [ "${defines[$arch_name]}" ]; then
|
||||
for def in ${defines[$arch_name]}; do
|
||||
echo -n "Test $path -D$def ->"
|
||||
iverilog -t null -I$arch -D$def -DNO_ICE40_DEFAULT_ASSIGNMENTS $path
|
||||
echo " ok"
|
||||
done
|
||||
else
|
||||
echo -n "Test $path ->"
|
||||
iverilog -t null -I$arch -g2005-sv $path
|
||||
echo " ok"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
for path in "../../techlibs/common/simcells.v" "../../techlibs/common/simlib.v"; do
|
||||
echo -n "Test $path ->"
|
||||
iverilog -t null $path
|
||||
echo " ok"
|
||||
done
|
||||
8
tests/arch/xilinx/generate_mk.py
Normal file
8
tests/arch/xilinx/generate_mk.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
sys.path.append("../..")
|
||||
|
||||
import gen_tests_makefile
|
||||
|
||||
gen_tests_makefile.generate(["--yosys-scripts", "--bash", "--yosys-args", "-w 'Yosys has only limited support for tri-state logic at the moment.'" ])
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
source ../../gen-tests-makefile.sh
|
||||
generate_mk --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"
|
||||
Loading…
Add table
Add a link
Reference in a new issue