entity counter is |
Coin counter scheme |
clk |
Active clock on rising edge |
reset |
Circuit reset, active at zero. When a reset occurs, the total value must be turned to zero |
sensor | Sensor signals vector. sensor(i) = '1' means that there is an object blocking the i-th sensor. |
total | Total value so far. The total amount should be updated whenever, and only when, the currency has finished passing through the sensors. |
Coin counter sample waveform. Notice that:
|