
This design implements a simple water quality classification system using two internal engines.
Engine 1 extracts signal features from incoming sensor data:
Engine 2 classifies the water condition into three states:
The system does not require chemical analysis. Instead, it uses electrical signal behavior as a proxy for water quality.
Run simulation using cocotb: make -B
View waveform: gtkwave tb.vcd
Test input behavior:
You can also use a function generator (FNIRSI) to simulate:
Connect generator output through a simple comparator or ADC stage into uio_in pins.
No external hardware required for simulation.
For lab testing:
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Sample Enable | STATE0 | Sensor0 |
| 1 | Unused | STATE1 | Sensor1 |
| 2 | DBG0 | Sensor2 | |
| 3 | DBG1 | Sensor3 | |
| 4 | AVG0 | Sensor4 | |
| 5 | AVG1 | Sensor5 | |
| 6 | AVG2 | Sensor6 | |
| 7 | AVG3 | Sensor7 |