Pad Frame Test Logics

From LibreSilicon
Jump to navigation Jump to search

A collection of simple functionality tests for verifying the proper behavior of a pad frame when porting LibrePDK to a new technology node.

The base repository with branches for individual generated layouts for test tapeouts, with their GDS files in GIT LFS, can be found here https://gitlab.libresilicon.com/designs/highwaytestchip/-/tree/master?ref_type=heads

Below the functions are being documented.

Test Functions Overview

We need to test high impedance vs. pull down and pull up paths of the driver circuit as well as the switching behavior of the pad, such as the voltage swing, slew, etc.

For this purpose we have defined 3 simple circuits which allow us to verify everything we need to know about the pad behavior

  • An 8 bit counter
  • A simple mode switch test
  • A clock loopback

8 bit ring counter

The idea behind this simple 8 bit counter is manifold

module ring8(
    input  wire clk,
    input  wire rst_n,
    output wire [7:0] q
);
    reg [7:0] q_r;
    always @(posedge clk) begin
        if (!rst_n) q_r <= 8'b00000001;
        else        q_r <= {q_r[6:0], q_r[7]};
    end
    assign q = q_r;
endmodule

First we test whether the library generated for a node generated by LibreStandardCell actually can be turned into a spice model, using Magic's spice extraction, which can be due to still being simple enough, simulated using ngspice and verified that it actually walks.

Additionally, we can determine the maximum clock frequency with which we can clock the ring counter before it stops working while we have it hooked up to an oscilloscope, which allows us to compare the measurements to our ngspice predictions of the circuit and the overall pad frame integration.

Additionally, you can clock it with a super slow quartz, solder it onto a PCB with some LEDs and have a wandering LED chain, make it red LEDs and you've got a KITT-scanner aka. Larson scanner.

Below the ideal behavior of this circuit has been plotted

Ring8 Timing Example SG13G2

This example is for SG13G2, where the predicted cut off for the normal IO pad cells is roughly 190 MHz while the actual internal circuit can be clocked much higher, but is only limited by the clock frequency the input buffer of the input pad can drive (optimized clock pad cells and high frequency impedance controlled pad cells are planned)

A switched state test

For this test we configure two pads as permanent inputs with their drivers permanently disabled, the signal from their input buffer is then used for testing the driver on/off state of a pad cell.

The led1 signal is wired to the output signal pin, the led2 signal is turning the driver FETs on or off.

When led1 is 1 and led2 is 1 then the LED at the output test pad will glow/there will be a high signal to ground.

When led1 is 1 and led2 is 0 then the LED is off because the output pin will be high impedance.

When led1 is 0 and led2 is 1 then the LED is off.because the potential is tied to ground by the pull down path FET in the driver.

module led_logic(input sw1, input sw2, output led1, output led2);
  wire n1, n2;
  INVX1 u_inv1 (.A(sw1), .Z(n1));
  INVX1 u_inv2 (.A(sw2), .Z(n2));
  INVX1 u_inv3 (.A(n1), .Z(led1));
  INVX1 u_inv4 (.A(n2), .Z(led2));
endmodule

Both switch inputs can either be controlled with a lab supply or physical switches soldered to a test board.

clock net loop back

The clock net loop-back is simply one of the pads, being permanently configured as an input, passing on the clock signal to all the other test circuits on the die, as well as directly passing it to a pad directly configured as output with active driver.

This test configuration allows us to measure clock skew and maximum clock propagation between input and output pads cells.