A hardware description language (HDL) specifies the structure or behavior of hardware systems. In a SCADA control network, it can describe sensors, terminal units, engines, fuel tanks, solar panels, and their components while hiding native API details. section 3.1.3
A practical HDL separates a simple embedded DSL from an external DSL. Embedded data structures and helpers define devices in program code; external text files let engineers describe devices outside the application, where parsing and translation convert them into HDL. section 3.3.1
Useful design principles include:
- Represent common device capabilities instead of encoding every manufacturer-specific passport or native interface. section 3.1.3
- Model components recursively, but constrain the model so self-references and physically impossible assemblies are rejected. section 3.1.3
- Treat HDL definitions as stateless templates or blueprints, then compile them into runtime representations that can target tests or physical devices. section 3.3.1
A rotary-engine blueprint
A rotary engine can contain a nozzle, while the nozzle contains pressure and temperature sensors. The same declaration can serve as a reusable blueprint rather than representing one already-running device. section 3.3.1
data Device = Sensor | TerminalUnit data NativeAPI = NativeAPI #1 data Hdl = Devices [Device] #2 | NativeAPIs [NativeAPI] #3
The compact algebraic model distinguishes devices from native APIs and allows an HDL to contain collections of each. section 3.1.3
