From 1ef6c405c3b06d6d4574baa76beee0dc2691ad47 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 10 Apr 2009 15:36:07 -0700 Subject: [PATCH] Handle $stop and $finish at the interactive prompt. This patch adds interactive support for $stop and $finish. $stop displays a message that the simulator is already stopped. $finish acts exactly like (calls) the interactive "finish" command. Having $stop do nothing and $finish not finish until you exit interactive mode is not very intuitive. --- vvp/stop.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vvp/stop.cc b/vvp/stop.cc index b20230fd8..2a1366974 100644 --- a/vvp/stop.cc +++ b/vvp/stop.cc @@ -457,8 +457,13 @@ static void invoke_command(char*txt) if (argc > 0) { if (argv[0][0] == '$') { - cmd_call(argc, argv); - + if (strcmp(argv[0], "$stop") == 0) { + printf("The simulator is already stopped!\n"); + } else if (strcmp(argv[0], "$finish") == 0){ + cmd_finish(argc, argv); + } else { + cmd_call(argc, argv); + } } else { unsigned idx; for (idx = 0 ; cmd_table[idx].name ; idx += 1)