Allow for multiple synthesis directives in specials.
This is needed to specify timing constraints on some Lattice Diamond library specials, like the EHXPLLL. To keep backwards compatibility we allow the directive to still be a single string. If it's not, we assume it's an iterable.
This commit is contained in:
parent
67f8718b26
commit
21bd26dcdd
|
@ -181,11 +181,18 @@ class Instance(Special):
|
||||||
r += "\t." + name_inst + "(" + name_design + ")"
|
r += "\t." + name_inst + "(" + name_design + ")"
|
||||||
if not firstp:
|
if not firstp:
|
||||||
r += "\n"
|
r += "\n"
|
||||||
if instance.synthesis_directive is not None:
|
|
||||||
synthesis_directive = "/* synthesis {} */".format(instance.synthesis_directive)
|
directives = instance.synthesis_directive
|
||||||
r += ")" + synthesis_directive + ";\n\n"
|
if directives is None:
|
||||||
else:
|
directives = []
|
||||||
r += ");\n\n"
|
elif type(directives) == str :
|
||||||
|
directives = [directives,]
|
||||||
|
|
||||||
|
r += ")";
|
||||||
|
for directive in directives:
|
||||||
|
r += "\n\t/* synthesis {} */".format(directive)
|
||||||
|
r += ";\n\n"
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue