AgentSkillsCN

puya

普亚半导体 MPN 编码规则、后缀解码及处理指南。适用于与普亚 SPI NOR 闪存元件或普亚Handler 配合使用时。

SKILL.md
--- frontmatter
name: puya
description: Puya Semiconductor MPN encoding patterns, suffix decoding, and handler guidance. Use when working with Puya SPI NOR Flash memory components or PuyaHandler.

Puya Semiconductor Manufacturer Skill

MPN Structure

Puya MPNs follow this general structure:

code
[PREFIX][DENSITY][PACKAGE][-SUFFIX]
   |       |        |        |
   |       |        |        +-- Optional: Grade/Temperature (SSH, SUH)
   |       |        +-- Package code (H, U, SH, SU)
   |       +-- Memory density (80=8Mbit, 16, 32, 64, 128)
   +-- Series prefix (P25Q, P25D, PY25Q)

Example Decoding

code
P25Q80H
|  | ||
|  | |+-- H = SOIC-8 package
|  | +-- 80 = 8 Mbit density
|  +-- Q = Standard series
+-- P25 = Puya SPI Flash prefix

P25Q16H-SSH
|  |  | | |
|  |  | | +-- SSH = SOIC-8 (hyphenated suffix)
|  |  | +-- H = base package indicator
|  |  +-- 16 = 16 Mbit density
|  +-- Q = Standard series
+-- P25 = Puya SPI Flash prefix

PY25Q128HA
| | |  ||
| | |  |+-- A = Grade code (Automotive)
| | |  +-- H = SOIC-8 package
| | +-- 128 = 128 Mbit density
| +-- Y25Q = Automotive grade series
+-- P = Puya prefix

Series Prefixes

PrefixCategoryDescription
P25QStandard SPI NOR Flash3.3V operation, general purpose
P25DLow Power SPI NOR FlashReduced power consumption
PY25QAutomotive Grade SPI NOR FlashAEC-Q100 qualified, extended temperature

Density Codes

CodeDensitySize
808 Mbit1 MB
1616 Mbit2 MB
3232 Mbit4 MB
6464 Mbit8 MB
128128 Mbit16 MB

Note: Density code 80 represents 8 Mbit (not 80 Mbit).


Package Codes

Base Package Codes

CodePackageNotes
HSOIC-8Standard 208mil body
UUSON-8Ultra thin 2x3mm
SHSOIC-8-WIDEWide body 300mil
SUWSON-86x5mm leadless

Hyphenated Suffix Codes

SuffixPackageNotes
-SSHSOIC-8Standard SOIC-8 with grade indicator
-SUHWSON-8WSON-8 with grade indicator

Product Families

P25Q Series - Standard SPI NOR Flash

Part NumberDensityInterfaceVoltageSpeed
P25Q80H8 MbitSPI/Dual/Quad2.3V-3.6V104MHz
P25Q16H16 MbitSPI/Dual/Quad2.3V-3.6V104MHz
P25Q32H32 MbitSPI/Dual/Quad2.3V-3.6V104MHz
P25Q64H64 MbitSPI/Dual/Quad2.3V-3.6V104MHz
P25Q128H128 MbitSPI/Dual/Quad2.3V-3.6V104MHz

P25D Series - Low Power SPI NOR Flash

Part NumberDensityInterfaceVoltagePower Mode
P25D80H8 MbitSPI/Dual/Quad1.65V-3.6VUltra Low Power

PY25Q Series - Automotive Grade SPI NOR Flash

Part NumberDensityTemperatureQualification
PY25Q128HA128 Mbit-40C to +125CAEC-Q100

Handler Implementation Notes

Pattern Matching

java
// P25Q series - Standard SPI NOR Flash
"^P25Q\\d+.*"

// P25D series - Low Power SPI NOR Flash
"^P25D\\d+.*"

// PY25Q series - Automotive Grade (check first as more specific)
"^PY25Q\\d+.*"

Package Code Extraction

java
// Handle hyphenated suffixes first
int hyphenIndex = upperMpn.indexOf('-');
if (hyphenIndex > 0) {
    String suffix = upperMpn.substring(hyphenIndex + 1);
    // Check against PACKAGE_CODES map
}

// Then extract trailing package code after density
// P25Q80H -> H (SOIC-8)
// Check longer suffixes before shorter ones (SU before U, SH before H)

Density Extraction

java
// Special case: 80 = 8Mbit, not 80Mbit
switch (densityCode) {
    case "80" -> "8";
    default -> densityCode;
}

Grade Extraction

java
// Check prefix to determine grade
if (upperMpn.startsWith("PY25Q")) return "Automotive";
if (upperMpn.startsWith("P25D")) return "Low Power";
if (upperMpn.startsWith("P25Q")) return "Standard";

Cross-References

Puya Flash is pin-compatible with other SPI NOR Flash manufacturers:

PuyaWinbondGigaDeviceMacronix
P25Q80HW25Q80GD25Q80MX25L8006E
P25Q16HW25Q16GD25Q16MX25L1606E
P25Q32HW25Q32GD25Q32MX25L3206E
P25Q64HW25Q64GD25Q64MX25L6406E
P25Q128HW25Q128GD25Q128MX25L12835F

Related Files

  • Handler: manufacturers/PuyaHandler.java
  • Component types: MEMORY, MEMORY_FLASH, IC

Learnings & Edge Cases

  • Density code 80: Represents 8 Mbit, not 80 Mbit - special handling required
  • PY vs P prefix: PY25Q is automotive grade, must check before P25Q pattern
  • Hyphenated suffixes: Some MPNs have package code after hyphen (P25Q16H-SSH)
  • Grade indicators: Trailing 'A' often indicates automotive grade
  • Pin compatibility: Puya Flash is generally pin-compatible with Winbond, GigaDevice, and Macronix equivalents
<!-- Add new learnings above this line -->