Commit 29448e32 authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Add call to the vhdl B-mapper also for a C function with some fpga mode defined.

parent 9f430d68
......@@ -384,9 +384,11 @@ def ProcessCustomBackends(
panic("Unexpected call of getCustomBackends...") # pragma: no cover
for si in [x for x in SystemsAndImplementations if x[2] is not None and x[2].lower() in ["gui_ri", "gui_pi", "vhdl"]]:
for si in [x for x in SystemsAndImplementations if x[2] is not None and x[4] is not None and (x[2].lower() in ["gui_ri", "gui_pi", "vhdl"] or (x[2].lower() == "c" and x[4] is not ''))]:
# We do, start the work
spName, sp_impl, lang, maybeFVname = si[0], si[1], si[2], si[3]
if si[2].lower() == "c" and si[4] is not '':
lang = "vhdl"
sp = commonPy.aadlAST.g_apLevelContainers[spName]
if len(sp._params) == 0:
if lang.lower() == "gui_ri": # pragma: no cover
......@@ -1254,7 +1254,7 @@ class Parser(antlr.LLkParser):
if not g_apLevelContainers.has_key(typeid.getText()):
panic("Line %d: Subprogram (%s) must first be declared before it is implemented" % (typeid.getLine(), typeid.getText()))
sp = g_apLevelContainers[typeid.getText()]
g_subProgramImplementations.append([typeid.getText(), defid.getText(), sp._language, "" ])
g_subProgramImplementations.append([typeid.getText(), defid.getText(), sp._language, "", sp._fpgaModes])
la1 = self.LA(1)
if False:
......@@ -1333,6 +1333,9 @@ class Parser(antlr.LLkParser):
stripQuotes = assoc._value.replace("\"", "")
g_subProgramImplementations[-1][3] = stripQuotes
if assoc._name[-10:].lower() == "fpga_modes":
stripQuotes = assoc._value.replace("\"", "")
g_subProgramImplementations[-1][4] = stripQuotes
id = self.LT(1)
Supports Markdown
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