
The Configurable Multi-Mode PWM Generator is a digital three-channel pulse-width modulation controller implemented using SKY130 130 nm CMOS technology.
The design provides independent duty-cycle control, programmable frequency division, phase shifting, complementary PWM outputs and programmable dead-time insertion.
The system uses an 8-bit PWM counter and a programmable 8-bit clock prescaler. Each channel compares the phase-adjusted counter value with its configured duty cycle to generate the PWM waveform.
The design supports four operating modes:
| Mode | Description |
|---|---|
| 00 | Standard PWM |
| 01 | Phase-shifted PWM |
| 10 | Complementary phase-shifted PWM |
| 11 | Complementary PWM with programmable dead time |
The PWM frequency is calculated using:
F_PWM = F_CLK / (256 x (DIVIDER + 1))
For a 10 MHz input clock:
| Divider | PWM frequency |
|---|---|
| 0 | 39.0625 kHz |
| 1 | 19.53125 kHz |
| 3 | 9.765625 kHz |
| 7 | 4.8828125 kHz |
| 15 | 2.44140625 kHz |
| 255 | 152.588 Hz |
Duty cycle = (DUTY / 256) x 100 percent
| Register value | Duty cycle |
|---|---|
| 0 | 0% |
| 64 | 25% |
| 128 | 50% |
| 192 | 75% |
| 255 | 99.609375% |
Phase shift = (PHASE / 256) x 360 degrees
| Register value | Phase shift |
|---|---|
| 0 | 0 degrees |
| 64 | 90 degrees |
| 85 | 119.53125 degrees |
| 128 | 180 degrees |
| 171 | 240.46875 degrees |
| 192 | 270 degrees |
Dead time is programmed in input clock cycles.
T_DEAD = DEAD_TIME / F_CLK
For a 10 MHz input clock:
| Register value | Dead time |
|---|---|
| 0 | 0 us |
| 10 | 1 us |
| 20 | 2 us |
| 50 | 5 us |
| 100 | 10 us |
| 255 | 25.5 us |
During dead-time insertion, both the normal and complementary outputs are held LOW.
If the programmed dead time exceeds the available pulse duration, the corresponding pulse may be suppressed.
| Address | Register | Reset value | Description |
|---|---|---|---|
| 0x0 | CONTROL | 0x00 | Enable and mode selection |
| 0x1 | DIVIDER | 0x00 | Frequency divider |
| 0x2 | DUTY_A | 0x80 | Channel A duty cycle |
| 0x3 | DUTY_B | 0x80 | Channel B duty cycle |
| 0x4 | DUTY_C | 0x80 | Channel C duty cycle |
| 0x5 | PHASE_A | 0x00 | Channel A phase |
| 0x6 | PHASE_B | 0x55 | Channel B phase |
| 0x7 | PHASE_C | 0xAB | Channel C phase |
| 0x8 | DEAD_TIME | 0x14 | Dead-time duration |
| Bit | Function |
|---|---|
| 0 | Generator enable |
| 1 | Mode bit 0 |
| 2 | Mode bit 1 |
| 7:3 | Reserved |
| Control value | Operation |
|---|---|
| 0x00 | Disable generator |
| 0x01 | Enable standard PWM |
| 0x03 | Enable phase-shifted PWM |
| 0x05 | Enable complementary PWM |
| 0x07 | Enable PWM with dead time |
The generator must be disabled before changing its configuration or operating mode.
| Pin | Function |
|---|---|
| ui_in[7:0] | 8-bit register data |
| uio_in[3:0] | 4-bit register address |
| uio_in[4] | Register write enable |
| uio_in[7:5] | Reserved |
| clk | System clock |
| rst_n | Active-low reset |
| ena | Tiny Tapeout project enable |
All bidirectional pins are configured as inputs.
| Pin | Function |
|---|---|
| uo_out[0] | PWM channel A |
| uo_out[1] | Complementary channel A |
| uo_out[2] | PWM channel B |
| uo_out[3] | Complementary channel B |
| uo_out[4] | PWM channel C |
| uo_out[5] | Complementary channel C |
| uo_out[6] | Generator active status |
| uo_out[7] | Reserved, held LOW |
Disable the PWM generator before writing configuration registers.
Program the following register values:
| Address | Data |
|---|---|
| 0x0 | 0x00 |
| 0x1 | 0x00 |
| 0x2 | 0x40 |
| 0x3 | 0x80 |
| 0x4 | 0xC0 |
| 0x0 | 0x01 |
Expected results:
| Address | Data |
|---|---|
| 0x0 | 0x00 |
| 0x1 | 0x00 |
| 0x2 | 0x80 |
| 0x3 | 0x80 |
| 0x4 | 0x80 |
| 0x5 | 0x00 |
| 0x6 | 0x55 |
| 0x7 | 0xAB |
| 0x0 | 0x03 |
Expected results:
Disable the generator by writing 0x00 to address 0x0.
Enable complementary mode by writing 0x05 to address 0x0.
Observe the normal and complementary output pairs using an oscilloscope or logic analyzer.
| Address | Data |
|---|---|
| 0x0 | 0x00 |
| 0x1 | 0x00 |
| 0x2 | 0x80 |
| 0x3 | 0x80 |
| 0x4 | 0x80 |
| 0x8 | 0x14 |
| 0x0 | 0x07 |
Expected results:
The design has been verified using:
The comprehensive functional test suite contains 16 checks covering frequency, duty cycle, phase shift, complementary operation, dead time, register write protection, reset and disable behavior.
No additional hardware is required for basic digital operation beyond the Tiny Tapeout demo board.
Recommended testing equipment:
Potential applications include:
External gate drivers and suitable protection circuits are required when controlling power MOSFETs, motors or other high-power loads.
The chip outputs are digital logic signals and must not be connected directly to high-power loads.
We gratefully acknowledge the Center of Excellence (CoE) in Integrated Circuits and Systems (ICAS) and the Department of Electronics and Communication Engineering (ECE) for providing the necessary resources and guidance.
Special thanks to Dr. H V Ravish Aradhya (HoD - ECE), Dr. K R Usha Rani (Associate Dean - PG), Dr. K. S. Geetha (Vice Principal) and Dr. K. N. Subramanya (Principal) for their constant encouragement and support in facilitating this Tiny Tapeout SKY26e submission.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | DATA_0 | PWM_A | ADDR_0 |
| 1 | DATA_1 | PWM_A_N | ADDR_1 |
| 2 | DATA_2 | PWM_B | ADDR_2 |
| 3 | DATA_3 | PWM_B_N | ADDR_3 |
| 4 | DATA_4 | PWM_C | WRITE_EN |
| 5 | DATA_5 | PWM_C_N | |
| 6 | DATA_6 | ACTIVE | |
| 7 | DATA_7 |