Line 123... |
Line 123... |
/* 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;
|
config.cpu.raw_range = 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;
|
config.cpu.sr = 0x00008003;
|
config.cpu.sr = 0x00008003;
|
Line 389... |
Line 388... |
void memory_size ();
|
void memory_size ();
|
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_raw_range ();
|
|
void cpu_sbuf_len ();
|
void cpu_sbuf_len ();
|
void eth_nethernets ();
|
void eth_nethernets ();
|
void eth_baseaddr ();
|
void eth_baseaddr ();
|
void eth_dma ();
|
void eth_dma ();
|
void eth_rx_channel ();
|
void eth_rx_channel ();
|
Line 523... |
Line 521... |
{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, "dependstats", "=%i", NULL, (void *)(&config.cpu.dependstats), 0},
|
{5, "dependstats", "=%i", NULL, (void *)(&config.cpu.dependstats), 0},
|
{5, "raw_range", "=%i", cpu_raw_range, (void *)(&config.cpu.raw_range), 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},
|
{6, "profile", "=%i", NULL, (void *)(&config.sim.profile), 0},
|
{6, "profile", "=%i", NULL, (void *)(&config.sim.profile), 0},
|
Line 848... |
Line 845... |
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 1406... |
Line 1393... |
|
|
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",
|