Commit 968fa87d authored by Tristan Gingold's avatar Tristan Gingold

Document and effectively support ghdl_opt setting.

parent f38d03cd
...@@ -1469,6 +1469,15 @@ Icarus Verilog specific variables: ...@@ -1469,6 +1469,15 @@ Icarus Verilog specific variables:
+----------------+--------------+-----------------------------------------------------------------+-----------+ +----------------+--------------+-----------------------------------------------------------------+-----------+
GHDL specific variables:
+----------------+--------------+-----------------------------------------------------------------+-----------+
| Name | Type | Description | Default |
+================+==============+=================================================================+===========+
| ghdl_opt | str | Additional options for ghdl | "" |
+----------------+--------------+-----------------------------------------------------------------+-----------+
Synthesis variables Synthesis variables
------------------- -------------------
......
...@@ -48,8 +48,8 @@ class ToolGHDL(ToolSim): ...@@ -48,8 +48,8 @@ class ToolGHDL(ToolSim):
'mrproper': ["*.vcd"]} 'mrproper': ["*.vcd"]}
SIMULATOR_CONTROLS = {'vlog': None, SIMULATOR_CONTROLS = {'vlog': None,
'vhdl': 'ghdl -a $<', 'vhdl': '$(GHDL) -a $(GHDL_OPT) $<',
'compiler': 'ghdl -e $(TOP_MODULE)'} 'compiler': '$(GHDL) -e $(GHDL_OPT) $(TOP_MODULE)'}
def __init__(self): def __init__(self):
super(ToolGHDL, self).__init__() super(ToolGHDL, self).__init__()
...@@ -63,7 +63,8 @@ class ToolGHDL(ToolSim): ...@@ -63,7 +63,8 @@ class ToolGHDL(ToolSim):
"""Print the GHDL options to the Makefile""" """Print the GHDL options to the Makefile"""
ghdl_opt = self.manifest_dict.get("ghdl_opt", '') ghdl_opt = self.manifest_dict.get("ghdl_opt", '')
ghdl_string = string.Template( ghdl_string = string.Template(
"""GHDL_OPT := ${ghdl_opt}\n""") "GHDL := ghdl\n"
"GHDL_OPT := ${ghdl_opt}\n")
self.writeln(ghdl_string.substitute( self.writeln(ghdl_string.substitute(
ghdl_opt=ghdl_opt)) ghdl_opt=ghdl_opt))
......
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