Work it through
Count what crossed the interface
For a 32-bit bus with six accepted full-payload beats in ten cycles, useful throughput is 0.6 beats/cycle or 19.2 bits/cycle.
At 100 MHz that is 1.92 Gbit/s, or 240 MB/s in decimal units.
Your next page is on its way.
Performance architecture
Measure transaction lifecycle, latency distributions, tail behavior, bandwidth, stalls, and effective throughput without turning the simulator log into the bottleneck.

A worked mechanism
These buckets have width 10 ns and include their lower edge but exclude their upper edge.
floor(9/10)=0 → [0,10)
Nearest-integer conversion would incorrectly put this sample in bin 1.
floor(10/10)=1 → [10,20)
A sample on the boundary belongs to the next bucket.
floor(19/10)=1 → [10,20)
The upper edge remains exclusive; 20 ns would enter bin 2.
Work it through
For a 32-bit bus with six accepted full-payload beats in ten cycles, useful throughput is 0.6 beats/cycle or 19.2 bits/cycle.
At 100 MHz that is 1.92 Gbit/s, or 240 MB/s in decimal units.
VALID held during READY=0 contributes zero accepted beats. Fixed-rate sampling can also alias periodic workloads.
Test bin edges, invalid negative latency, a pending request that never completes, and independent accepted-byte totals for each measurement window.
Compare latency boundaries and capture policies on the same 1,000-transaction workload. Every number is calculated from the selected records.
1000 observations · 10 ns bins · [10k, 10(k+1))
Non-empty latency bins
All completions inside the half-open window contribute to the histogram, latency statistics, and observed bandwidth.
The right boundary is excluded. The completion exactly at 10,000 ns belongs in the final window.
latency = done - start;
p99 = sorted[ceil(0.99 * N) - 1];
bandwidth = observed_bits / window_ns;Example contract. All times are in ns, payload is 256 bits per transaction, p99 uses nearest rank, and bins are [10k,10(k+1)). The deterministic sample takes index 100b+b for b=0…9 and misses all planted tail events; it is not an unbiased estimate. Sampled bandwidth is observed bits/time, not estimated workload throughput. Checkpoints show selected state changes, not equally spaced simulation cycles.
class perf_analyzer extends uvm_subscriber #(trans);
int latency_bins[int]; // 0-10ns, 10-20ns, ...
virtual function void write(trans t);
realtime lat = t.done_time - t.start_time;
int bin;
if (lat < 0) begin
`uvm_error("PERF_TIME", "Completion precedes start")
return;
end
bin = int'($floor(lat / 10ns));
latency_bins[bin]++;
endfunction
virtual function void report_phase(uvm_phase phase);
foreach (latency_bins[i])
`uvm_info(
"PERF",
$sformatf(
"Bin %0dns-%0dns: %0d hits",
i * 10,
(i + 1) * 10,
latency_bins[i]
),
UVM_LOW
)
endfunction
endclassBuckets are half-open intervals: 0 ≤ latency < 10 ns, 10 ≤ latency < 20 ns, and so on. Explicit floor is essential because an ordinary real-to-int conversion rounds; 9 ns belongs in bin 0. Negative intervals report invalid timestamp ordering.
Lifecycle timestamps feed an in-memory histogram, a sliding bandwidth window, and separate average, p99, and maximum results.
The monitor records lifecycle timestamps once; the subscriber turns them into distributions, bandwidth windows, and a compact final report.
Record timing for 1 out of every 100 transactions.
Process every transaction in memory and emit only a final summary table or machine-readable report.
| Component | Responsibility | Required change |
|---|---|---|
| Transaction | Timestamps | Add realtime fields for start, accept, and done. |
| Subscriber | Stats engine | Use an associative array to bin latencies into a histogram. |
| Final Report | CSV/SQL output | Dump data in a format that Python or Excel can parse. |
class perf_analyzer extends uvm_subscriber #(trans);
int latency_bins[int]; // 0-10ns, 10-20ns, ...
virtual function void write(trans t);
realtime lat = t.done_time - t.start_time;
int bin;
if (lat < 0) begin
`uvm_error("PERF_TIME", "Completion precedes start")
return;
end
bin = int'($floor(lat / 10ns));
latency_bins[bin]++;
endfunction
virtual function void report_phase(uvm_phase phase);
foreach (latency_bins[i])
`uvm_info(
"PERF",
$sformatf(
"Bin %0dns-%0dns: %0d hits",
i * 10,
(i + 1) * 10,
latency_bins[i]
),
UVM_LOW
)
endfunction
endclassBuckets are half-open intervals: 0 ≤ latency < 10 ns, 10 ≤ latency < 20 ns, and so on. Explicit floor is essential because an ordinary real-to-int conversion rounds; 9 ns belongs in bin 0. Negative intervals report invalid timestamp ordering.
bandwidth_bits_per_second = accepted_payload_bits / window_seconds
useful_beats_per_cycle =
accepted_useful_data_beats / total_clock_cycles
For ready/valid: a beat transfers only when VALID && READY.
If VALID && !READY, hold VALID and payload until acceptance.
Measure buffer occupancy and accepted-beat counts at each pipeline boundary
when checking a registered backpressure path or skid-buffer capacity.State whether a metric counts payload bits, total bus bits, or accepted beats, and name the measurement window. VALID alone is not a transfer. Sustained and peak results need distinct, reproducible windows.
Use a sliding window, count transferred bits inside it, and divide by the window duration. Track peak separately from sustained bandwidth.
At one ready/valid boundary, no beat transfers while READY is low; VALID may remain asserted indefinitely with stable payload. For registered backpressure, count additional handshakes at each upstream boundary and resulting buffer occupancy. Compare those accepted beats with available skid capacity, not with how long VALID stays high.
It is the ratio of useful data beats to total clock cycles. It exposes cycles consumed by protocol headers and idle gaps.