Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
12c6abc1
Commit
12c6abc1
authored
Apr 17, 2015
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Define separate method get_tool_build_dir().
parent
fa1c3b6a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/oneclick/base/hdl_config.py
+26
-11
26 additions, 11 deletions
tools/oneclick/base/hdl_config.py
with
26 additions
and
11 deletions
tools/oneclick/base/hdl_config.py
+
26
−
11
View file @
12c6abc1
...
@@ -178,19 +178,17 @@ class HdlConfig:
...
@@ -178,19 +178,17 @@ class HdlConfig:
return
lib_order
return
lib_order
def
get_
lib
_build_dir
s
(
self
,
build_type
,
lib_dicts
=
None
):
def
get_
tool
_build_dir
(
self
,
build_type
):
"""
Get the tool build directory
for all HDL libraries in the specified list of lib_dicts
.
"""
Get the
central
tool build directory.
The build_type can be:
The build_type can be:
'
sim
'
uses the
'
build_dir_sim
'
key in the
lib_dict,
'
sim
'
uses the
'
build_dir_sim
'
key in the
self.tool dictionary
'
synth
'
uses the
'
build_dir_synth
'
key in the
lib_dict
'
synth
'
uses the
'
build_dir_synth
'
key in the
self.tool dictionary
If the build dir key in HDL library config file is
''
then
The build dir key value must be an absolute directory path. The tool build dir consists of
treat the build dir key as local directory in the HDL library directory.
- the absolute path to the central main build directory
else
- the tool_name_key value as subdirectory
treat the build dir key as central directory.
"""
"""
if
lib_dicts
==
None
:
lib_dicts
=
self
.
libs
.
dicts
build_dir_key
=
'
build_dir_
'
+
build_type
build_dir_key
=
'
build_dir_
'
+
build_type
tool_name_key
=
'
tool_name_
'
+
build_type
tool_name_key
=
'
tool_name_
'
+
build_type
if
self
.
tool
.
get_key_values
(
build_dir_key
)
==
None
:
if
self
.
tool
.
get_key_values
(
build_dir_key
)
==
None
:
...
@@ -200,13 +198,30 @@ class HdlConfig:
...
@@ -200,13 +198,30 @@ class HdlConfig:
sys
.
exit
(
'
Error : The build_dir_key value must be an absolute path
'
)
sys
.
exit
(
'
Error : The build_dir_key value must be an absolute path
'
)
if
self
.
tool
.
get_key_values
(
tool_name_key
)
==
None
:
if
self
.
tool
.
get_key_values
(
tool_name_key
)
==
None
:
sys
.
exit
(
'
Error : Unknown build type for tool_name_key
'
)
sys
.
exit
(
'
Error : Unknown build type for tool_name_key
'
)
build_subdir
=
self
.
tool
.
get_key_values
(
tool_name_key
)
build_tooldir
=
self
.
tool
.
get_key_values
(
tool_name_key
)
return
build_maindir
,
build_tooldir
def
get_lib_build_dirs
(
self
,
build_type
,
lib_dicts
=
None
):
"""
Get the subdirectories within the central tool build directory for all HDL libraries in the specified list of lib_dicts.
The build_type can be:
'
sim
'
uses the
'
build_dir_sim
'
key in the self.tool dictionary
'
synth
'
uses the
'
build_dir_synth
'
key in the self.tool dictionary
The build dir key value must be an absolute directory path. The lib build dir consists of
- the absolute path to the central main build directory
- the tool_name_key value as subdirectory
- the library name as library subdirectory
"""
if
lib_dicts
==
None
:
lib_dicts
=
self
.
libs
.
dicts
build_maindir
,
build_tooldir
=
self
.
get_tool_build_dir
(
build_type
)
build_dirs
=
[]
build_dirs
=
[]
for
lib_dict
in
cm
.
listify
(
lib_dicts
):
for
lib_dict
in
cm
.
listify
(
lib_dicts
):
lib_name
=
lib_dict
[
'
hdl_lib_name
'
]
lib_name
=
lib_dict
[
'
hdl_lib_name
'
]
build_dirs
.
append
(
os
.
path
.
join
(
build_maindir
,
build_
sub
dir
,
lib_name
))
# central build main directory with subdirectory per library
build_dirs
.
append
(
os
.
path
.
join
(
build_maindir
,
build_
tool
dir
,
lib_name
))
# central build main directory with subdirectory per library
return
cm
.
unlistify
(
build_dirs
)
return
cm
.
unlistify
(
build_dirs
)
def
create_lib_order_files
(
self
,
build_type
,
lib_names
=
None
):
def
create_lib_order_files
(
self
,
build_type
,
lib_names
=
None
):
"""
Create the compile order file
'
<lib_name>_lib_order.txt
'
for all HDL libraries in the specified list of lib_names.
"""
Create the compile order file
'
<lib_name>_lib_order.txt
'
for all HDL libraries in the specified list of lib_names.
...
...
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