From 45101321b8bc3d28083ba43cc3b8a7421e96b751 Mon Sep 17 00:00:00 2001 From: Damien Pretet Date: Tue, 8 Mar 2022 16:42:42 +0100 Subject: [PATCH] Fix: Add defines in Verilator command, missing in last tag --- svutRun.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/svutRun.py b/svutRun.py index 77ce553..8eb6bb5 100755 --- a/svutRun.py +++ b/svutRun.py @@ -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): @@ -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 = ""