Skip to content
Snippets Groups Projects
Commit 21c7ae91 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Fixed item 100 l) to store the modelsim_project_files.txt in the modelsim...

Fixed item 100 l) to store the modelsim_project_files.txt in the modelsim build dir instead of in SVN tools/modelsim.
parent 12c6abc1
Branches
Tags
No related merge requests found
...@@ -748,8 +748,8 @@ k) Support multiple --technology ...@@ -748,8 +748,8 @@ k) Support multiple --technology
where to build and which technologies are supported. The toolset name (eg. 'unb1', 'unb2', ...) then is used where to build and which technologies are supported. The toolset name (eg. 'unb1', 'unb2', ...) then is used
as command line option. This scheme also allows having mutliple build trees. as command line option. This scheme also allows having mutliple build trees.
l) Location of modelsim_project_files.txt l) (FIXED - erko) Location of modelsim_project_files.txt
Default the modelsim_project_files.txt is now created in the SVN directory set by 'toolRootDir'/modelsim. Instead Default the modelsim_project_files.txt used to be created in the SVN directory set by 'toolRootDir'/modelsim. Instead
the modelsim_project_files.txt should better be created in the build directory 'build_dir_sim'/modelsim/. the modelsim_project_files.txt should better be created in the build directory 'build_dir_sim'/modelsim/.
m) (FIXED - erko) Issue exit error when a library name occurs double m) (FIXED - erko) Issue exit error when a library name occurs double
......
...@@ -54,6 +54,10 @@ proc hdl_env {} { ...@@ -54,6 +54,10 @@ proc hdl_env {} {
return $env(RADIOHDL) return $env(RADIOHDL)
} }
proc hdl_build {} {
global env
return $env(HDL_BUILD_DIR)
}
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# LP = Load project # LP = Load project
...@@ -320,7 +324,7 @@ proc mk_test {arg_lib} { ...@@ -320,7 +324,7 @@ proc mk_test {arg_lib} {
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
proc read_modelsim_project_files_file {} { proc read_modelsim_project_files_file {} {
set fp [open [hdl_env]/tools/modelsim/modelsim_project_files.txt] set fp [open [hdl_build]/modelsim/modelsim_project_files.txt]
set data [read $fp] set data [read $fp]
close $fp close $fp
set lines [split $data \n] set lines [split $data \n]
......
...@@ -277,18 +277,15 @@ class ModelsimConfig(hdl_config.HdlConfig): ...@@ -277,18 +277,15 @@ class ModelsimConfig(hdl_config.HdlConfig):
fp.write('DefaultRadix = decimal\n') fp.write('DefaultRadix = decimal\n')
#fp.write('DefaultRadixFlags = enumnumeric\n') #fp.write('DefaultRadixFlags = enumnumeric\n')
def create_modelsim_project_files_file(self, filePath=None, lib_names=None): def create_modelsim_project_files_file(self, lib_names=None):
"""Create file with list of the Modelsim project files for all HDL libraries. """Create file with list of the Modelsim project files for all HDL libraries.
Arguments: Arguments:
- filePath : path to modelsim_project_files.txt, when None then the file is written in the default toolRootDir
- lib_names : one or more HDL libraries - lib_names : one or more HDL libraries
""" """
fileName = 'modelsim_project_files.txt' # use fixed file name fileName = 'modelsim_project_files.txt' # use fixed file name
if filePath==None: build_maindir, build_tooldir = self.get_tool_build_dir('sim')
fileNamePath=os.path.join(self.toolRootDir, 'modelsim', fileName) # default file path fileNamePath=os.path.join(build_maindir, build_tooldir, fileName) # and use too build dir for file path
else:
fileNamePath=os.path.join(filePath, fileName) # specified file path
if lib_names==None: lib_names=self.lib_names if lib_names==None: lib_names=self.lib_names
with open(fileNamePath, 'w') as fp: with open(fileNamePath, 'w') as fp:
lib_dicts = self.libs.get_dicts('hdl_lib_name', lib_names) lib_dicts = self.libs.get_dicts('hdl_lib_name', lib_names)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment