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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_69/] [or1ksim/] [sim-config.c] - Diff between revs 731 and 732

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

Rev 731 Rev 732
Line 122... Line 122...
 
 
  /* CPU */
  /* CPU */
  config.cpu.superscalar = 0;
  config.cpu.superscalar = 0;
  config.sim.history = 0;
  config.sim.history = 0;
  config.cpu.hazards = 0;
  config.cpu.hazards = 0;
  config.cpu.raw_range = 0;
 
  config.cpu.dependstats = 0;
  config.cpu.dependstats = 0;
  config.cpu.sbuf_len = 0;
  config.cpu.sbuf_len = 0;
  config.cpu.upr = SPR_UPR_UP | SPR_UPR_DCP | SPR_UPR_ICP | SPR_UPR_DMP
  config.cpu.upr = SPR_UPR_UP | SPR_UPR_DCP | SPR_UPR_ICP | SPR_UPR_DMP
                 | SPR_UPR_IMP | SPR_UPR_OB32P | SPR_UPR_DUP | SPR_UPR_PICP
                 | SPR_UPR_IMP | SPR_UPR_OB32P | SPR_UPR_DUP | SPR_UPR_PICP
                 | SPR_UPR_PMP | SPR_UPR_TTP;
                 | SPR_UPR_PMP | SPR_UPR_TTP;
Line 145... Line 144...
  config.nethernets = 0;
  config.nethernets = 0;
 
 
  /* GPIO */
  /* GPIO */
  config.ngpios = 0;
  config.ngpios = 0;
 
 
  /* Tick timer */
 
  config.tick.enabled = 0;
 
 
 
  /* PM */
  /* PM */
  config.pm.enabled = 0;
  config.pm.enabled = 0;
#endif
#endif
 
 
  /* Configure runtime */
  /* Configure runtime */
Line 390... Line 386...
void memory_name ();
void memory_name ();
void memory_log ();
void memory_log ();
void memory_delayr ();
void memory_delayr ();
void memory_delayw ();
void memory_delayw ();
void cpu_sbuf_len ();
void cpu_sbuf_len ();
void cpu_raw_range ();
 
void eth_nethernets ();
void eth_nethernets ();
void eth_baseaddr ();
void eth_baseaddr ();
void eth_irq ();
void eth_irq ();
void eth_dma ();
void eth_dma ();
void eth_rtx_type ();
void eth_rtx_type ();
Line 457... Line 452...
  {"cpu",    0},   /* 5  */
  {"cpu",    0},   /* 5  */
  {"sim",    0},
  {"sim",    0},
  {"debug",  0},
  {"debug",  0},
  {"VAPI",   0},
  {"VAPI",   0},
  {"ethernet",0},
  {"ethernet",0},
  {"tick",   0},   /* 10 */
  {"",       0},   /* 10 */
  {"immu",   0},
  {"immu",   0},
  {"dmmu",   0},
  {"dmmu",   0},
  {"ic",     0},
  {"ic",     0},
  {"dc",     0},
  {"dc",     0},
  {"gpio",   0},   /* 15 */
  {"gpio",   0},   /* 15 */
Line 525... Line 520...
{5, "rev",                "=0x%x",       NULL,          (void *)(&config.cpu.rev), 0},
{5, "rev",                "=0x%x",       NULL,          (void *)(&config.cpu.rev), 0},
{5, "upr",                "=0x%x",       NULL,          (void *)(&config.cpu.upr), 0},
{5, "upr",                "=0x%x",       NULL,          (void *)(&config.cpu.upr), 0},
{5, "sr",                 "=0x%x",       NULL,          (void *)(&config.cpu.sr), 0},
{5, "sr",                 "=0x%x",       NULL,          (void *)(&config.cpu.sr), 0},
{5, "hazards",            "=%i",         NULL,          (void *)(&config.cpu.hazards), 0},
{5, "hazards",            "=%i",         NULL,          (void *)(&config.cpu.hazards), 0},
{5, "superscalar",        "=%i",         NULL,          (void *)(&config.cpu.superscalar), 0},
{5, "superscalar",        "=%i",         NULL,          (void *)(&config.cpu.superscalar), 0},
{5, "raw_range",          "=%i",         cpu_raw_range, (void *)(&config.cpu.raw_range), 0},
 
{5, "dependstats",        "=%i",         NULL,          (void *)(&config.cpu.dependstats), 0},
{5, "dependstats",        "=%i",         NULL,          (void *)(&config.cpu.dependstats), 0},
{5, "sbuf_len",           "=%i",         cpu_sbuf_len,  (void *)(&config.cpu.sbuf_len), 0},
{5, "sbuf_len",           "=%i",         cpu_sbuf_len,  (void *)(&config.cpu.sbuf_len), 0},
 
 
{6, "debug",              "=%i",         NULL,          (void *)(&config.sim.debug), 0},
{6, "debug",              "=%i",         NULL,          (void *)(&config.sim.debug), 0},
{6, "verbose",            "=%i",         NULL,          (void *)(&config.sim.verbose), 0},
{6, "verbose",            "=%i",         NULL,          (void *)(&config.sim.verbose), 0},
Line 571... Line 565...
{9, "rxfile",             "=\"%s\"",     eth_rxfile,    (void *)(&tempS[0]), 0},
{9, "rxfile",             "=\"%s\"",     eth_rxfile,    (void *)(&tempS[0]), 0},
{9, "txfile",             "=\"%s\"",     eth_txfile,    (void *)(&tempS[0]), 0},
{9, "txfile",             "=\"%s\"",     eth_txfile,    (void *)(&tempS[0]), 0},
{9, "sockif",             "=\"%s\"",     eth_sockif,    (void *)(&tempS[0]), 0},
{9, "sockif",             "=\"%s\"",     eth_sockif,    (void *)(&tempS[0]), 0},
{9, "vapi_id",            "=0x%x",       eth_vapi_id,   (void *)(&tempUL), 0},
{9, "vapi_id",            "=0x%x",       eth_vapi_id,   (void *)(&tempUL), 0},
 
 
{10, "enabled",           "=%i",         NULL,          (void *)(&config.tick.enabled), 0},
 
 
 
{11, "enabled",           "=%i",         immu_enabled,  (void *)(&tempL), 0},
{11, "enabled",           "=%i",         immu_enabled,  (void *)(&tempL), 0},
{11, "nsets",             "=%i",         immu_nsets,    (void *)(&tempL), 0},
{11, "nsets",             "=%i",         immu_nsets,    (void *)(&tempL), 0},
{11, "nways",             "=%i",         immu_nways,    (void *)(&tempL), 0},
{11, "nways",             "=%i",         immu_nways,    (void *)(&tempL), 0},
{11, "pagesize",          "=%i",         immu_pagesize, (void *)(&tempL), 0},
{11, "pagesize",          "=%i",         immu_pagesize, (void *)(&tempL), 0},
{11, "entrysize",         "=%i",         immu_entrysize,(void *)(&tempL), 0},
{11, "entrysize",         "=%i",         immu_entrysize,(void *)(&tempL), 0},
Line 854... Line 846...
    config.memory.table[current_device].delayw = tempL;
    config.memory.table[current_device].delayw = tempL;
  else
  else
    ERROR("invalid device number.");
    ERROR("invalid device number.");
}
}
 
 
void cpu_raw_range () {
 
  if (config.cpu.raw_range >= RAW_RANGE) {
 
    config.cpu.raw_range = RAW_RANGE - 1;
 
    WARNING("raw range too large; truncated.");
 
  } else if (config.cpu.raw_range < 0) {
 
    config.cpu.raw_range = 0;
 
    WARNING("raw range negative; disabled.");
 
  }
 
}
 
 
 
void cpu_sbuf_len () {
void cpu_sbuf_len () {
  if (config.cpu.sbuf_len >= MAX_SBUF_LEN) {
  if (config.cpu.sbuf_len >= MAX_SBUF_LEN) {
    config.cpu.sbuf_len = MAX_SBUF_LEN - 1;
    config.cpu.sbuf_len = MAX_SBUF_LEN - 1;
    WARNING("sbuf_len too large; truncated.");
    WARNING("sbuf_len too large; truncated.");
  } else if (config.cpu.sbuf_len < 0) {
  } else if (config.cpu.sbuf_len < 0) {
Line 1433... Line 1415...
 
 
  fprintf (f, "  bpb:{enabled:%i, sbp_bnf_fwd:%i, sbp_bf_fwd:%i, btic:%i, missdelay:%i, hitdelay:%i},\n",
  fprintf (f, "  bpb:{enabled:%i, sbp_bnf_fwd:%i, sbp_bf_fwd:%i, btic:%i, missdelay:%i, hitdelay:%i},\n",
    config.bpb.enabled, config.bpb.sbp_bnf_fwd, config.bpb.sbp_bf_fwd, config.bpb.btic, config.bpb.missdelay, config.bpb.hitdelay);
    config.bpb.enabled, config.bpb.sbp_bnf_fwd, config.bpb.sbp_bf_fwd, config.bpb.btic, config.bpb.missdelay, config.bpb.hitdelay);
 
 
  fprintf (f, "  cpu:{upr:0x%08x, ver:0x%04x, rev:0x%04x, superscalar:%i, hazards:%i, dependstats:%i,\n"
  fprintf (f, "  cpu:{upr:0x%08x, ver:0x%04x, rev:0x%04x, superscalar:%i, hazards:%i, dependstats:%i,\n"
    "    raw_range:%i, sr:0x%08x},\n",
    "    sr:0x%08x},\n",
    config.cpu.upr, config.cpu.ver, config.cpu.rev, config.cpu.superscalar, config.cpu.hazards, config.cpu.dependstats,
    config.cpu.upr, config.cpu.ver, config.cpu.rev, config.cpu.superscalar, config.cpu.hazards, config.cpu.dependstats,
    config.cpu.raw_range, config.cpu.sr);
    config.cpu.sr);
 
 
  fprintf (f, "  sim:{debug:%i, verbose:%i, profile:%i, prof_fn:\"%s\", mprofile:%i, mprof_fn:\"%s\",\n",
  fprintf (f, "  sim:{debug:%i, verbose:%i, profile:%i, prof_fn:\"%s\", mprofile:%i, mprof_fn:\"%s\",\n",
    config.sim.debug, config.sim.verbose, config.sim.profile, config.sim.prof_fn, config.sim.mprofile, config.sim.mprof_fn);
    config.sim.debug, config.sim.verbose, config.sim.profile, config.sim.prof_fn, config.sim.mprofile, config.sim.mprof_fn);
 
 
  fprintf (f, "    history:%i, exe_log:%i, exe_log_fn:\"%s\", clkcycle_ps:%i,\n",
  fprintf (f, "    history:%i, exe_log:%i, exe_log_fn:\"%s\", clkcycle_ps:%i,\n",

powered by: WebSVN 2.1.0

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