From a Wokwi schematic to a GDS file

Build and test a two-input AND gate in Wokwi, then use GitHub Actions to turn it into a SKY130 chip layout. At the end, you will have a GDSII (.gds) file, a 2D preview, and an interactive 3D view of your layout.

You can complete this workshop in your browser. The switches and LED help you test the circuit in Wokwi; the logic between the input and output buffers becomes the chip design.

1. Create your accounts

Create a GitHub account and a Wokwi account. Sign in to both before continuing. On Wokwi, select Sign up or Sign in in the upper-right corner.

Think of GitHub as a resume: public projects let others see what you have built, how you explain your work, and how your skills develop. Give this project a clear name and write documentation you would be happy to show someone.

2. Open the SKY130 Basic Wokwi template

Go to TinyTapeout.com and find the basic Wokwi template in the Get started section. For this workshop, use the SKY130 Basic template. Right-click the link and choose Open link in new tab. You can also open the basic Wokwi template directly.

The template contains input switches, clock and reset controls, green input and output buffers, inverters, and a seven-segment display.

Wokwi template with input switches, clock and reset, buffers, inverters, and seven-segment display labeled

Reference screenshot from Tiny Tapeout’s simulation tutorial. The site’s labels and appearance may vary slightly.

3. Replace the example circuit with one AND gate

If the simulation is running, press Stop before editing.

  1. Select each inverter and press Delete.
  2. Select the seven-segment display and press Delete.
  3. Remove any leftover wires from those components. Keep the switches, clock/reset controls, and input/output buffers.
  4. Click the blue + button to add a component.
  5. Find the Logic section and choose AND gate. Place one gate between the green buffers.

Wokwi Logic component menu with the AND gate near the top

Choose AND gate, the second item in this reference menu. The highlighted NAND gate is a different component.

To draw a wire, click its starting pin, then its destination pin. Click empty space along the way to add bends. See Wokwi’s diagram editor instructions for more editing controls.

4. Wire the inputs and output

The first two switches are already connected to the input buffer. Use their corresponding terminals on the right edge of that buffer to reach the AND gate.

Connection Start Destination
Input A Input buffer IN0, corresponding to switch 1 / ui[0] First AND-gate input
Input B Input buffer IN1, corresponding to switch 2 / ui[1] Second AND-gate input
Result AND-gate output First output-buffer input, OUT0 / uo[0], on its left edge

Use IN0 and IN1, not the two terminals at the top of the input buffer. Those top terminals are CLK (clock) and RST_N (reset). An AND gate does not need either one.

AND gate connected from IN0 and IN1 to OUT0, with CLK and RST_N visible above the data inputs

Reference wiring screenshot from Tiny Tapeout. It shows the three connections you need, plus additional template wiring. For this workshop, remove the unused connections to the other outputs.

5. Add and wire the LED

  1. Click +, add an LED, and place it to the right of the output buffer.
  2. Select the LED and press P to flip it, or click the Flip button in the toolbar above the schematic. Make sure the LED itself is selected when using the shortcut.
  3. Connect the output buffer’s first output, OUT0 on its right edge, to the LED’s long leg: the anode, labeled A.
  4. Connect the LED’s short leg to ground: the cathode, labeled C. Use the template’s ground terminal; if needed, add a GND component from the component menu.

Flipping changes the LED’s position, so identify its legs by their pin labels rather than by left/right position. Wokwi documents the labels in its LED reference.

Your complete signal path should be:

Switch 1 → IN0 ──┐
                AND → OUT0 input → output buffer → OUT0 output → LED A
Switch 2 → IN1 ──┘                                             LED C → GND

6. Simulate all four input combinations

Press the green Play ▶ button. Toggle switches 1 and 2 through every combination below. Here, 0 means low/off and 1 means high/on.

Switch 1 / A Switch 2 / B Expected AND output Expected LED
0 0 0 Off
0 1 0 Off
1 0 0 Off
1 1 1 On

An AND gate produces 1 only when both inputs are 1. Observe the LED for each row before continuing.

If the behavior differs, stop the simulation and check the input terminals, OUT0 connection, and LED polarity. Resolve any ERC warnings shown by Wokwi before building the layout.

7. Save your own schematic and record its ID

Open the dropdown next to Save and choose Save a copy. Give the project a name such as My AND Gate, keep it public for this workshop, and click Save Copy.

Wokwi Save dropdown with Save a copy

Save a Copy dialog with project name, Public visibility, and Save Copy button

After saving, look at the updated browser URL:

https://wokwi.com/projects/YOUR_PROJECT_ID

Record the entire number after /projects/. This is your unique Wokwi project ID, which GitHub will use to fetch your circuit. Use the ID of your saved copy, not the original template.

Browser address bar showing the numeric Wokwi project ID

The screenshot shows an example ID. Yours will be different.

8. Create a public GitHub repository from the template

Open the ChipFoundry Wokwi-to-GDS template in another tab.

  1. Click Use this template → Create a new repository.
  2. Choose your GitHub account as the Owner.
  3. Enter a repository name, such as my-and-gate.
  4. Select Public.
  5. Click Create repository or Create repository from template.

GitHub Use this template menu with Create a new repository

Reference screenshot from GitHub’s template instructions.

You now have your own repository containing the conversion workflows. Work in this copy for the remaining steps.

9. Set GitHub Pages to GitHub Actions

Before editing the project files:

  1. Open your repository’s Settings tab.
  2. Select Pages in the left sidebar, under Code and automation.
  3. Under Build and deployment → Source, change Deploy from a branch to GitHub Actions.

If it already says GitHub Actions, leave it selected. The template already includes the publishing workflow, so you do not need to create one of GitHub’s suggested workflows. This setting enables the generated browser viewer. See GitHub’s Pages setup instructions.

10. Fill in info.yaml

Open Code → info.yaml, then click the pencil icon to edit it.

At the time this guide was prepared, the linked example info.yaml still contained blank project fields. The completed AND-gate example below shows exactly what to enter.

Replace YOUR_PROJECT_ID with the numeric ID you recorded, without the URL, and replace Your Name with your name. The placeholder ID is not valid until you replace it.

# Tiny Tapeout project information (Wokwi project)
project:
  wokwi_id: YOUR_PROJECT_ID
  title: "Two-input AND gate"
  author: "Your Name"
  discord: ""
  description: "Outputs high only when both inputs are high."
  language: "Wokwi"
  clock_hz: 0
  tiles: "1x1"

pinout:
  # Inputs
  ui[0]: "A"
  ui[1]: "B"
  ui[2]: ""
  ui[3]: ""
  ui[4]: ""
  ui[5]: ""
  ui[6]: ""
  ui[7]: ""

  # Outputs
  uo[0]: "A AND B"
  uo[1]: ""
  uo[2]: ""
  uo[3]: ""
  uo[4]: ""
  uo[5]: ""
  uo[6]: ""
  uo[7]: ""

  # Bidirectional pins
  uio[0]: ""
  uio[1]: ""
  uio[2]: ""
  uio[3]: ""
  uio[4]: ""
  uio[5]: ""
  uio[6]: ""
  uio[7]: ""

yaml_version: 6

You only need to fill in the project ID, title, author, description, and the three used pin labels. Leave discord blank unless you want to provide it. Keep language, tiles, and yaml_version as shown. clock_hz: 0 is correct because this circuit uses no clock. Leave unused pin descriptions blank, and do not add or delete pin entries.

Click Commit changes, use a message such as Configure AND gate project, and commit directly to the default branch (main). A commit saves a version of your changes in GitHub.

11. Fill in docs/info.md

Open Code → docs → info.md, then click the pencil icon.

The template documentation currently contains placeholder instructions. Replace every placeholder line under each heading, keeping the headings. You can use this completed example:

## How it works

This project implements a two-input AND gate.
Input A is ui[0] and input B is ui[1].
The result appears on uo[0].
The output is high only when both inputs are high.
This is a combinational circuit and does not use a clock or reset.
Unused outputs are not part of the demonstrated function.

## How to test

In Wokwi, start the simulation and toggle switches 1 and 2.
Test all four combinations and compare the LED with this table:

| A / ui[0] | B / ui[1] | Result / uo[0] | LED |
| --- | --- | --- | --- |
| 0 | 0 | 0 | Off |
| 0 | 1 | 0 | Off |
| 1 | 0 | 0 | Off |
| 1 | 1 | 1 | On |

The LED should light only for A = 1 and B = 1.

## External hardware

The Wokwi simulation uses two input switches and one LED.
The LED anode connects to OUT0 and the cathode connects to ground.
These components are simulation controls and indicators outside the chip.
No external hardware is needed to generate or inspect the GDS file.

Click Commit changes, use a message such as Document AND gate behavior, and commit to main.

12. Wait for GitHub Actions to finish

The template’s GDS workflow runs automatically on a push. Editing and committing the two files separately can therefore start multiple builds. Once both edits are committed, monitor the runs associated with your latest commit.

GitHub repository navigation with the Actions tab outlined

Open Actions, select the gds workflow, and open the newest run for the final commit. Wait for its jobs to finish:

Job What it does
gds Converts your Wokwi design into a physical SKY130 layout
precheck Checks the generated layout
viewer Publishes the preview and interactive viewer through GitHub Pages

Yellow indicates queued or running work, green indicates success, and red indicates failure. Builds can take several minutes; watch the job status rather than expecting a fixed finish time.

An early run may fail while the project fields are still blank. Check the run for your completed files. If that run fails, open the failed job and expand its logs. For a viewer deployment failure, recheck Settings → Pages → Source → GitHub Actions.

13. Inspect the generated layout

When the latest run finishes successfully, open its Summary and inspect the information generated by the GDS action. Look for warnings, routing information, standard-cell usage, and the precheck results.

The viewer job adds a 2D Preview and an Open 3D viewer link to the workflow summary. Scroll through the job summaries if they are not immediately visible.

  • 2D Preview: examine the top-down image of your layout, including cells and the wires connecting them.
  • 3D viewer: click Open 3D viewer to explore the layout in your browser. Zoom, drag to change the view, and toggle layers in the controls.

Example chip layout displayed in Tiny Tapeout’s interactive 3D viewer

Example viewer screenshot from Tiny Tapeout’s GDS tutorial. It shows another project; your AND-gate layout will differ.

Zoomed example layout with a logic cell highlighted and layer controls on the right

This reference screenshot highlights an OR-gate cell in another design. Use the same controls to explore the cells in your own AND-gate layout.

You may see filler, tap, and other supporting cells alongside the logic cells. These support the physical layout and manufacturing rules.

14. Download your GDS file

On the successful gds workflow run’s summary page, scroll to Artifacts and download tt_submission. Extract the ZIP and find the .gds file inside the tt_submission folder. The current GDS action also uploads gds_render for the 2D image and GDS_logs for build details.

Keep the .gds file, your Wokwi URL, and your GitHub repository URL together. You have now built, simulated, documented, and generated the physical layout for your AND gate.