Description
Histogram
Design a hardware module that computes a histogram with 16 bins for a stream of 4-bit values. Count the occurrences of each value (0-15) and output the final counts for all 16 bins.
Example: For stream [0, 1, 0, 2, 1, 0, 15], the output should be [3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1].
Input
stream
Stream of 4-bit Unsigned IntegerStream of 4-bit values.
Output
Stream of 12-bit Unsigned Integer
Count for each of 16 bins.