Skip to content

Commit

Permalink
Fix: Add defines in Verilator command, missing in last tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dpretet committed Mar 8, 2022
1 parent e7dab66 commit 4510132
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions svutRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ def get_defines(defines):
"""
Return a string with the list of defines ready to drop in icarus
"""
icarusdefs = ""
simdefs = ""

if not defines:
return icarusdefs
return simdefs

defs = defines.split(';')

for _def in defs:
if _def:
icarusdefs += "-D " + _def + " "
simdefs += "-D" + _def + " "

return icarusdefs
return simdefs


def create_iverilog(args, test):
Expand Down Expand Up @@ -150,6 +150,9 @@ def create_verilator(args, test):
cmd += """+1800-2005ext+v -Wno-STMTDLY -Wno-UNUSED -Wno-UNDRIVEN -Wno-PINCONNECTEMPTY """
cmd += """-Wpedantic -Wno-VARHIDDEN -Wno-lint """

if args.define:
cmd += get_defines(args.define)

if args.dotfile:

dotfiles = ""
Expand Down

0 comments on commit 4510132

Please sign in to comment.