Skip to content

Commit

Permalink
misoclib/soc: fix add_constant when used for strings
Browse files Browse the repository at this point in the history
enjoy-digital committed Sep 1, 2015
1 parent a4808ac commit bedf3ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion misoclib/soc/cpuif.py
Original file line number Diff line number Diff line change
@@ -98,7 +98,10 @@ def get_csr_header(regions, constants, with_access_functions=True):
for name, value in constants:
r += "#define " + name
if value is not None:
r += " " + str(value)
if isinstance(value, str):
r += " \"" + value + "\""
else:
r += " " + str(value)
r += "\n"

r += "\n#endif\n"

0 comments on commit bedf3ed

Please sign in to comment.