// Exercise G1, chip-level version: the chips and wires of schematic 2 and
// of the breadboard.  Same ports as first_gate.sv.
//
// Generated by tools/bb_lib.py from the checked breadboard wire list;
// change the layout in tools/bb_g1.py, not this file.  Synthesizable.

module first_gate_chips
(
    input  logic       a,
    input  logic       b,
    output logic       a_and_b
);

    // The power rails of the breadboard, for tied-off inputs

    wire gnd = 1'b0;
    wire vdd = 1'b1;

    // Outputs that go nowhere

    wire unused_u1_k;
    wire unused_u1_l;
    wire unused_u1_m;

    //------------------------------------------------------------------------

    // U1: CD4081 quad 2-input AND, pin 1 in column 14

    cd4081 i_u1
    (
        .a ( a           ),  // Pin 1 <- button A
        .b ( b           ),  // Pin 2 <- button B
        .j ( a_and_b     ),  // Pin 3 -> Y
        .k ( unused_u1_k ),  // Pin 4, unused output
        .c ( gnd         ),  // Pin 5 <- GND, unused input
        .d ( gnd         ),  // Pin 6 <- GND, unused input
        .e ( vdd         ),  // Pin 8 <- +5V, unused input
        .f ( vdd         ),  // Pin 9 <- +5V, unused input
        .l ( unused_u1_l ),  // Pin 10, unused output
        .m ( unused_u1_m ),  // Pin 11, unused output
        .g ( vdd         ),  // Pin 12 <- +5V, unused input
        .h ( vdd         )   // Pin 13 <- +5V, unused input
    );

endmodule
