Next: , Up: Tutorial


2.1 Top-level circuits

Write the following HAC file, inv-top.hac:

     bool x, y;
     prs {
       x => y-
     }

Compile the source to an object file:

     $ haco inv-top.hac inv-top.haco
     $ haccreate inv-top.haco inv-top.haco-c

Generate a netlist:

     $ hacknet inv-top.haco-c > inv-top.spice

The resulting output should look like:

     My:dn:0 !GND x y !GND nch W=5u L=2u
     My:up:0 !Vdd x y !Vdd pch W=5u L=2u

The resulting netlist produces a set of transistors at the top-level. The !Vdd and !GND nodes are implicit power supplies. The default device types are nch for NFETs and pch for PFETs. Default widths and lengths were chosen because none were specified.