Hi all,
I have a class config in which I have some user defined variables as:
typedef enum { EOT, DELAY } end_type;
typedef enum { RANDOM, INCR, LOAD } data_type;
typedef enum { FAST, SLOW } mode;
I have a set_config() function in my test class in which I set values for these variables. The values are passed from the command line(VCS) via plusargs as :
./simv ... +end_type_handle=DELAY +data_type_handle=LOAD +mode_handle=FAST
Set config function is as follows:
function void set_cfg();
cfg = new();
$value$plusargs("end_type_handle= %s", cfg.end_type_handle);
$value$plusargs("data_type_handle= %s", cfg.data_type_handle);
$value$plusargs("mode_handle= %s", cfg.mode_handle);
...
My issue is that, whatever combination of configs I pass from command line, the first values in typedef declaration are the values for handles that always get set, i.e. when I display the cfg variables, they'd always be:
end_type = EOT
data_type = RANDOM
mode = FAST
I am not able to understand where I am going wrong in this.
If there is some other way of doing this, please do let me know.
Thanks,
Sarvesh