Skip to content
GitLab
Explore
Sign in
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
b199208d
Commit
b199208d
authored
11 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Use <lib_name>.mpf instead of same fixed hdllib.mpf for all.
parent
ae04ee82
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/modelsim_config.py
+8
-8
8 additions, 8 deletions
tools/oneclick/base/modelsim_config.py
with
8 additions
and
8 deletions
tools/oneclick/base/modelsim_config.py
+
8
−
8
View file @
b199208d
...
...
@@ -30,11 +30,10 @@ import os.path
class
ModelsimConfig
(
hdl_config
.
HdlConfig
):
def
__init__
(
self
,
libRootDir
,
toolRootDir
=
''
,
libFileName
=
'
hdllib.cfg
'
,
toolFileName
=
'
hdltool.cfg
'
):
def
__init__
(
self
,
libRootDir
,
toolRootDir
,
libFileName
=
'
hdllib.cfg
'
,
toolFileName
=
'
hdltool.cfg
'
):
"""
Get Modelsim tool info from toolRootDir and all HDL library info from libRootDir.
"""
hdl_config
.
HdlConfig
.
__init__
(
self
,
libRootDir
,
toolRootDir
,
libFileName
,
toolFileName
)
# Modelsim
self
.
MODELSIM_MPF_NAME
=
'
hdllib.mpf
'
def
read_compile_order_from_mpf
(
self
,
mpfPathName
):
"""
Utility to read the compile order of the project files from an existing <mpfPathName>.mpf and save it into hdl_order.out.
"""
...
...
@@ -70,14 +69,14 @@ class ModelsimConfig(hdl_config.HdlConfig):
lib_dicts
=
self
.
libs
.
get_dicts
(
'
hdl_lib_name
'
,
lib_names
)
for
lib_dict
in
cm
.
listify
(
lib_dicts
):
# Open mpf
mpf_name
=
self
.
MODELSIM_MPF_NAME
lib_name
=
lib_dict
[
'
hdl_lib_name
'
]
mpf_name
=
lib_name
+
'
.mpf
'
mpf_path
=
self
.
get_lib_build_sim_dirs
(
lib_dict
)
cm
.
mkdir
(
mpf_path
)
mpfPathName
=
os
.
path
.
join
(
mpf_path
,
mpf_name
)
with
open
(
mpfPathName
,
'
w
'
)
as
fp
:
# Write [Library] section for afileNamell used libraries
fp
.
write
(
'
[Library]
\n
'
)
lib_name
=
lib_dict
[
'
hdl_lib_name
'
]
use_lib_names
=
self
.
derive_all_use_libs
(
lib_name
)
use_lib_dicts
=
self
.
libs
.
get_dicts
(
'
hdl_lib_name
'
,
use_lib_names
)
use_lib_build_sim_dirs
=
self
.
get_lib_build_sim_dirs
(
use_lib_dicts
)
...
...
@@ -138,8 +137,9 @@ class ModelsimConfig(hdl_config.HdlConfig):
fp
.
write
(
'
IterationLimit = 100
\n
'
)
fp
.
write
(
'
DefaultRadix = decimal
\n
'
)
def
create_modelsim_project_files_file
(
self
,
fileNamePath
=
'
modelsim_project_files.txt
'
,
lib_names
=
None
):
def
create_modelsim_project_files_file
(
self
,
fileNamePath
=
None
,
lib_names
=
None
):
"""
Create file with list of the Modelsim project files for all HDL libraries in the specified list of lib_names.
"""
if
fileNamePath
==
None
:
fileNamePath
=
os
.
path
.
join
(
self
.
toolRootDir
,
'
modelsim
'
,
'
modelsim_project_files.txt
'
)
if
lib_names
==
None
:
lib_names
=
self
.
lib_names
with
open
(
fileNamePath
,
'
w
'
)
as
fp
:
lib_dicts
=
self
.
libs
.
get_dicts
(
'
hdl_lib_name
'
,
lib_names
)
...
...
@@ -152,7 +152,7 @@ if __name__ == '__main__':
# Read the dictionary info from all HDL tool and library configuration files in the current directory and the sub directories
libRootDir
=
'
RADIOHDL
'
#libRootDir = 'UNB'
msim
=
ModelsimConfig
(
libRootDir
=
os
.
environ
[
libRootDir
],
toolRootDir
=
os
.
environ
[
'
UNB
'
]
,
libFileName
=
'
hdllib.cfg
'
,
toolFileName
=
'
hdltool.cfg
'
)
msim
=
ModelsimConfig
(
libRootDir
=
os
.
environ
[
libRootDir
],
toolRootDir
=
os
.
path
.
expandvars
(
'
$RADIOHDL/tools
'
)
,
libFileName
=
'
hdllib.cfg
'
,
toolFileName
=
'
hdltool.cfg
'
)
print
'
#
'
print
'
# ModelsimConfig:
'
...
...
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