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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
fd9a79ec
Commit
fd9a79ec
authored
7 years ago
by
Reinier van der Walle
Browse files
Options
Downloads
Patches
Plain Diff
Added the substitute_key_words function
parent
66cd943f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/oneclick/base/hdl_config.py
+14
-2
14 additions, 2 deletions
tools/oneclick/base/hdl_config.py
with
14 additions
and
2 deletions
tools/oneclick/base/hdl_config.py
+
14
−
2
View file @
fd9a79ec
...
@@ -110,7 +110,11 @@ class HdlConfig:
...
@@ -110,7 +110,11 @@ class HdlConfig:
self
.
libRootDir
=
os
.
path
.
expandvars
(
self
.
tool_dict
[
'
lib_root_dir
'
])
self
.
libRootDir
=
os
.
path
.
expandvars
(
self
.
tool_dict
[
'
lib_root_dir
'
])
self
.
libs
=
common_dict_file
.
CommonDictFile
(
self
.
libRootDir
,
libFileName
,
libFileSections
)
# library dict files
self
.
libs
=
common_dict_file
.
CommonDictFile
(
self
.
libRootDir
,
libFileName
,
libFileSections
)
# library dict files
if
self
.
libs
.
nof_dicts
==
0
:
sys
.
exit
(
'
Error : No HDL library config file found
'
)
if
self
.
libs
.
nof_dicts
==
0
:
sys
.
exit
(
'
Error : No HDL library config file found
'
)
# Substitute key words occurring in hdllib.cfg files with their value.
self
.
substitute_key_words
()
# Keep the generic HDL libraries and remove those that do not match the specified IP technologies
# Keep the generic HDL libraries and remove those that do not match the specified IP technologies
self
.
technologyNames
=
self
.
tool_dict
[
'
technology_names
'
].
split
()
self
.
technologyNames
=
self
.
tool_dict
[
'
technology_names
'
].
split
()
self
.
removed_dicts
=
[]
self
.
removed_dicts
=
[]
...
@@ -209,7 +213,15 @@ class HdlConfig:
...
@@ -209,7 +213,15 @@ class HdlConfig:
self
.
unavailable_use_libs
=
self
.
unavailable_use_synth_libs
+
self
.
unavailable_use_ip_libs
+
self
.
unavailable_use_sim_libs
self
.
unavailable_use_libs
=
self
.
unavailable_use_synth_libs
+
self
.
unavailable_use_ip_libs
+
self
.
unavailable_use_sim_libs
self
.
unavailable_use_libs
=
cm
.
unique
(
self
.
unavailable_use_libs
)
# aggregate list of use_*_libs
self
.
unavailable_use_libs
=
cm
.
unique
(
self
.
unavailable_use_libs
)
# aggregate list of use_*_libs
self
.
unavailable_include_ip_libs
=
cm
.
unique
(
self
.
unavailable_include_ip_libs
)
# list of include_ip_use_libs
self
.
unavailable_include_ip_libs
=
cm
.
unique
(
self
.
unavailable_include_ip_libs
)
# list of include_ip_use_libs
# The Key value pairs defined in hdltool<toolset>.cfg can be used in hdllib.cfg files. See hdllib.cfg of technology library
def
substitute_key_words
(
self
):
for
lib
in
self
.
libs
.
dicts
:
for
lib_key
,
lib_value
in
lib
.
items
():
for
tool_key
,
tool_value
in
self
.
tool_dict
.
items
():
tool_key_string
=
'
<%s>
'
%
tool_key
if
tool_key_string
in
lib_value
:
lib
[
lib_key
]
=
lib_value
.
replace
(
tool_key_string
,
tool_value
)
def
check_library_names
(
self
,
check_lib_names
,
lib_names
=
None
):
def
check_library_names
(
self
,
check_lib_names
,
lib_names
=
None
):
"""
Check that HDL library names exists within the list of library names, if not then exit with Error message.
"""
Check that HDL library names exists within the list of library names, if not then exit with Error message.
...
...
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