Commit 3a026a10 authored by Nicolas Chevillot's avatar Nicolas Chevillot

Renamed sufix into suffix

parent c4b5fced
...@@ -726,7 +726,7 @@ This case was very trivial. Let's try now to complicate the situation a bit. Let ...@@ -726,7 +726,7 @@ This case was very trivial. Let's try now to complicate the situation a bit. Let
Now we can see that the ``local`` key just has an associated path (i.e. this is a 1-element list), while we have two additional key identifiers: ``svn``, pointing to a list of two remote SVN repositories, and ``git``, pointing to a single remote GIT repository. Now we can see that the ``local`` key just has an associated path (i.e. this is a 1-element list), while we have two additional key identifiers: ``svn``, pointing to a list of two remote SVN repositories, and ``git``, pointing to a single remote GIT repository.
Regarding the SVN repositories, ``module2`` is pointing to the ``default/head`` revision while ``module3`` SVN repository is pointing to revision number 25 by appending the ``@25`` sufix to the repository URL.. Regarding the SVN repositories, ``module2`` is pointing to the ``default/head`` revision while ``module3`` SVN repository is pointing to revision number 25 by appending the ``@25`` suffix to the repository URL..
Finally, the Git repository ``module4`` is the only entry for the GIT module list and it is pointing to the ``default/master`` branch, but we can introduce the following extra modifiers to force a specific ``branch``, ``tag`` or ``commit``: Finally, the Git repository ``module4`` is the only entry for the GIT module list and it is pointing to the ``default/master`` branch, but we can introduce the following extra modifiers to force a specific ``branch``, ``tag`` or ``commit``:
...@@ -939,12 +939,12 @@ The first one is to include this as a new variable in the top Manifest.py, i.e.: ...@@ -939,12 +939,12 @@ The first one is to include this as a new variable in the top Manifest.py, i.e.:
"local" : [ "../../../testbench/counter_tb/verilog" ], "local" : [ "../../../testbench/counter_tb/verilog" ],
} }
But we can also define the variable value by injecting custom prefix or sufix Python code from the command line But we can also define the variable value by injecting custom prefix or suffix Python code from the command line
when ``hdlmake`` is executed, e.g.: when ``hdlmake`` is executed, e.g.:
.. code-block:: bash .. code-block:: bash
hdlmake --sufix "simulate_vhdl = False" makefile hdlmake --suffix "simulate_vhdl = False" makefile
...@@ -1644,7 +1644,7 @@ As an example, this command will generate the Makefile and will try to print ``H ...@@ -1644,7 +1644,7 @@ As an example, this command will generate the Makefile and will try to print ``H
hdlmake -p "print('Hello hdlmake')" makefile hdlmake -p "print('Hello hdlmake')" makefile
``-s, --sufix ARBITRARY_CODE`` ``-s, --suffix ARBITRARY_CODE``
------------------------------ ------------------------------
Add arbitrary Python code from the command line that **will be evaluated after each Manifest.py** parse action across the hierarchy. Add arbitrary Python code from the command line that **will be evaluated after each Manifest.py** parse action across the hierarchy.
......
...@@ -183,8 +183,8 @@ def _get_parser(): ...@@ -183,8 +183,8 @@ def _get_parser():
default="", default="",
help="Python code executed before every Manifest.py") help="Python code executed before every Manifest.py")
parser.add_argument( parser.add_argument(
"-s", "--sufix", "-s", "--suffix",
dest="sufix_code", dest="suffix_code",
default="", default="",
help="Python code executed after every Manifest.py") help="Python code executed after every Manifest.py")
return parser return parser
......
...@@ -194,7 +194,7 @@ types:[<type 'int'>] ...@@ -194,7 +194,7 @@ types:[<type 'int'>]
self.description = description self.description = description
self.options = [] self.options = []
self.prefix_code = "" self.prefix_code = ""
self.sufix_code = "" self.suffix_code = ""
self.config_file = None self.config_file = None
def __setitem__(self, name, value): def __setitem__(self, name, value):
...@@ -280,9 +280,9 @@ types:[<type 'int'>] ...@@ -280,9 +280,9 @@ types:[<type 'int'>]
"""Add the arbitrary Python to be executed just before the Manifest""" """Add the arbitrary Python to be executed just before the Manifest"""
self.prefix_code += code + '\n' self.prefix_code += code + '\n'
def add_sufix_code(self, code): def add_suffix_code(self, code):
"""Add the arbitrary Python to be executed just after the Manifest""" """Add the arbitrary Python to be executed just after the Manifest"""
self.sufix_code += code + '\n' self.suffix_code += code + '\n'
def __names(self): def __names(self):
"""A method that returns a list containing the name for every non """A method that returns a list containing the name for every non
...@@ -350,7 +350,7 @@ types:[<type 'int'>] ...@@ -350,7 +350,7 @@ types:[<type 'int'>]
# Now, grab the options coming from Manifest.py plus arbitrary_code: # Now, grab the options coming from Manifest.py plus arbitrary_code:
# - extra_context as global variables. # - extra_context as global variables.
# - options as local variables. # - options as local variables.
content = self.prefix_code + '\n' + content + '\n' + self.sufix_code content = self.prefix_code + '\n' + content + '\n' + self.suffix_code
options = self.__parser_runner(content, extra_context) options = self.__parser_runner(content, extra_context)
# Check the options that were defined in the local context # Check the options that were defined in the local context
ret = {} ret = {}
...@@ -376,7 +376,7 @@ types:[<type 'int'>] ...@@ -376,7 +376,7 @@ types:[<type 'int'>]
"Given option (%s) doesn't match specified types: (%s)" % "Given option (%s) doesn't match specified types: (%s)" %
(str(type(val)), str(opt.types))) (str(type(val)), str(opt.types)))
ret[opt_name] = val ret[opt_name] = val
# Thi is only for the options of the dictionary class: # This is only for the options of the dictionary class:
if isinstance(val, type(dict())): if isinstance(val, type(dict())):
try: try:
for key in val: for key in val:
......
...@@ -83,13 +83,13 @@ class ToolISim(ToolSim): ...@@ -83,13 +83,13 @@ class ToolISim(ToolSim):
else: else:
os_prefix = 'lin' os_prefix = 'lin'
if shell.architecture() == 32: if shell.architecture() == 32:
arch_sufix = '' arch_suffix = ''
else: else:
arch_sufix = '64' arch_suffix = '64'
xilinx_ini_path = str(os.path.join(xilinx_dir, xilinx_ini_path = str(os.path.join(xilinx_dir,
hdl_language, hdl_language,
"hdp", "hdp",
os_prefix + arch_sufix)) os_prefix + arch_suffix))
# Ensure the path is absolute and normalized # Ensure the path is absolute and normalized
return os.path.abspath(xilinx_ini_path) return os.path.abspath(xilinx_ini_path)
self.writeln("""## variables ############################# self.writeln("""## variables #############################
......
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