Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SoCTools Flow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
SoCTools Flow
Commits
73a86713
Commit
73a86713
authored
1 year ago
by
Daniel Newbrook
Browse files
Options
Downloads
Patches
Plain Diff
remove cp function for synopsys dc flists
parent
eb193b3a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/filelist_compile.py
+32
-24
32 additions, 24 deletions
bin/filelist_compile.py
with
32 additions
and
24 deletions
bin/filelist_compile.py
+
32
−
24
View file @
73a86713
...
...
@@ -93,8 +93,11 @@ def read_list(filelist, first, incdirs, args):
compiled_filelist
.
append
(
"
read_hdl -language sv
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
else
:
compiled_filelist
.
append
(
"
read_hdl
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
elif
args
.
synthesis
==
True
:
compiled_filelist
.
append
(
"
cp -p
"
+
str
(
env_var_substitute
((
line_list
[
1
])
+
"
/
"
+
str
(
file
),
tcl
=
True
,
synthesis
=
True
)))
elif
args
.
dc
==
True
:
if
file
.
endswith
(
"
.sv
"
):
compiled_filelist
.
append
(
"
analyze -format sverilog -lib WORK -define POWER_PINS
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
else
:
compiled_filelist
.
append
(
"
analyze -format verilog -lib WORK -define POWER_PINS
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
elif
args
.
makefile
==
True
:
compiled_filelist
.
append
(
"
VERILOG_SOURCES +=
"
+
str
(
env_var_substitute
((
line_list
[
1
])
+
"
/
"
+
str
(
file
),
synthesis
=
True
)))
else
:
...
...
@@ -108,8 +111,11 @@ def read_list(filelist, first, incdirs, args):
compiled_filelist
.
append
(
"
read_hdl -language sv
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
else
:
compiled_filelist
.
append
(
"
read_hdl
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
elif
args
.
synthesis
==
True
:
compiled_filelist
.
append
(
"
cp -p
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
elif
args
.
dc
==
True
:
if
file
.
endswith
(
"
.sv
"
):
compiled_filelist
.
append
(
"
analyze -format sverilog -lib WORK -define POWER_PINS
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
else
:
compiled_filelist
.
append
(
"
analyze -format verilog -lib WORK -define POWER_PINS
"
+
str
(
env_var_substitute
(
line_list
[
1
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
elif
args
.
makefile
==
True
:
compiled_filelist
.
append
(
"
VERILOG_SOURCES +=
"
+
str
(
line_list
[
1
]).
replace
(
"
$
"
,
"
$env
"
)
+
"
/
"
+
str
(
file
))
else
:
...
...
@@ -129,32 +135,32 @@ def read_list(filelist, first, incdirs, args):
if
first
==
True
:
if
args
.
genus
==
True
:
compiled_filelist
.
append
(
"
set_db init_hdl_search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
elif
args
.
synthesis
==
True
:
pass
elif
args
.
dc
==
True
:
compiled_filelist
.
append
(
"
set search_path [concat $search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
else
:
compiled_filelist
.
append
(
"
set search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
first
=
False
else
:
if
args
.
genus
==
True
:
compiled_filelist
.
append
(
"
set_db init_hdl_search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
elif
args
.
synthesis
==
True
:
pass
elif
args
.
dc
==
True
:
compiled_filelist
.
append
(
"
set search_path [concat $search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
else
:
compiled_filelist
.
append
(
"
set search_path [ concat $search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
else
:
if
first
==
True
:
if
args
.
genus
==
True
:
compiled_filelist
.
append
(
"
set_db init_hdl_search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
elif
args
.
synthesis
==
True
:
pass
elif
args
.
dc
==
True
:
compiled_filelist
.
append
(
"
set search_path [concat $search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
else
:
compiled_filelist
.
append
(
"
set search_path
"
+
str
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
)).
replace
(
"
$
"
,
"
$env
"
))
first
=
False
else
:
if
args
.
genus
==
True
:
compiled_filelist
.
append
(
"
set_db init_hdl_search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
elif
args
.
synthesis
==
True
:
pass
elif
args
.
dc
==
True
:
compiled_filelist
.
append
(
"
set search_path [concat $search_path
"
+
str
(
env_var_substitute
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
),
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
else
:
compiled_filelist
.
append
(
"
set search_path [ concat $search_path
"
+
str
(
line_list
[
0
].
lstrip
(
"
+incdir+
"
)).
replace
(
"
$
"
,
"
$env
"
)
+
"
]
"
)
# elif args.makefile == True:
...
...
@@ -185,13 +191,13 @@ def read_list(filelist, first, incdirs, args):
# Append to filelist
if
args
.
tcl
==
True
:
if
args
.
absolute
==
True
:
if
args
.
synthesis
==
True
:
hdl_files
.
append
(
str
(
env_var_substitute
(
line_list
[
0
],
synthesis
=
True
)
))
if
args
.
dc
==
True
:
hdl_files
.
append
(
str
(
env_var_substitute
(
line_list
[
0
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
else
:
hdl_files
.
append
(
str
(
env_var_substitute
(
line_list
[
0
],
tcl
=
True
)).
replace
(
"
$
"
,
"
$env
"
))
else
:
if
args
.
synthesis
==
True
:
hdl_files
.
append
(
str
(
line_list
[
0
]))
if
args
.
dc
==
True
:
hdl_files
.
append
(
str
(
line_list
[
0
])
.
replace
(
"
$
"
,
"
$env
"
)
)
else
:
hdl_files
.
append
(
str
(
line_list
[
0
]).
replace
(
"
$
"
,
"
$env
"
))
elif
args
.
makefile
==
True
:
...
...
@@ -215,11 +221,15 @@ def read_list(filelist, first, incdirs, args):
for
file
in
hdl_files
:
temp_str
+=
file
+
"
"
compiled_filelist
.
append
(
temp_str
)
elif
args
.
synthesis
==
True
:
temp_str
=
""
elif
args
.
dc
==
True
:
if
hdl_files
[
0
].
endswith
(
"
.sv
"
):
temp_str
=
f
'
analyze -format sverilog -lib WORK -define POWER_PINS [list
'
else
:
temp_str
=
f
'
analyze -format verilog -lib WORK -define POWER_PINS [list
'
for
file
in
hdl_files
:
temp_str
+=
f
'
cp -p
{
file
}
{
args
.
rtldir
}
/
\n
'
compiled_filelist
.
append
(
temp_str
)
temp_str
+=
file
+
"
"
temp_str
+=
"
]
"
compiled_filelist
.
append
(
temp_str
)
else
:
temp_str
=
f
'
add_files -norecurse -force -copy_to
{
args
.
rtldir
}
"'
for
file
in
hdl_files
:
...
...
@@ -233,7 +243,7 @@ def incdir_compile(args, incdirs):
temp_str
=
""
if
args
.
tcl
==
True
:
if
args
.
genus
==
False
:
if
args
.
synthesis
==
False
:
if
args
.
dc
==
False
:
if
len
(
incdirs
)
>
0
:
temp_str
=
'
set_property include_dirs
"'
for
directory
in
incdirs
:
...
...
@@ -270,8 +280,6 @@ def filelist_compile(args):
filelist
=
[
x
+
"
\n
"
for
x
in
filelist
]
# Create string of all paths to write out
filelist_str
=
filelist_header
if
(
args
.
tcl
==
False
and
args
.
makefile
==
False
)
else
filelist_header
.
replace
(
"
//
"
,
"
#
"
)
if
args
.
synthesis
==
True
:
filelist_str
=
"
#!/bin/bash
\n
"
+
filelist_str
if
args
.
tcl
==
True
:
if
args
.
genus
==
False
:
# filelist_str += incdir_compile(args, incdirs) + "\n"
...
...
@@ -292,7 +300,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
"
-e
"
,
"
--exclude
"
,
action
=
'
store_true
'
,
help
=
"
Exclude filists including these strings
"
)
parser
.
add_argument
(
"
-t
"
,
"
--tcl
"
,
action
=
'
store_true
'
,
help
=
"
Generate a TCL Script
"
)
parser
.
add_argument
(
"
-g
"
,
"
--genus
"
,
action
=
'
store_true
'
,
help
=
"
Generate TCL script for genus
"
)
parser
.
add_argument
(
"
-s
"
,
"
--
synthesis
"
,
action
=
'
store_true
'
,
help
=
"
Generate bash script for copying flist to synthesis
"
)
parser
.
add_argument
(
"
-s
"
,
"
--
dc
"
,
action
=
'
store_true
'
,
help
=
"
Generate bash script for copying flist to synthesis
"
)
parser
.
add_argument
(
"
-m
"
,
"
--makefile
"
,
action
=
'
store_true
'
,
help
=
"
Generate a Makefile RTL Sources File
"
)
parser
.
add_argument
(
"
-a
"
,
"
--absolute
"
,
action
=
'
store_true
'
,
help
=
"
Substitute environment Variables with Absolute Path
"
)
parser
.
add_argument
(
"
-v
"
,
"
--vfiles
"
,
action
=
'
store_true
'
,
help
=
"
Generate a vc filelist
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment