static attr_value_t get_conf(void *arg, conf_object_t *self, attr_value_t *idx) { uart_sampler_t *s = (uart_sampler_t *)self; return SIM_make_attr_object(((uart_sampler_t *)s)->conf); }
static attr_value_t get_timing_model_attribute(void *dont_care, conf_object_t *obj, attr_value_t *idx) { consistency_controller_object_t *cc = (consistency_controller_object_t *)obj; if (cc->next_level_object) return SIM_make_attr_object(cc->next_level_object); return SIM_make_attr_nil(); }
void set_symtable(conf_object_t *symtable) { conf_object_t *cell0_context = SIM_get_object("cell0_context"); if (cell0_context == NULL) { lsprintf(ALWAYS, "WARNING: couldn't get cell0_context\n"); return; } attr_value_t table = SIM_make_attr_object(symtable); assert(SIM_attr_is_object(table)); set_error_t ret = SIM_set_attribute(cell0_context, "symtable", &table); assert(ret == Sim_Set_Ok && "set symtable failed!"); SIM_free_attribute(table); }