Documentation - Quick Reference


Below is a complete list of case-sensitive keywords in the language which may not be used as identifiers. The bottom part of the list contains keywords set aside for future use when Design Rule Checking (DRC) becomes implemented.

// general keywords
attr        // declares an attribute
combine     // used to form an array of instance pins
design      // declares a design
device      // declares a device
info        // declares information about something
inst        // instances a device
net         // declares a net
of          // separates instance name from reference name
package     // declares a package
port        // declares a port (only in a sub-design)
subdesign   // declares a sub-design (hierarchy)
subinst     // instances a sub-design (hierarchy)
open        // purposely tells the compiler a pin is not to be used
this        // used to qualify an assignment with an instance index (only for instance arrays)

// pin type keywords for future DRC implementation
// (all are used to declare a pin in a device)
pin      // default pin type
inpin    // (not yet supported) input pin
outpin   // (not yet supported) output pin
iopin    // (not yet supported) input-output pin (bidirectional)
pwrpin   // (not yet supported) power pin (usually for an integrated circuit)
suppin   // (not yet supported) supply pin (usually for something that provides power)
ocpin    // (not yet supported) open collector pin
oepin    // (not yet supported) open emitter pin
tripin   // (not yet supported) tri-state pin
passpin  // (not yet supported) passive pin (resistor / capacitor / inductor)
ncpin    // (not yet supported) no-connect pin (excluded from any DRC validation)

Declaring a device

Declaring a device involves defining required attributes, any additional attributes that will aid in the generation of a Bill of Material, and all of the pins associated with the device.

device resistor {
    attr REFPREFIX = "R";
    attr FOOTPRINT = "R0603";
    attr LIBRARY = "rcl-smd";
    pin a = {1};
    pin b = {2};
Optional Special Attributes
attr COST = "0.35";	// Will total the cost for each part type in the Bill of Materials
attr PINCOUNT = "12";	// Will total number of pins in a device declaration and notify if inconsistant
attr REFDES = "R15";	// Can be used to staticly set Reference Designator when instancing devices
attr MFGR = "Digilent";	// Usefull in Bill of Materials
attr PARTNUMBER = "1AX";// Usefull in Bill of Materials
attr NAME = ""; 	// Usefull in Bill of Materials
attr VALUE = "150";	// Can be used to specify resistance, capacitance, frequency, etc.
attr CUSTOM  = "?"; 	// Any custom attribute desired, will be tabulated in Bill of Materials

Declaring a design

design top {


Getting Started With PHDL

The best place to start is to visit our installation instructions which will help you get PHDL up and running on your machine. Then, be sure to visit the tutorial page.