Building a hardware histogram in RTL? Flop arrays scale poorly, while SRAMs introduce 3-stage RMW data hazards. Here is how to handle hazard forwarding, valid-bit resets, and multi-input scaling.
chipress.onlineHow to implement histogram in hardware?Histogram can be implemented in hardware for collecting distributions of run-time data cycle by cycle. The results are later read by software for further analysis, and we assume that software read can only happen after hardware is fully quiesced. The problem consists of 2 parts: figuring out which interval the data belongs to, and updating the histogram data structure. The former can be treated as a search problem, and we only focus on the latter here.
