OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [cuc/] [cuc.c] - Diff between revs 1350 and 1358

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1350 Rev 1358
Line 835... Line 835...
    if (func[i]) free_func (func[i]);
    if (func[i]) free_func (func[i]);
 
 
  fclose (flog);
  fclose (flog);
}
}
 
 
 
/*----------------------------------------------------[ CUC Configuration ]---*/
 
void cuc_calling_convention(union param_val val, void *dat)
 
{
 
  config.cuc.calling_convention = val.int_val;
 
}
 
 
 
void cuc_enable_bursts(union param_val val, void *dat)
 
{
 
  config.cuc.enable_bursts = val.int_val;
 
}
 
 
 
void cuc_no_multicycle(union param_val val, void *dat)
 
{
 
  config.cuc.no_multicycle = val.int_val;
 
}
 
 
 
void cuc_memory_order(union param_val val, void *dat)
 
{
 
  if (strcmp (val.str_val, "none") == 0)
 
    config.cuc.memory_order = MO_NONE;
 
  else if (strcmp (val.str_val, "weak") == 0)
 
    config.cuc.memory_order = MO_WEAK;
 
  else if (strcmp (val.str_val, "strong") == 0)
 
    config.cuc.memory_order = MO_STRONG;
 
  else if (strcmp (val.str_val, "exact") == 0) {
 
    config.cuc.memory_order = MO_EXACT;
 
  } else {
 
    char tmp[200];
 
    sprintf (tmp, "invalid memory order '%s'.\n", val.str_val);
 
    CONFIG_ERROR(tmp);
 
  }
 
}
 
 
 
void cuc_timings_fn(union param_val val, void *dat)
 
{
 
  strcpy(config.cuc.timings_fn, val.str_val);
 
}
 
 
 
void reg_cuc_sec(void)
 
{
 
  struct config_section *sec = reg_config_sec("cuc", NULL, NULL);
 
 
 
  reg_config_param(sec, "calling_convention", paramt_int, cuc_calling_convention);
 
  reg_config_param(sec, "enable_bursts", paramt_int, cuc_enable_bursts);
 
  reg_config_param(sec, "no_multicycle", paramt_int, cuc_no_multicycle);
 
  reg_config_param(sec, "memory_order", paramt_word, cuc_memory_order);
 
  reg_config_param(sec, "timings_fn", paramt_str, cuc_timings_fn);
 
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.