Hardware Description Language

A HDL definition defines the internal wiring of a chip and consists of 2 parts

Tip

  • Each chip is defined in a seperate text file
  • A chip called Xxx is defined in a file called Xxx.hdl (case sensitive!!)
  • Keywords are capitalised
  • Identifier name may be sequence of letters and digits not starting with a digit
  • Whitespace has no meaning
  • Lines end with semicolons

Defining a Chip

CHIP Xor {
   IN a, b;
   OUT out;

   PARTS:
   And (a=a, b=b, out=x);
   Or (a=a, b=b, out=y);
   Not (in=x, out=notx);
   And (a=y, b=notx, out=out);
}

These parts are like functions but each paramater is defined when calling it

Defining a Chip (Buses)

CHIP foo {
   IN in[8];
   OUT out[8];

   //Parts
}