Skip to content

Commit

Permalink
Fix MCL model channel matching to be based on alias.
Browse files Browse the repository at this point in the history
Signed-off-by: Rule Timothy (VM/EMT3) <[email protected]>
  • Loading branch information
Smidt Jannik authored and timrulebosch committed Feb 15, 2024
1 parent f963a1f commit 8e9ee9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dse/modelc/tools/mcl_model/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ ModelDesc* model_create(ModelDesc* model)
MclInstanceDesc* mcl_instance = m->mcl_instance = mip->mcl_instance;

/* Set the MCL Channel (should be the first/only SV). */
assert(strcmp(m->model.sv->name, MCL_CHANNEL) == 0);
assert(strcmp(m->model.sv->alias, MCL_CHANNEL) == 0);
mcl_instance->mcl_channel_sv = m->model.sv;
/* Set the MCL Strategy execute function. */
mcl_instance->strategy->execute = __mcl_execute;

/* Execute the load strategy (i.e. call load_func() on all MCL Models). */
log_debug("Call MCL Strategy: load_func ...");
rc = mcl_instance->strategy->execute(model, MCL_STRATEGY_ACTION_LOAD);
rc = mcl_instance->strategy->execute(&m->model, MCL_STRATEGY_ACTION_LOAD);
if (rc) {
if (errno == 0) errno = ECANCELED;
log_fatal("MCL strategy ACTION_LOAD failed!");
}

/* Execute the Init strategy (i.e. call load_func() on all MCL Models). */
log_debug("Call MCL Strategy: init_func ...");
rc = mcl_instance->strategy->execute(model, MCL_STRATEGY_ACTION_INIT);
rc = mcl_instance->strategy->execute(&m->model, MCL_STRATEGY_ACTION_INIT);
if (rc) {
if (errno == 0) errno = ECANCELED;
log_fatal("MCL strategy ACTION_INIT failed!");
Expand Down

0 comments on commit 8e9ee9c

Please sign in to comment.