diff options
author | Kevin Cheng <kevin.cheng@arm.com> | 2021-10-20 19:51:41 +0000 |
---|---|---|
committer | Kevin Cheng <kevin.cheng@arm.com> | 2021-10-26 19:09:45 +0000 |
commit | 1009674513d09af1a699a8bf0f646c7130d7a0ac (patch) | |
tree | 87d5aa66371d6608be2021826611ad4c0dd85523 /reference_model/src/func_config.cc | |
parent | 8c06a6547a132f0a22fa34d467026f12fabb4e1f (diff) | |
download | reference_model-1009674513d09af1a699a8bf0f646c7130d7a0ac.tar.gz |
Add version to reference model
- update serialization_lib hash
- check model version against serializer version
- add "-v" to command line option to print out model version
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: I554cf0fdead22e7e5f91d2e98831459286c40a2d
Diffstat (limited to 'reference_model/src/func_config.cc')
-rw-r--r-- | reference_model/src/func_config.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/reference_model/src/func_config.cc b/reference_model/src/func_config.cc index bd1ce32..6880829 100644 --- a/reference_model/src/func_config.cc +++ b/reference_model/src/func_config.cc @@ -428,6 +428,7 @@ int func_model_print_help(FILE* out) fprintf(out, "\t-d <Debug Mask - set component debug mask\n"); func_model_print_debug_masks(out); fprintf(out, "\t-F <flatconfig> - parse <flatconfig> as file of config options\n"); + fprintf(out, "\t-v - Print refererence model version\n"); fprintf(out, "\t-h - show this help message and exit\n"); fprintf( out, @@ -459,7 +460,8 @@ static const char* get_arg_text(int& index, const int argc, const char** argv) } // Read the command line arguments -int func_model_parse_cmd_line(func_config_t* func_config, func_debug_t* func_debug, const int argc, const char** argv) +int func_model_parse_cmd_line( + func_config_t* func_config, func_debug_t* func_debug, const int argc, const char** argv, const char* version) { int i; programname = argv[0]; @@ -542,6 +544,11 @@ int func_model_parse_cmd_line(func_config_t* func_config, func_debug_t* func_deb func_debug_set_file(func_debug, get_arg_text(i, argc, argv)); break; } + case 'v': + { + fprintf(stdout, "Model Version %s\n", version); + return 1; + } default: func_model_print_help(stderr); ARG_ERROR("Unrecognized argument at position %d: %s", i, argv[i]); |