
This design implements a simple heat stress alert system using a digital pulse input as a proxy for temperature.
A pulse signal is applied to the input pin ui_in[0]. The design detects rising edges of this signal and counts the number of pulses over time. The pulse frequency represents temperature level.
Based on the accumulated pulse count, the system classifies the condition into four categories: 0 = Safe 1 = Warm 2 = High Risk 3 = Critical
The result is continuously updated and driven to the output pins uo_out.
Run simulation using: make -B
Open the waveform: gtkwave tb.vcd
In the testbench, a pulse signal is generated on ui_in[0] to simulate a sensor or signal generator. As the number of pulses increases, the output state transitions from safe to critical.
You can observe:
This design can be tested using a signal generator (FNIRSI) configured as a square wave between 0V and 3.3V connected to ui_in[0].
For real-world use, a temperature sensor can be connected through a microcontroller which converts temperature readings into pulse frequency.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Pulse Input (Temperature Proxy) | State LSB | |
| 1 | State | ||
| 2 | State | ||
| 3 | State | ||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 |