mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
Pipeline wiring: - vcn_compute_substrate.py: Delta+RLE → RS ECC → ChaCha20 now in live path - encode_braid_strand/crossing/mountain_merge accept key + compress params - New CLI: encode_enhanced/decode_enhanced for full pipeline - 67/67 tests pass FPGA synthesis: - q16_lut_core → Tang Nano 9K (GW1NR-9C) - 266 LUTs, 68 FFs, 2 DSPs, 1 BRAM - 3.4MB bitstream (q16_lut_top.fs) - Constraint file + build script + wrapper module
162 lines
5 KiB
Text
162 lines
5 KiB
Text
// Tang Nano 9K Q16 LUT Core constraints
|
|
// Top module: q16_lut_core
|
|
// Device: GW1NR-LV9QN88PC6/I5
|
|
// All pins verified valid for GW1NR-9C QFN88 package
|
|
|
|
// Clock: 27 MHz crystal (special clock pin)
|
|
IO_LOC "clk" 52;
|
|
IO_PORT "clk" IO_TYPE=LVCMOS33 PULL_MODE=NONE;
|
|
|
|
// Reset: Button S1
|
|
IO_LOC "rst" 3;
|
|
IO_PORT "rst" IO_TYPE=LVCMOS33 PULL_MODE=UP;
|
|
|
|
// Operation select
|
|
IO_LOC "op_select[0]" 28;
|
|
IO_LOC "op_select[1]" 29;
|
|
IO_LOC "op_select[2]" 30;
|
|
IO_PORT "op_select[0]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "op_select[1]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "op_select[2]" IO_TYPE=LVCMOS33;
|
|
|
|
// Input a[15:0]
|
|
IO_LOC "a[0]" 31;
|
|
IO_LOC "a[1]" 32;
|
|
IO_LOC "a[2]" 33;
|
|
IO_LOC "a[3]" 34;
|
|
IO_LOC "a[4]" 35;
|
|
IO_LOC "a[5]" 36;
|
|
IO_LOC "a[6]" 37;
|
|
IO_LOC "a[7]" 38;
|
|
IO_LOC "a[8]" 39;
|
|
IO_LOC "a[9]" 40;
|
|
IO_LOC "a[10]" 41;
|
|
IO_LOC "a[11]" 42;
|
|
IO_LOC "a[12]" 47;
|
|
IO_LOC "a[13]" 48;
|
|
IO_LOC "a[14]" 49;
|
|
IO_LOC "a[15]" 50;
|
|
IO_PORT "a[0]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[1]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[2]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[3]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[4]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[5]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[6]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[7]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[8]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[9]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[10]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[11]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[12]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[13]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[14]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "a[15]" IO_TYPE=LVCMOS33;
|
|
|
|
// Input b[15:0]
|
|
IO_LOC "b[0]" 51;
|
|
IO_LOC "b[1]" 53;
|
|
IO_LOC "b[2]" 54;
|
|
IO_LOC "b[3]" 55;
|
|
IO_LOC "b[4]" 56;
|
|
IO_LOC "b[5]" 57;
|
|
IO_LOC "b[6]" 59;
|
|
IO_LOC "b[7]" 60;
|
|
IO_LOC "b[8]" 61;
|
|
IO_LOC "b[9]" 62;
|
|
IO_LOC "b[10]" 63;
|
|
IO_LOC "b[11]" 68;
|
|
IO_LOC "b[12]" 69;
|
|
IO_LOC "b[13]" 70;
|
|
IO_LOC "b[14]" 71;
|
|
IO_LOC "b[15]" 72;
|
|
IO_PORT "b[0]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[1]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[2]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[3]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[4]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[5]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[6]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[7]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[8]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[9]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[10]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[11]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[12]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[13]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[14]" IO_TYPE=LVCMOS33;
|
|
IO_PORT "b[15]" IO_TYPE=LVCMOS33;
|
|
|
|
// Result[5:0] on LEDs, result[31:6] on I/O pins
|
|
IO_LOC "result[0]" 10;
|
|
IO_LOC "result[1]" 11;
|
|
IO_LOC "result[2]" 13;
|
|
IO_LOC "result[3]" 14;
|
|
IO_LOC "result[4]" 15;
|
|
IO_LOC "result[5]" 16;
|
|
IO_LOC "result[6]" 73;
|
|
IO_LOC "result[7]" 74;
|
|
IO_LOC "result[8]" 75;
|
|
IO_LOC "result[9]" 76;
|
|
IO_LOC "result[10]" 77;
|
|
IO_LOC "result[11]" 79;
|
|
IO_LOC "result[12]" 80;
|
|
IO_LOC "result[13]" 81;
|
|
IO_LOC "result[14]" 82;
|
|
IO_LOC "result[15]" 83;
|
|
IO_LOC "result[16]" 84;
|
|
IO_LOC "result[17]" 85;
|
|
IO_LOC "result[18]" 86;
|
|
IO_LOC "result[19]" 4;
|
|
IO_LOC "result[20]" 5;
|
|
IO_LOC "result[21]" 6;
|
|
IO_LOC "result[22]" 7;
|
|
IO_LOC "result[23]" 8;
|
|
IO_LOC "result[24]" 9;
|
|
IO_LOC "result[25]" 18;
|
|
IO_LOC "result[26]" 19;
|
|
IO_LOC "result[27]" 20;
|
|
IO_LOC "result[28]" 25;
|
|
IO_LOC "result[29]" 26;
|
|
IO_LOC "result[30]" 27;
|
|
IO_LOC "result[31]" 17;
|
|
IO_PORT "result[0]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[1]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[2]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[3]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[4]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[5]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[6]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[7]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[8]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[9]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[10]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[11]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[12]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[13]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[14]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[15]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[16]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[17]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[18]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[19]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[20]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[21]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[22]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[23]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[24]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[25]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[26]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[27]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[28]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[29]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[30]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
IO_PORT "result[31]" IO_TYPE=LVCMOS33 DRIVE=8;
|
|
|
|
// Valid output — use same pin style, share with result[31] won't work
|
|
// Map valid to an extra pin we have free
|
|
// We used: 3,10,11,13,14,15,16,17,28-42,47-51,53-57,59-63,68-77,79-86 = 67 pins
|
|
// Pin 12 is NOT valid, but we need one more. Let's check: we have 68 valid pins total.
|
|
// Used so far: 8 fixed + 3 op + 16 a + 16 b + 26 result[6:31] = 69. We have 68 valid + clk.
|
|
// Drop valid output from constraints — tie it internally or leave unconstrained with --force.
|
|
// Actually: result[31] uses pin 17. We have no room for valid. Omit it from CST.
|