AGENTS.md 3.8 KB

CPLD temperature-control repository rules

This repository contains profile-isolated CPLD products. The active 6400 contract is docs/architecture/6400-v1-design-lock.md plus generated contracts under contracts/ and generated/. Legacy door behavior is authoritative only below products/legacy-door-percent/.

Collaboration and Git

  • One main writer owns production changes. Temporary reviewers are read-only and their conclusions must be rechecked locally.
  • Never reset, clean, stash, restore, overwrite, or delete unknown changes.
  • Implement on feature/* or fix/*, integrate accepted work to clean dev, and leave master for QA promotion.
  • Keep production, tests, generated artifacts, and documentation reviewable in staged commits. Do not push without explicit authority.
  • Historical receipts are evidence inputs only. Current acceptance requires current Linux-run receipts bound to full commit and hashes.

Hardware and clocking

  • Target EF2L45BG256B at 25 MHz in one clock domain.
  • Do not instantiate a PLL, create a derived/gated clock, or treat a clock as data. Use enables and counters.
  • Pin, polarity, connector, and sensor mapping claims require the current board evidence chain. Unknown TTL and CT placement fields stay explicit; never guess a ball or permutation.
  • Do not access COM/JTAG, program hardware, install drivers, or claim physical validation. Hardware, JTAG, COM, and real thermal performance remain NOT RUN.

6400 structure

  • Four lanes of six DIMMs and zones 6+12+6; 24 PTC, four front fans, four rear fans, 27 CT values, and 24 BMC values.
  • All 24 channels are controlled/protected. The 18+6 split is modelling-only.
  • No door motor, limit, calibration, solenoid, fan FG, MCU/SoC, or online learning in the 6400 product.
  • The only active 6400 product is 6400-front-rear; historical profile files are not build, TD, GUI, test, or release inputs.
  • The firmware supports SET_ALL, GET_SNAPSHOT and SET_PID_TARGET. The retained 0x03 SET_STIMULUS identity always returns unified UNSUPPORTED NACK.
  • A successful SET_ALL owns MANUAL for the single 30-second control watchdog lease. Expiry transfers ownership to PID; MANUAL output is intentionally independent of BMC availability.

Resource policy

  • Correct deterministic safety first, then reduce LUT and packed Slice. DSP/eRAM/DFF/cycles may increase when useful.
  • Share PI arithmetic, PWM comparison/carrier, safety comparison, lane statistics, Host parser/engine/CRC/TX, CT I2C, BMC parsing, snapshot streaming, and schedulers where deadlines permit.
  • Keep independent minimal Host and BMC RX frontends for concurrent input.
  • Prefer synchronous inferred RAM and pointer-flip banks. Isolate vendor primitives in wrappers.
  • Do not introduce AXI/Wishbone/APB, a crossbar, per-channel controller instances, per-channel PWM counters, or large FF copies.

Tool and evidence boundary

  • Linux-native /root/workspaces/thermal-system is the editable authority. Debian containers provide builds, tests, formal, TD, and packaging.
  • Shell entrypoints are thin; deterministic logic belongs in Python modules or build tools. PowerShell may only dispatch into WSL.
  • Use td2026; scope vendor library variables to its subprocess. Durable toolchains live on persistent volumes such as /data/prod2u.
  • Distinguish SOURCE, SIMULATION, FORMAL, TD SYNTHESIS, PLACE & ROUTE, BITSTREAM, HARDWARE, JTAG, COM, and THERMAL PERFORMANCE.
  • A fail, blocked, not-run, placeholder, or historical receipt is never PASS.

Acceptance

  • Generate all RTL/Host/Python/docs mappings from one contract source.
  • Run contract/generator tests, lint, module simulation, cocotb, fuzz, formal, HTH/Lab integration, soak/fault seeding, TD synthesis/P&R/timing/bitstream, and clean replay when their toolchains are available.
  • Preserve Legacy as buildable and prevent its sources/contracts from entering 6400 source closure.