Research-Stack/4-Infrastructure/hardware/metamanifold_prover_minimal.cst
2026-05-05 21:09:48 -05:00

150 lines
3.9 KiB
Text

// Constraint file for Minimal Meta-Manifold Prover on Gowin GW1NR-9 / Tang Nano 9K
// Clock
IO_LOC "clk" 52;
IO_PORT "clk" IO_TYPE=LVCMOS33 PULL_MODE=NONE;
// Reset (active low, button)
IO_LOC "rst_n" 4;
IO_PORT "rst_n" IO_TYPE=LVCMOS33 PULL_MODE=UP;
// Control signals
IO_LOC "start" 3;
IO_PORT "start" IO_TYPE=LVCMOS33 PULL_MODE=UP;
// Status LEDs
IO_LOC "busy" 10;
IO_PORT "busy" IO_TYPE=LVCMOS33;
IO_LOC "done" 11;
IO_PORT "done" IO_TYPE=LVCMOS33;
// Operation select
IO_LOC "op_select[0]" 13;
IO_LOC "op_select[1]" 14;
IO_LOC "op_select[2]" 15;
IO_PORT "op_select[0]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_PORT "op_select[1]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_PORT "op_select[2]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
// Mass Number gate inputs (8 bits each)
IO_LOC "admissible[0]" 16;
IO_LOC "admissible[1]" 17;
IO_LOC "admissible[2]" 18;
IO_LOC "admissible[3]" 19;
IO_LOC "admissible[4]" 20;
IO_LOC "admissible[5]" 21;
IO_LOC "admissible[6]" 22;
IO_LOC "admissible[7]" 23;
IO_PORT "admissible" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "residual[0]" 24;
IO_LOC "residual[1]" 25;
IO_LOC "residual[2]" 26;
IO_LOC "residual[3]" 27;
IO_LOC "residual[4]" 28;
IO_LOC "residual[5]" 29;
IO_LOC "residual[6]" 30;
IO_LOC "residual[7]" 31;
IO_PORT "residual" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "threshold[0]" 32;
IO_LOC "threshold[1]" 33;
IO_LOC "threshold[2]" 34;
IO_LOC "threshold[3]" 35;
IO_LOC "threshold[4]" 36;
IO_LOC "threshold[5]" 37;
IO_LOC "threshold[6]" 38;
IO_LOC "threshold[7]" 39;
IO_PORT "threshold" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
// Mass Number gate output
IO_LOC "mass_le_result" 40;
IO_PORT "mass_le_result" IO_TYPE=LVCMOS33;
// Torus coordinates (8 bits each)
IO_LOC "coord1[0]" 41;
IO_LOC "coord1[1]" 42;
IO_LOC "coord1[2]" 43;
IO_LOC "coord1[3]" 44;
IO_LOC "coord1[4]" 45;
IO_LOC "coord1[5]" 46;
IO_LOC "coord1[6]" 47;
IO_LOC "coord1[7]" 48;
IO_PORT "coord1" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "coord2[0]" 49;
IO_LOC "coord2[1]" 50;
IO_LOC "coord2[2]" 51;
IO_LOC "coord2[3]" 52;
IO_LOC "coord2[4]" 53;
IO_LOC "coord2[5]" 54;
IO_LOC "coord2[6]" 55;
IO_LOC "coord2[7]" 56;
IO_PORT "coord2" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
// Torus distance output
IO_LOC "torus_distance[0]" 57;
IO_LOC "torus_distance[1]" 58;
IO_LOC "torus_distance[2]" 59;
IO_LOC "torus_distance[3]" 60;
IO_LOC "torus_distance[4]" 61;
IO_LOC "torus_distance[5]" 62;
IO_LOC "torus_distance[6]" 63;
IO_LOC "torus_distance[7]" 64;
IO_LOC "torus_distance[8]" 65;
IO_LOC "torus_distance[9]" 65;
IO_LOC "torus_distance[10]" 66;
IO_LOC "torus_distance[11]" 67;
IO_PORT "torus_distance" IO_TYPE=LVCMOS33;
// Fold energy inputs (8 bits each)
IO_LOC "torus_energy[0]" 68;
IO_LOC "torus_energy[1]" 69;
IO_LOC "torus_energy[2]" 70;
IO_LOC "torus_energy[3]" 71;
IO_LOC "torus_energy[4]" 72;
IO_LOC "torus_energy[5]" 73;
IO_LOC "torus_energy[6]" 74;
IO_LOC "torus_energy[7]" 75;
IO_PORT "torus_energy" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "menger_energy[0]" 76;
IO_LOC "menger_energy[1]" 77;
IO_LOC "menger_energy[2]" 78;
IO_LOC "menger_energy[3]" 79;
IO_LOC "menger_energy[4]" 80;
IO_LOC "menger_energy[5]" 81;
IO_LOC "menger_energy[6]" 82;
IO_LOC "menger_energy[7]" 83;
IO_PORT "menger_energy" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "alpha[0]" 84;
IO_LOC "alpha[1]" 85;
IO_LOC "alpha[2]" 86;
IO_LOC "alpha[3]" 87;
IO_LOC "alpha[4]" 88;
IO_LOC "alpha[5]" 89;
IO_LOC "alpha[6]" 90;
IO_LOC "alpha[7]" 91;
IO_PORT "alpha" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "beta[0]" 92;
IO_LOC "beta[1]" 93;
IO_LOC "beta[2]" 94;
IO_LOC "beta[3]" 95;
IO_LOC "beta[4]" 96;
IO_LOC "beta[5]" 97;
IO_LOC "beta[6]" 98;
IO_LOC "beta[7]" 99;
IO_PORT "beta" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
// Fold energy output
IO_LOC "fold_energy_total[0]" 100;
IO_LOC "fold_energy_total[1]" 101;
IO_LOC "fold_energy_total[2]" 102;
IO_LOC "fold_energy_total[3]" 103;
IO_LOC "fold_energy_total[4]" 104;
IO_LOC "fold_energy_total[5]" 105;
IO_LOC "fold_energy_total[6]" 106;
IO_LOC "fold_energy_total[7]" 107;
IO_PORT "fold_energy_total" IO_TYPE=LVCMOS33;