GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - terenceang/tang-primer-20k-starter: Starter kit for the Sipeed Tang Primer 20K (Gowin GW2A-18C) + Dock: verified pinout, HDMI video/audio, WS2812, LED examples with testbenches, CLI build/sim/program flow, Claude Code skills

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
docs
docs
 
 
hdmi
hdmi
 
 
knight_rider
knight_rider
 
 
neopixel
neopixel
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Tang Primer 20K Starter

Starter kit for the Sipeed Tang Primer 20K (Gowin GW2A-LV18PG256C8/I7) on the Dock carrier: a verified pinout, working example designs with self-checking testbenches, a command-line build/sim/program flow, and Claude Code skills. Use it as the starting point for new Tang Primer 20K projects.

Start a new project

  1. Copy the closest example as a template (e.g. knight_rider/ for plain logic, hdmi/ for video):
    cp -r knight_rider my_design && rm -rf my_design/impl
  2. Edit src/top.v, take pins from docs/pinout.md into src/top.cst, and list every source file in build.tcl.
  3. Write sim/tb_top.v so it prints PASS and exits 0 ($fatal(1, ...) on failure); run it.
  4. gw_sh build.tcl, check impl/pnr/top.log and the timing summary, then load into SRAM.

With Claude Code, ask the fpga-engineer agent to do the whole loop.

Designs

All verified on hardware. Each has src/, a self-checking testbench in sim/, and build.tcl.

Project What Uses
knight_rider/ Larson scanner across the 6 LEDs with a fading PWM tail LEDs, S1
neopixel/ Rainbow on the onboard WS2812B; reusable ws2812.v driver WS2812 (T9), S1
hdmi/ 720×480p colour bars, caption + drop-frame timecode, 1 kHz tone over HDMI audio HDMI, rPLL, OSER10, TLVDS

Docs

  • docs/pinout.md — every Dock/SOM pin: banks and voltages, LEDs, keys, switches, HDMI, Ethernet, USB PHY, LCD, camera, audio, mic, PMODs, SD, shared-pin conflicts, required build options.
  • docs/Schematics/ — Dock + SOM schematics, Gowin UG290 programming guide.

Toolchain

Tool Path
Gowin EDA 1.9.12.04 C:\Gowin\Gowin_V1.9.12.04_x64 (IDE\bin\gw_sh, Programmer\bin\programmer_cli)
Icarus Verilog 12 + GTKWave C:\iverilog\bin, C:\iverilog\gtkwave\bin

Typical loop, from a project directory:

/c/iverilog/bin/iverilog -g2012 -o sim/tb.vvp sim/tb_top.v src/*.v && /c/iverilog/bin/vvp -n sim/tb.vvp
/c/Gowin/Gowin_V1.9.12.04_x64/IDE/bin/gw_sh build.tcl
cd /c/Gowin/Gowin_V1.9.12.04_x64/Programmer/bin && ./programmer_cli -d GW2A-18C --run 2 --fsFile "<abs path>\impl\pnr\top.fs"

--run 2 loads SRAM (temporary); --run 36 writes the boot flash.

Claude Code

  • Skills in .claude/skills/: tp20k-build, tp20k-sim, tp20k-program.
  • Agent in .claude/agents/: fpga-engineer — spec → RTL → sim → build → program.

Board gotchas

  • LEDs are active low; keys S2–S5 and SW2–5 are on the 1.5 V bank (LVCMOS15).
  • set_option -use_sspi_as_gpio 1 is required for T10 (S1/reset), T9, C10, N9, M8.
  • Keep DIP SW1 ON at power-up — it's wired to RECONFIG_N.

Not in this repository

Kept locally, excluded by .gitignore:

  • Dock 3D models (docs/3D model/*.step, ~100 MB each, over GitHub's file limit) — from Sipeed's Tang Primer 20K downloads: https://dl.sipeed.com/shareURL/TANG/Primer_20K
  • Gowin UG290 Programming and Configuration Guide — https://www.gowinsemi.com (Documentation)

License

MIT © 2026 Terence Ang — covers the HDL, testbenches, scripts, skills and docs written here. hdmi/src/hdmi/ and hdmi/sim/include/ come from the author's Apple_TN20K project, also MIT.

Third-party material is not covered by the MIT license and remains its owners' property: the Sipeed schematics in docs/Schematics/ (© Shenzhen Sipeed Technology Co., Ltd.), included for reference. docs/pinout.md is derived from them.

About

Starter kit for the Sipeed Tang Primer 20K (Gowin GW2A-18C) + Dock: verified pinout, HDMI video/audio, WS2812, LED examples with testbenches, CLI build/sim/program flow, Claude Code skills

Topics

fpgagowingw2ahdmisipeedstarter-templatetang-primer-20kverilogws2812

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.