Skip to content

feat(pins): Pins IR + XDC emitter for nextpnr constraint generation #384

@gHashTag

Description

@gHashTag

Summary

Add Pins IR model and XDC constraint emitter in specs/pins/, replacing the hardcoded XDC in bootstrap/src/main.rs.

Deliverables

  • specs/pins/ir.t27 — IR model (PinLocation, IoStandard, SignalReference, Binding, Design, ClockDef) + conflict detection invariants
  • specs/pins/emitter_xdc.t27 — XDC generator with emit_pin, emit_clock, emit_header, qmtech_xc7a100t_minimal() preset
  • specs/pins/OWNERS.md — Domain ownership

Why

Board constraints are currently hardcoded in Rust (main.rs line ~3231). Moving to structured .t27 specs enables:

  1. Machine-validated pin assignments (no LOC conflicts, all clocks bound, no orphans)
  2. Board profile selection via --profile minimal / --profile full
  3. Future integration with t27c fpga-build to generate XDC from .t27 board specs

Key invariants

  • has_pin_conflict(design) — no two bindings share a package pin
  • has_port_conflict(design) — no two bindings share a port+index
  • all_clock_ports_bound(design) — every clock binding has a ClockDef

Related: #381 (board profiles), #383 (roadmap), #367 (FPGA pipeline)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions