Source: https://guthlabs.ai/docs/instruments/cpu-cache-hit-rate-amat-calculator/mechanism/

instrument mechanism / verified-clean

# CPU Cache Hit-Rate / AMAT Calculator mechanism

The inspectable method record for CPU Cache Hit-Rate / AMAT Calculator, kept separate from implementation and qualification.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Model scope

Core AMAT arithmetic is valid under the stated unit and miss-penalty conventions. The instrument cannot honestly claim to output effective speedup until it defines the speedup formula and adds an explicit no-cache baseline input. It also needs an unambiguous multilevel parameter convention, validation for miss-rate bounds and level count, and a defined terminal-memory penalty.

- The AMAT formula AMAT = hit_time + miss_rate × miss_penalty is standard for a single cache level when miss_penalty means the additional time after a miss, excluding hit_time.

- The multilevel formula AMAT_L1 = hit_L1 + miss_L1 × AMAT_L2 is standard when AMAT_L2 includes all lower-level access time and when each level's hit time is charged only when that level is reached.

- The recursive definition for levels beyond L2 is not specified explicitly, including how the final-level memory-access penalty is represented.

- The claimed effective speedup versus a no-cache baseline has no formula and no no-cache-baseline input, so that output cannot be computed or verified.

- The term miss_penalty is ambiguous for multilevel inputs: treating it as inclusive of lower-level access time would double-count time in the stated recursive formula; treating it as exclusive makes the formula valid.

## Units and conventions

- All hit times, miss penalties, and recursively computed AMAT values must use the same time unit, such as nanoseconds.

- Miss rates must be supplied as fractions from 0 to 1, not percentages from 0 to 100; for example, 5% must be entered as 0.05.

- If timing is given in processor cycles, a clock frequency or cycle-time conversion is required before combining it with nanosecond values.

- Hit times and miss penalties must be nonnegative.

## Inspectable vector

One of 4 source-bound review vectors:

````
{
  "inputs": {
    "levels": 1,
    "hit_time_ns": 1,
    "miss_rate": 0.05,
    "miss_penalty_ns": 80
  },
  "expected_outputs": {
    "amat_ns": 5,
    "effective_speedup_vs_no_cache": null
  },
  "working": "AMAT = hit_time + miss_rate × miss_penalty\n= 1 ns + 0.05 × 80 ns\n= 1 ns + 4 ns\n= 5 ns.\nSpeedup is unavailable because no no-cache baseline is specified."
}
````

## Failure boundary

**BREAK_CLAIMED** · SELF_FLAGGED

The extreme-magnitude vector overflows finite JavaScript arithmetic to Infinity, and the convention probe produces radically different results unless percentage versus fractional miss-rate input is explicitly disambiguated.

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/cpu-cache-hit-rate-amat-calculator/>)[03**Implementation**](<https://guthlabs.ai/docs/instruments/cpu-cache-hit-rate-amat-calculator/implementation/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/cpu-cache-hit-rate-amat-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche4/tranche4-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
