STEP 1713 · Template #1 差動 Manchester 2026-09-03

差動 Manchester を3 つ目の template として追加

chat-Claude 2026-08-30 arc の「差動 Manchester #1 candidate」を land。MIL-STD-1553 系列の differential Manchester coding を FPGA template として spec 化。5 軸 schema (STEP 1570) の非重複 point 3 例目 + Encoding 型に 'differential-manchester' の additive extension。

関連 STEP 1570 / 1574 / 1578 / 1713 MODULE_VERSION 2.0.0 → 2.1.0 Test 61/61 + regression 153/153 clean

3 template で 5 軸 schema を validate

Non-overlapping design points
Template #0 · STEP 1570

radio-clock (JJY)

radio-clock-jjy
encoding
pulse-width
clock
self-plus-sync
power
inductive
lines
single × 1
physical
custom (antenna)
Template #1 · STEP 1713 (new)

差動 Manchester

differential-manchester-pair
encoding
differential-manchester ★
clock
embedded
power
none
lines
differential-pair × 1 ★
physical
custom (twist-pair)
Template #2 · STEP 1578

非接触コイル

inductive-coil-pair
encoding
manchester
clock
embedded
power
inductive
lines
single × 1
physical
coil-pair

3 template で encoding (pulse-width / differential-manchester / manchester) が全て異なり、power (inductive / none / inductive-coupling)、lines (single / differential-pair / single)、physical (custom antenna / custom twist-pair / coil-pair) の複数軸で非重複。5 軸 schema (STEP 1570) が 3 データポイントで overparameterize せず、それぞれ違う design point を占めることを実証しました。

差動 Manchester encoding の仕組み

Bit-level rule

Bit 中央 = 常に transition (self-clocking)。開始 edge の有無で値が決まる。

'0' = 開始 edge あり(polarity 反転)/'1' = 開始 edge なし(polarity 保持)。

1 0 1 1 0 1 bit start mid (always ⇅) bit start ⇅ no start edge = '1'
  • bit 中央 の transition は 全 bit で 常にある = clock 復元 に 使える (self-clocking)。
  • bit 開始 edge の 有無 が data — polarity 反転 immune (差動 pair + / − を swap しても復号可能)。
  • Manchester (Template #2) との違い: Manchester は「開始 low + mid up = 1 / 開始 high + mid down = 0」で polarity absolute。差動 Manchester は relative。
  • MIL-STD-1553 の 3-bit sync は Manchester code violation (bit 中央 transition なし) で frame 境界を明示。

Spec 全 field (ConnectorSpec)

DIFFERENTIAL_MANCHESTER_SPEC
iddifferential-manchester-pair
name差動 Manchester (differential-manchester pair, MIL-STD-1553 系列)
roles['receiver', 'decoder', 'output'] — embedded clock なので oscillator/arbiter 不要 (最小 point-to-point)
lines{ kind: 'differential-pair', pairs: 1 } — 2 wire twisted pair
encoding'differential-manchester' ★ STEP 1713 で Encoding 型に additive 追加
clock'embedded' — Manchester bit-中央 transition から復元
power'none' — bus 非給電 (別電源前提)
physical'custom' — twisted pair (標準 PMOD では収まらない)
frame20 bit word (sync 3 + payload 16 + odd parity 1)、sync は Manchester code violation
verificationmaxThroughputBps: 1,000,000 (1 Mbps MIL-STD-1553B) / allowedErrorRate: 0.0001 / driftPpmTolerance: 500
targetestimatedLUT: 700 / clockDomains: 2 (TX + RX PLL) / boards: tang-nano-9k + tang-console-neo
version'0.1.0' / lastUpdateStep: 1713

使い方

Import + HDL gen
import {
  DIFFERENTIAL_MANCHESTER_SPEC,
  templateRegistry,
  generateArtifacts,
} from './fpga/connector-generator/index.js';

// Spec 取得
const spec = templateRegistry.get('differential-manchester-pair');
console.log(spec.roles);          // ['receiver', 'decoder', 'output']
console.log(spec.encoding);       // 'differential-manchester'
console.log(templateRegistry.size()); // 3 (STEP 1713 で 2 → 3)

// HDL skeleton 生成 (Verilog + .cst + testbench)
const arts = generateArtifacts(DIFFERENTIAL_MANCHESTER_SPEC, 'tang-nano-9k');
// arts.verilog / arts.cst / arts.testbench = 空箱、
// 実 logic (Manchester encoder + PLL + parity check) は 手書き必須

Honest scope

主張しないこと
  1. MIL-STD-1553 clone を主張しない。 本 template は「MIL-STD-1553 が使う differential Manchester coding の教育用 skeleton」であって、完全 MIL-STD-1553 準拠 (transformer coupling + ±6V differential + Manchester bus protocol 3-role arbitration) ではない。avionics grade rugged 用途には追加 hardening (transformer isolation + surge protection + 温度 spec 拡大 + redundant bus) が別 STEP で必要。
  2. HDL 生成器は skeleton まで。 STEP 1574 の generator は Verilog + .cst + testbench の「空箱」を出すだけ。differential Manchester encoder (bit-中央 transition + 開始 edge conditional) / PLL clock recovery / 3-bit sync detector (code violation) / odd parity checker の実 logic は手書き必須。
  3. 実機動作は未検証。 Tang Nano 9K の LVDS pin (L11/L12 等) は data sheet 上使用可能で、27 MHz base clock から 1 MHz bit rate 生成 (27 分周) は整数分周で ok。しかし Phase C 実機 spike (実際に Tang Nano 9K に load して波形観測) は別 STEP で藤本さん手元動作待ち。
  4. roles に arbiter を含めない。 real MIL-STD-1553 は bus controller (BC) + remote terminal (RT) + bus monitor (BM) の 3-role arbitration があるが、本 template は最小 point-to-point で scope 絞る。multi-drop bus + arbitration は別 template candidate (Template #3+ scope)。
  5. Encoding 型の additive extension が backward-compat の実演。 'differential-manchester' を union 型に追加したのみ、既存の 4 encoding (nrz / manchester / pulse-width / differential) は unchanged。DESIGN_AXES.encoding.length assertion を持つ既存 test (step1570) は「>= 4」に widen で対応 (v2 セマンティクス遵守)。
  6. estimated LUT 700 は概算。 radio-clock (~400) / inductive-coil (~500) より大きい理由は PLL + parity checker 分。 実 LUT 使用量は Gowin EDA synthesize で判明 (Phase C 別 STEP)。