summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-14 20:25:57 +0800
committerruki <[email protected]>2023-01-14 20:25:57 +0800
commit32c8b4509d1e60d0a26db63ed059569d3d9878b7 (patch)
treea3315e6210e8f25032c3350e3e926211f370203a /tests/projects
parent5497698822f6eae2cadf8d64849dee690e5962f8 (diff)
improve sim_main.cpp
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/embed/verilator/hello_vcd/src/sim_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/projects/embed/verilator/hello_vcd/src/sim_main.cpp b/tests/projects/embed/verilator/hello_vcd/src/sim_main.cpp
index 0aa763a0a..decc1fff0 100644
--- a/tests/projects/embed/verilator/hello_vcd/src/sim_main.cpp
+++ b/tests/projects/embed/verilator/hello_vcd/src/sim_main.cpp
@@ -10,9 +10,9 @@ int main(int argc, char** argv) {
char const* vcdfile = NULL;
if (argc == 2) {
vcdfile = argv[1];
- } else {
- printf("xmake run hello [vcdfile]\n");
- return -1;
+ }
+ if (!vcdfile) {
+ vcdfile = "hello.vcd";
}
VerilatedContext* contextp = new VerilatedContext;
contextp->commandArgs(argc, argv);