Pad Frame Test Logics: Difference between revisions

From LibreSilicon
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 4: Line 4:


Below the functions are being documented.
Below the functions are being documented.
== Cloning your own base project ==
First you need to install [[Highway]] clone the basic base tests<syntaxhighlight lang="bash">
git clone https://gitlab.libresilicon.com/designs/highwaytestchip.git
cd highwaytestchip
</syntaxhighlight>Then create your own dedicated branch indicating the technology and voltage(s) in the shape technology_voltage<syntaxhighlight lang="bash">git checkout -b sg13g2_1v2</syntaxhighlight>Then initialize the repository, for instance for IHP's SG13G2 at 1.2V you run<syntaxhighlight lang="bash">highway init --node SG13G2 --voltage "1.2 V"</syntaxhighlight>Then you add all the source in the repository<syntaxhighlight lang="bash">highway add src/ring8/ring8.v src/led_logic/led_logic.v src/clk_buf/clk_buf.v src/test_chip.v
highway core add ring8 --top ring8 --top-file src/ring8/ring8.v --sources src/ring8/ring8.v --instances ring8
highway core add led_logic --top led_logic --top-file src/led_logic/led_logic.v --sources src/led_logic/led_logic.v --instances led_logic
highway set top test_chip</syntaxhighlight>Initialize the pad configuration and then take the example config for SG13G2 for the external pad wiring [https://gitlab.libresilicon.com/designs/highwaytestchip/-/raw/sg13g2_1v2/pads.json?ref_type=heads here]<syntaxhighlight lang="bash">highway pads init</syntaxhighlight>Download the most recent [[LibreStandardCell]] lib for your node (Under CERN OHL S)<syntaxhighlight lang="bash">highway lib</syntaxhighlight>At last you can run the whole flow<syntaxhighlight lang="bash">highway run</syntaxhighlight>


== Test Functions Overview ==
== Test Functions Overview ==
Line 15: Line 24:


== 8 bit ring counter ==
== 8 bit ring counter ==
'''What it tests:''' D-Flipflops and timing using the switching differentials
The idea behind this simple 8 bit counter is manifold<syntaxhighlight lang="verilog">
The idea behind this simple 8 bit counter is manifold<syntaxhighlight lang="verilog">
module ring8(
module ring8(
Line 31: Line 42:


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, 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.
This also allows us to test and verify that our D-Flipflops work as expected.
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
[[File:Ring8 Timing Example SG13G2.png|none|thumb|Ring8 Timing Example SG13G2]]
This example is for SG13G2 ([[Test_Die_SG13G2@1.2V#Ring Counter Simulation]]), 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.
The voltage swing and slew are already terrible at 100MHz, as you can see in the simulation in [[Test_Die_SG13G2@1.2V#100Mhz]], because of the high capacity of the huge driver FETs needed for driving loads between 20mA and 100mA.
Optimized clock pad cells without a driver circuit as well as high frequency impedance controlled pad cells are planned.


== A switched state test ==
== A switched state test ==
'''What it tests:''' The three states of the output driver, VDD, VSS, High Impedance(OFF)
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.
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.


Line 52: Line 78:


== clock net loop back ==
== clock net loop back ==
'''What it tests:''' The propagation delay of a clock signal and its skew
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.
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.
This test configuration allows us to measure clock skew and maximum clock propagation between input and output pads cells.

Latest revision as of 21:16, 10 November 2026

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.

Cloning your own base project

First you need to install Highway clone the basic base tests

git clone https://gitlab.libresilicon.com/designs/highwaytestchip.git
cd highwaytestchip

Then create your own dedicated branch indicating the technology and voltage(s) in the shape technology_voltage

git checkout -b sg13g2_1v2

Then initialize the repository, for instance for IHP's SG13G2 at 1.2V you run

highway init --node SG13G2 --voltage "1.2 V"

Then you add all the source in the repository

highway add src/ring8/ring8.v src/led_logic/led_logic.v src/clk_buf/clk_buf.v src/test_chip.v
highway core add ring8 --top ring8 --top-file src/ring8/ring8.v --sources src/ring8/ring8.v --instances ring8
highway core add led_logic --top led_logic --top-file src/led_logic/led_logic.v --sources src/led_logic/led_logic.v --instances led_logic
highway set top test_chip

Initialize the pad configuration and then take the example config for SG13G2 for the external pad wiring here

highway pads init

Download the most recent LibreStandardCell lib for your node (Under CERN OHL S)

highway lib

At last you can run the whole flow

highway run

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

What it tests: D-Flipflops and timing using the switching differentials

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.

This also allows us to test and verify that our D-Flipflops work as expected.

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 (Test_Die_SG13G2@1.2V#Ring Counter Simulation), 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.

The voltage swing and slew are already terrible at 100MHz, as you can see in the simulation in Test_Die_SG13G2@1.2V#100Mhz, because of the high capacity of the huge driver FETs needed for driving loads between 20mA and 100mA.

Optimized clock pad cells without a driver circuit as well as high frequency impedance controlled pad cells are planned.

A switched state test

What it tests: The three states of the output driver, VDD, VSS, High Impedance(OFF)


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

What it tests: The propagation delay of a clock signal and its skew


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.