Line 61... |
Line 61... |
} bpb[BPB_LEN];
|
} bpb[BPB_LEN];
|
|
|
void bpb_info()
|
void bpb_info()
|
{
|
{
|
if (!config.bpb.enabled) {
|
if (!config.bpb.enabled) {
|
printf("BPB not simulated. Check -bpb option.\n");
|
PRINTF("BPB not simulated. Check -bpb option.\n");
|
return;
|
return;
|
}
|
}
|
|
|
printf("BPB %d bytes: ", BPB_LEN * BPB_WAYS * (BPB_PSTATES + BPB_USTATES) / 8);
|
PRINTF("BPB %d bytes: ", BPB_LEN * BPB_WAYS * (BPB_PSTATES + BPB_USTATES) / 8);
|
printf("%d ways, %d sets, %d bits/prediction\n", BPB_WAYS, BPB_LEN, BPB_PSTATES + BPB_USTATES);
|
PRINTF("%d ways, %d sets, %d bits/prediction\n", BPB_WAYS, BPB_LEN, BPB_PSTATES + BPB_USTATES);
|
}
|
}
|
|
|
/* First check if branch is already in the cache and if it is:
|
/* First check if branch is already in the cache and if it is:
|
- increment BPB hit stats,
|
- increment BPB hit stats,
|
- set 'lru' at this way to BPB_USTATES - 1 and
|
- set 'lru' at this way to BPB_USTATES - 1 and
|
Line 165... |
Line 165... |
} btic[BTIC_LEN];
|
} btic[BTIC_LEN];
|
|
|
void btic_info()
|
void btic_info()
|
{
|
{
|
if (!config.bpb.btic) {
|
if (!config.bpb.btic) {
|
printf("BTIC not simulated. Check --btic option.\n");
|
PRINTF("BTIC not simulated. Check --btic option.\n");
|
return;
|
return;
|
}
|
}
|
|
|
printf("BTIC %d bytes: ", BTIC_LEN * BTIC_WAYS * (BTIC_USTATES + BTIC_BLOCKSIZE * 8) / 8);
|
PRINTF("BTIC %d bytes: ", BTIC_LEN * BTIC_WAYS * (BTIC_USTATES + BTIC_BLOCKSIZE * 8) / 8);
|
printf("%d ways, %d sets, %d bits/target\n", BTIC_WAYS, BTIC_LEN, BTIC_USTATES + BTIC_BLOCKSIZE * 8);
|
PRINTF("%d ways, %d sets, %d bits/target\n", BTIC_WAYS, BTIC_LEN, BTIC_USTATES + BTIC_BLOCKSIZE * 8);
|
}
|
}
|
|
|
/* First check if target addr is already in the cache and if it is:
|
/* First check if target addr is already in the cache and if it is:
|
- increment BTIC hit stats,
|
- increment BTIC hit stats,
|
- set 'lru' at this way to BTIC_USTATES - 1 and
|
- set 'lru' at this way to BTIC_USTATES - 1 and
|