
There is a FSM that counts how many times the input signal is "ON" in a fixed time window, then it calculates the duty cycle.
just put a PWM signal to the input ui_in[0] and check the first 7 bits of uo_out (the duty cycle value) and the bit uo_out[7] (the valid signal). The value 127 corresponds to a duty cycle of 100%.
A signal generator or PWM generator for the input and a logic state analyzer to check the output.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | sign in | duty_cycle[0] | |
| 1 | duty_cycle[1] | ||
| 2 | duty_cycle[2] | ||
| 3 | duty_cycle[3] | ||
| 4 | duty_cycle[4] | ||
| 5 | duty_cycle[5] | ||
| 6 | duty_cycle[6] | ||
| 7 | valid |