Skip to content

Commit 147c474

Browse files
committed
[Infra]: copying the non-synthesizable include files to the temp directory
and ignoring them as the design benchmark set for synthesis Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 78bbbc0 commit 147c474

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

vtr_flow/scripts/python_libs/vtr/odin/odin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ def create_circuits_list(main_circuit, include_files):
2525
if include_files:
2626
# Verify that files are Paths or convert them to Paths + check that they exist
2727
for include in include_files:
28+
file_extension = os.path.splitext(include)[-1]
29+
# if the include file is not in the supported HDLs, we drop it
30+
# NOTE: the include file is already copied to the temp folder
31+
if file_extension not in FILE_TYPES:
32+
continue
33+
2834
include_file = vtr.verify_file(include, "Circuit")
2935
circuit_list.append(include_file.name)
3036

vtr_flow/scripts/python_libs/vtr/yosys/yosys.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,18 @@
2929

3030

3131
def create_circuits_list(main_circuit, include_files):
32-
"""Create a list of all (.v) and (.vh) files"""
32+
"""Create a list of supported HDL files"""
3333
circuit_list = []
3434
# Check include files exist
3535
if include_files:
3636
# Verify that files are Paths or convert them to Paths + check that they exist
3737
for include in include_files:
38+
file_extension = os.path.splitext(include)[-1]
39+
# if the include file is not in the supported HDLs, we drop it
40+
# NOTE: the include file is already copied to the temp folder
41+
if file_extension not in FILE_TYPES:
42+
continue
43+
3844
include_file = vtr.verify_file(include, "Circuit")
3945
circuit_list.append(include_file.name)
4046

0 commit comments

Comments
 (0)