summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/verilator/verilator.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/rules/verilator/verilator.lua b/xmake/rules/verilator/verilator.lua
index e1535ecd8..72de7b91b 100644
--- a/xmake/rules/verilator/verilator.lua
+++ b/xmake/rules/verilator/verilator.lua
@@ -201,6 +201,7 @@ endmodule]])
switches.TIMING = options_table["use_timing"] and "1" or "0"
-- The thread field is a integer in float format, we need to convert it to string.
switches.THREADS = string.format("%d", options_table["threads"] or 1)
+ switches.TRACE = options_table["trace"] and "1" or "0"
switches.TRACE_VCD = options_table["trace_vcd"] and "1" or "0"
switches.TRACE_FST = options_table["trace_fst"] and "1" or "0"
switches.TRACE_SAIF = options_table["trace_saif"] and "1" or "0"
@@ -224,13 +225,22 @@ endmodule]])
-- Threaded output mode? 1/N threads (from --threads)
switches.THREADS = values:trim()
elseif key == "test_TRACE_VCD" then
- -- VCD Tracing output mode? 0/1 (from --trace)
+ -- VCD Tracing output mode? 0/1 (from --trace-vcd)
switches.TRACE_VCD = values:trim()
elseif key == "test_TRACE_FST" then
-- FST Tracing output mode? 0/1 (from --trace-fst)
switches.TRACE_FST = values:trim()
+ elseif key == "test_TRACE_SAIF" then
+ -- SAIF Tracing output mode? 0/1 (from --trace-saif)
+ switches.TRACE_SAIF = values:trim()
end
end)
+
+ switches.TRACE = (
+ switches.TRACE_VCD == "1" or
+ switches.TRACE_FST == "1" or
+ switches.TRACE_SAIF == "1"
+ ) and "1" or "0"
end
assert(verilator_root, "the verilator root directory not found!")