summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-06-13 15:35:36 +0800
committerGitHub <[email protected]>2026-06-13 15:35:36 +0800
commit8830f336c8e2b8dc9a08139d6d07d9e3f940b3cb (patch)
treeb158d8667c7c0539b7e1a63f5329eeac1852e762
parent614bd66811fba96988dd924faab4a64465e16f66 (diff)
parentf79a29470d8384072a5931af05354130f997a032 (diff)
Merge pull request #7601 from PFiS1737/fix-verilator-trace
fix(verilator): make sure to define TRACE
-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!")