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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_52/] [or1ksim/] [sim-config.c] - Diff between revs 633 and 645

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

Rev 633 Rev 645
Line 108... Line 108...
  config.nuarts = 0;
  config.nuarts = 0;
 
 
  /* DMAs */
  /* DMAs */
  config.ndmas = 0;
  config.ndmas = 0;
 
 
 
  /* VGAs */
 
  config.nvgas = 0;
 
 
 
  /* Frame buffer */
 
  config.fb.enabled = 0;
 
 
  /* 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.dependstats = 0;
  config.cpu.dependstats = 0;
Line 392... Line 398...
void eth_vapi_id ();
void eth_vapi_id ();
void gpio_ngpios ();
void gpio_ngpios ();
void gpio_baseaddr ();
void gpio_baseaddr ();
void gpio_irq ();
void gpio_irq ();
void gpio_base_vapi_id ();
void gpio_base_vapi_id ();
 
void vga_nvgas ();
 
void vga_baseaddr ();
 
void vga_irq ();
 
void vga_refresh_rate ();
 
void vga_filename ();
 
void vga_bufaddr ();
 
void vga_paladdr ();
 
void vga_refresh_rate ();
 
void vga_filename ();
void immu_enabled ();
void immu_enabled ();
void immu_nsets ();
void immu_nsets ();
void immu_nways ();
void immu_nways ();
void immu_pagesize ();
void immu_pagesize ();
void immu_entrysize ();
void immu_entrysize ();
Line 441... Line 456...
  {"dmmu",   0},
  {"dmmu",   0},
  {"ic",     0},
  {"ic",     0},
  {"dc",     0},
  {"dc",     0},
  {"gpio",   0},   /* 15 */
  {"gpio",   0},   /* 15 */
  {"bpb",    0},
  {"bpb",    0},
  {"pm",     0}
  {"pm",     0},
 
  {"vga",    0},
 
  {"fb",     0}
};
};
 
 
/* *INDENT-OFF* */
/* *INDENT-OFF* */
 
 
/* Parameter definitions */
/* Parameter definitions */
Line 590... Line 607...
{16, "sbp_bnf_fwd",       "=%i",         NULL,          (void *)(&config.bpb.sbp_bnf_fwd), 0},
{16, "sbp_bnf_fwd",       "=%i",         NULL,          (void *)(&config.bpb.sbp_bnf_fwd), 0},
{16, "sbp_bf_fwd",        "=%i",         NULL,          (void *)(&config.bpb.sbp_bf_fwd), 0},
{16, "sbp_bf_fwd",        "=%i",         NULL,          (void *)(&config.bpb.sbp_bf_fwd), 0},
{16, "missdelay",         "=%i",         NULL,          (void *)(&config.bpb.missdelay), 0},
{16, "missdelay",         "=%i",         NULL,          (void *)(&config.bpb.missdelay), 0},
{16, "hitdelay",          "=%i",         NULL,          (void *)(&config.bpb.hitdelay), 0},
{16, "hitdelay",          "=%i",         NULL,          (void *)(&config.bpb.hitdelay), 0},
 
 
{17, "enabled",           "=%i",         NULL,          (void *)(&config.pm.enabled), 0}
{17, "enabled",           "=%i",         NULL,          (void *)(&config.pm.enabled), 0},
 
 
 
{18, "nvgas",             "=%i",         vga_nvgas,     (void *)(&tempL), CPF_GLOBAL},
 
{18, "device",            "%i",          change_device, (void *)(&tempL), 0},
 
{18, "baseaddr",          "=0x%x",       vga_baseaddr,  (void *)(&tempUL), 0},
 
{18, "irq",               "=%i",         vga_irq,       (void *)(&tempL), 0},
 
{18, "refresh_rate",      "=%i",         vga_refresh_rate, (void *)(&tempUL), 0},
 
{18, "filename",          "=\"%s\"",     vga_filename,  (void *)(&tempS[0]), 0},
 
{18, "enddevice",         "",            end_device,    NULL, 0},
 
 
 
{19, "enabled",           "=%i",         NULL,          (void *)(&config.fb.enabled), 0},
 
{19, "bufaddr",           "=0x%x",       NULL,          (void *)(&config.fb.bufaddr), 0},
 
{19, "paladdr",           "=0x%x",       NULL,          (void *)(&config.fb.paladdr), 0},
 
{19, "refresh_rate",      "=%i",         NULL,          (void *)(&config.fb.refresh_rate), 0},
 
{19, "filename",          "=\"%s\"",     NULL,          (void *)(&config.fb.filename), 0}
};
};
 
 
/* *INDENT-ON* */
/* *INDENT-ON* */
 
 
int current_device = -1;
int current_device = -1;
Line 1049... Line 1080...
    config.dc.ustates = tempL;
    config.dc.ustates = tempL;
  else
  else
    ERROR("invalid USTATE.");
    ERROR("invalid USTATE.");
}
}
 
 
/* Read environment from a script file. Does not fail - assumes defaukt configuration instead.
void dc_tagtype () {
 
  if (strcmp (tempS, "none") == 0)
 
    config.dc.tagtype = CT_NONE;
 
  else if (strcmp (tempS, "physical") == 0)
 
    config.dc.tagtype = CT_PHYSICAL;
 
  else if (strcmp (tempS, "virtual") == 0)
 
    config.dc.tagtype = CT_VIRTUAL;
 
  else {
 
    char tmp[200];
 
    sprintf (tmp, "invalid cache type '%s'.\n", tempS);
 
    ERROR(tmp);
 
  }
 
}
 
 
 
void vga_nvgas () {
 
  if (tempL >= 0 && tempL < MAX_VGAS)
 
    config.nvgas = tempL;
 
  else
 
    ERROR("invalid number of devices.");
 
}
 
 
 
void vga_baseaddr () {
 
  if (current_device >= 0 && current_device < config.nvgas)
 
    config.vgas[current_device].baseaddr = tempUL;
 
  else
 
    ERROR("invalid device number.");
 
}
 
 
 
void vga_irq () {
 
  if (current_device >= 0 && current_device < config.nvgas)
 
    config.vgas[current_device].irq = tempL;
 
  else
 
    ERROR("invalid device number.");
 
}
 
 
 
void vga_refresh_rate () {
 
  if (current_device >= 0 && current_device < config.nvgas)
 
    config.vgas[current_device].refresh_rate = tempUL;
 
  else
 
    ERROR("invalid device number.");
 
}
 
 
 
void vga_filename () {
 
  if (current_device >= 0 && current_device < config.nvgas)
 
    strcpy (config.vgas[current_device].filename, tempS);
 
  else
 
    ERROR("invalid device number.");
 
}
 
 
 
/* Read environment from a script file. Does not fail - assumes default configuration instead.
   The syntax of script file is:
   The syntax of script file is:
   param = value
   param = value
   section x
   section x
     data
     data
     param = value
     param = value

powered by: WebSVN 2.1.0

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