Skip to content

Commit

Permalink
vivado: fix string generics
Browse files Browse the repository at this point in the history
  • Loading branch information
kammoh committed Jun 21, 2024
1 parent fa13836 commit c61b4fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/xeda/flows/vivado/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def value_to_str(v):
if v is True:
return "1\\'b1"
if isinstance(v, str):
return f'{{\\"{v}\\"}}'
return f'\\"{v}\\"'
return str(v).strip()

return " ".join(
Expand All @@ -49,7 +49,6 @@ def value_to_str(v):

def vivado_defines(is_sim_flow: bool):
def defines_to_str(mapping) -> str:

def value_to_str(v):
if is_sim_flow:
return v
Expand All @@ -58,7 +57,7 @@ def value_to_str(v):
if v is True:
return "1\\'b1"
if isinstance(v, str):
return '{\\"{v}\\"}'
return f'\\"{v}\\"'
return str(v).strip()

return " ".join(
Expand Down

0 comments on commit c61b4fd

Please sign in to comment.