/**
 * SimpleXNF.java
 * @author Anthony L. Slade
 */
import byucc.jhdl.parsers.xnf.XNFParser;
import byucc.jhdl.base.*;
import byucc.jhdl.Logic.Logic;
public class SimpleXNF extends Logic {
  public static CellInterface[] cell_interface
    = { in("a",1), in("b",1), out("o",1) };
  public static CellInterface[] implicit_interface
    = { clk("clk") };
  Wire a, b, clk, o;
  public SimpleXNF( Node parent, Wire a, Wire b, Wire o) {
    super(parent);
    this.a = connect("a", a);
    this.b = connect("b", b);
    this.o = connect("o", o);
    this.clk = connect("clk", getDefaultClock());

    // This array of Wire is sufficient if the wires passed to the
    // constructor of this class already have the names of "a", "b",
    // and "o".  If you load this circuit using TBone, then the wires
    // will automatically have those names because it found those
    // names in cell_interface!
    Wire[] MyXNFWires = { a, b, clk, o };
    XNFParser.parseXNF(this, MyXNFWires, "test1.xnf");

    /* WOW!!! Just two lines of code to use the XNFParser!!! */
  }
}

