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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_64/] [or1ksim/] [cpu/] [common/] [stats.c] - Diff between revs 630 and 692

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

Rev 630 Rev 692
Line 36... Line 36...
 
 
/* See also enum insn_type in abstract.h */
/* See also enum insn_type in abstract.h */
const char func_unit_str[30][30] = { "unknown", "exception", "arith", "shift", "compare",
const char func_unit_str[30][30] = { "unknown", "exception", "arith", "shift", "compare",
  "branch", "jump", "load", "store", "movimm", "move", "extend", "nop", "mac" };
  "branch", "jump", "load", "store", "movimm", "move", "extend", "nop", "mac" };
 
 
struct dstats_entry dstats[DSTATS_LEN]; /* dependency stats */
struct dstats_entry dstats[DSTATS_LEN] = {0}; /* dependency stats */
struct sstats_entry sstats[SSTATS_LEN]; /* single stats */
struct sstats_entry sstats[SSTATS_LEN] = {0}; /* single stats */
struct fstats_entry fstats[FSTATS_LEN]; /* functional units stats */
struct fstats_entry fstats[FSTATS_LEN] = {0}; /* functional units stats */
struct mstats_entry mstats;   /* misc units stats */
struct mstats_entry mstats = {0};             /* misc units stats */
struct cachestats_entry ic_stats; /* instruction cache stats */
struct cachestats_entry ic_stats = {0};       /* instruction cache stats */
struct cachestats_entry dc_stats; /* data cache stats */
struct cachestats_entry dc_stats = {0};       /* data cache stats */
struct immustats_entry immu_stats;  /* insn mmu stats */
struct immustats_entry immu_stats = {0};      /* insn mmu stats */
struct dmmustats_entry dmmu_stats;  /* data mmu stats */
struct dmmustats_entry dmmu_stats = {0};      /* data mmu stats */
struct raw_stats raw_stats;   /* RAW hazard stats */
struct raw_stats raw_stats = {0};             /* RAW hazard stats */
 
 
/* Dependency */
/* Dependency */
 
 
int check_depend()
int check_depend()
{
{
Line 174... Line 174...
  if (config.bpb.btic) {
  if (config.bpb.btic) {
    printf("BTIC: hit %d(%d%%), miss %d\n", mstats.btic.hit, (mstats.btic.hit * 100) / SD(mstats.btic.hit + mstats.btic.miss), mstats.btic.miss);
    printf("BTIC: hit %d(%d%%), miss %d\n", mstats.btic.hit, (mstats.btic.hit * 100) / SD(mstats.btic.hit + mstats.btic.miss), mstats.btic.miss);
  } else
  } else
    printf("BTIC simulation disabled. Enabled it to see BTIC analysis\n");
    printf("BTIC simulation disabled. Enabled it to see BTIC analysis\n");
 
 
  if (testsprbits(SPR_UPR, SPR_UPR_ICP)) {
  if (config.ic.enabled) {
    printf("IC read:  hit %d(%d%%), miss %d\n", ic_stats.readhit, (ic_stats.readhit * 100) / SD(ic_stats.readhit + ic_stats.readmiss), ic_stats.readmiss);
    printf("IC read:  hit %d(%d%%), miss %d\n", ic_stats.readhit, (ic_stats.readhit * 100) / SD(ic_stats.readhit + ic_stats.readmiss), ic_stats.readmiss);
  } else
  } else
    printf("No ICache. Set UPR[ICP]\n");
    printf("No ICache. Enable it to see IC results.\n");
 
 
  if (testsprbits(SPR_UPR, SPR_UPR_DCP)) {
  if (config.dc.enabled) {
    printf("DC read:  hit %d(%d%%), miss %d\n", dc_stats.readhit, (dc_stats.readhit * 100) / SD(dc_stats.readhit + dc_stats.readmiss), dc_stats.readmiss);
    printf("DC read:  hit %d(%d%%), miss %d\n", dc_stats.readhit, (dc_stats.readhit * 100) / SD(dc_stats.readhit + dc_stats.readmiss), dc_stats.readmiss);
    printf("DC write: hit %d(%d%%), miss %d\n", dc_stats.writehit, (dc_stats.writehit * 100) / SD(dc_stats.writehit + dc_stats.writemiss), dc_stats.writemiss);
    printf("DC write: hit %d(%d%%), miss %d\n", dc_stats.writehit, (dc_stats.writehit * 100) / SD(dc_stats.writehit + dc_stats.writemiss), dc_stats.writemiss);
  } else
  } else
    printf("No DCache. Set UPR[DCP]\n");
    printf("No DCache. Enable it to see DC results.\n");
 
 
  if (testsprbits(SPR_UPR, SPR_UPR_IMP)) {
  if (testsprbits(SPR_UPR, SPR_UPR_IMP)) {
    printf("IMMU read:  hit %d(%d%%), miss %d\n", immu_stats.fetch_tlbhit, (immu_stats.fetch_tlbhit * 100) / SD(immu_stats.fetch_tlbhit + immu_stats.fetch_tlbmiss), immu_stats.fetch_tlbmiss);
    printf("IMMU read:  hit %d(%d%%), miss %d\n", immu_stats.fetch_tlbhit, (immu_stats.fetch_tlbhit * 100) / SD(immu_stats.fetch_tlbhit + immu_stats.fetch_tlbmiss), immu_stats.fetch_tlbmiss);
  } else
  } else
    printf("No IMMU. Set UPR[IMP]\n");
    printf("No IMMU. Set UPR[IMP]\n");

powered by: WebSVN 2.1.0

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