This project implements a PLC-PRG (Programmable Logic Controller – Program) in Verilog.
It mimics the behavior of a simple PLC by reading digital inputs (ui[7:0]
), processing the logic, and driving outputs (uo[7:0]
) based on programmed control rules.
The design is combinational/sequential depending on the configuration. Inputs can represent push buttons or sensors (e.g., START
, STOP
, RESET
), and outputs can represent actuators such as LEDs, relays, or motors.
The Verilog code models the basic scan cycle of a PLC:
This makes it possible to prototype small automation tasks directly on silicon.
Connect input pins (ui[0]
–ui[7]
) to switches, buttons, or FPGA I/O signals.
ui[0]
: STARTui[1]
: STOPui[2]
: RESETObserve output pins (uo[0]
–uo[7]
).
uo[0]
: Motor control (ON/OFF)uo[1]
: Status LEDSimulation:
On silicon:
ui[0]
(START) turns ON uo[0]
(Motor LED).ui[1]
(STOP) turns OFF uo[0]
.ui[2]
(RESET) clears all outputs.This demonstrates how a simple PLC program can be realized directly in Verilog and fabricated with Tiny Tapeout.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | IN0 | OUT0 | |
1 | IN1 | OUT1 | |
2 | IN2 | OUT2 | |
3 | IN3 | OUT3 | |
4 | IN4 | OUT4 | |
5 | IN5 | OUT5 | |
6 | IN6 | OUT6 | |
7 | IN7 | OUT7 |