// CD4068B: 8-input AND/NAND gate.
//
// Ports in pin order, named as in the datasheet.  The power pins, VSS (7)
// and VDD (14), are left out, and so are the unconnected pins 6 and 8.
// Synthesizable.
//
// One 8-input gate with two outputs: the plain one on pin 1 (K) and the
// inverted one on pin 13 (J).

module cd4068
(
    output logic k,  // Pin 1:  k = a & b & c & d & e & f & g & h
    input  logic a,  // Pin 2
    input  logic b,  // Pin 3
    input  logic c,  // Pin 4
    input  logic d,  // Pin 5
                     // Pin 6:  not connected
                     // Pin 7:  VSS
                     // Pin 8:  not connected
    input  logic e,  // Pin 9
    input  logic f,  // Pin 10
    input  logic g,  // Pin 11
    input  logic h,  // Pin 12
    output logic j   // Pin 13: j = ~ (a & b & c & d & e & f & g & h)
                     // Pin 14: VDD
);

    assign j = ~ (a & b & c & d & e & f & g & h);
    assign k = a & b & c & d & e & f & g & h;

endmodule
