Merge pull request #59 from q3k/for-upstream/multiple-synthesis-directives

Allow for multiple synthesis directives in specials.
This commit is contained in:
enjoy-digital 2018-01-23 01:43:23 +01:00 committed by GitHub
commit a385143779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 5 deletions

View File

@ -181,11 +181,18 @@ class Instance(Special):
r += "\t." + name_inst + "(" + name_design + ")"
if not firstp:
r += "\n"
if instance.synthesis_directive is not None:
synthesis_directive = "/* synthesis {} */".format(instance.synthesis_directive)
r += ")" + synthesis_directive + ";\n\n"
else:
r += ");\n\n"
directives = instance.synthesis_directive
if directives is None:
directives = []
elif type(directives) == str :
directives = [directives,]
r += ")";
for directive in directives:
r += "\n\t/* synthesis {} */".format(directive)
r += ";\n\n"
return r