Commit c82de3ff authored by Paweł Szostek's avatar Paweł Szostek

use EnvChecker for modelsim.ini path

parent e0d8f4dd
......@@ -62,6 +62,7 @@ class ManifestParser(ConfigParser):
self.add_option('syn_pre_cmd', default=None, help="Command to be executed before synthesis", type='')
self.add_option('syn_post_cmd', default=None, help="Command to be executed after synthesis", type='')
self.add_delimiter()
self.add_option('top_module', default=None, help="Top level entity for synthesis and simulation", type='')
self.add_delimiter()
......@@ -117,7 +118,7 @@ class ManifestParser(ConfigParser):
return self.add_config_file(manifest.path)
def print_help(self):
ConfigParser.help()
self.help()
def search_for_package(self):
"""
......
......@@ -25,8 +25,8 @@
from __future__ import print_function
import xml.dom.minidom
import xml.parsers.expat
import os
import re
import os
XmlImpl = xml.dom.minidom.getDOMImplementation()
......@@ -37,11 +37,10 @@ def detect_modelsim_version(path):
pass
class ModelsiminiReader(object):
def __init__(self, path=None):
if path is None:
path = self.modelsim_ini_dir() + "/modelsim.ini"
path = os.path.join(global_mod.env["modelsim_path"], "/modelsim.ini")
self.path = path
def get_libraries(self):
......@@ -75,9 +74,3 @@ class ModelsiminiReader(object):
lib = line[0].strip()
libs.append(lib.lower())
return libs
@staticmethod
def modelsim_ini_dir():
vsim_path = os.popen("which vsim").read().strip()
bin_path = os.path.dirname(vsim_path)
return os.path.abspath(bin_path+"/../")
......@@ -176,7 +176,7 @@ class ConfigParser(object):
raise RuntimeError("No such option as " + str(name))
def help(self):
print("Variables available in a manifest:")
print("Variables with special meaning for Hdlmake:")
for opt in self.options:
if opt is None:
print("")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment