Skip to content

Defining IO parameters in the examples #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 117 additions & 66 deletions examples/primer20k.cst
Original file line number Diff line number Diff line change
@@ -1,92 +1,143 @@
IO_LOC "clk" IOT27A;
IO_LOC "key_i" T3;
IO_LOC "rst_i" T10;
IO_LOC "clk" H11;
IO_PORT "clk" IO_TYPE=LVCMOS33;
IO_LOC "key_i" T3;
IO_LOC "rst_i" T10;
IO_PORT "rst_i" IO_TYPE=LVCMOS33;

IO_LOC "clk_i" IOT27A;
IO_LOC "clk_i" IOT27A;

IO_LOC "led[0]" C13;
IO_LOC "led[1]" A13;
IO_LOC "led[2]" N16;
IO_LOC "led[3]" N14;
IO_LOC "led[4]" L14;
IO_LOC "led[5]" L16;
IO_LOC "led[0]" C13;
IO_PORT "led[0]" IO_TYPE=LVCMOS33;
IO_LOC "led[1]" A13;
IO_PORT "led[1]" IO_TYPE=LVCMOS33;
IO_LOC "led[2]" N16;
IO_PORT "led[2]" IO_TYPE=LVCMOS33;
IO_LOC "led[3]" N14;
IO_PORT "led[3]" IO_TYPE=LVCMOS33;
IO_LOC "led[4]" L14;
IO_PORT "led[4]" IO_TYPE=LVCMOS33;
IO_LOC "led[5]" L16;
IO_PORT "led[5]" IO_TYPE=LVCMOS33;

IO_LOC "TXD" A15;
IO_PORT "TXD" PULL_MODE=UP;
IO_LOC "RXD" D14;
IO_PORT "RXD" PULL_MODE=UP;
IO_LOC "TXD" A15;
IO_PORT "TXD" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "RXD" D14;
IO_PORT "RXD" IO_TYPE=LVCMOS33 PULL_MODE=UP;

// fake
IO_LOC "led[6]" A15;
IO_LOC "led[7]" D14;
IO_LOC "led[6]" A15;
IO_PORT "led[6]" IO_TYPE=LVCMOS33 PULL_MODE=NONE;
IO_LOC "led[7]" D14;
IO_PORT "led[7]" IO_TYPE=LVCMOS33 PULL_MODE=NONE;

IO_LOC "tlvds_p" P6;
IO_LOC "tlvds_n" T6;
IO_LOC "tlvds_p" P6;
IO_PORT "tlvds_p" IO_TYPE=LVDS25 PULL_MODE=NONE;
IO_LOC "tlvds_n" T6;
IO_PORT "tlvds_n" IO_TYPE=LVDS25 PULL_MODE=NONE;

IO_LOC "elvds_p" C12;
IO_LOC "elvds_n" B12;
IO_LOC "elvds_p" C12;
IO_PORT "elvds_p" IO_TYPE=LVDS25 PULL_MODE=NONE;
IO_LOC "elvds_n" B12;
IO_PORT "elvds_n" IO_TYPE=LVDS25 PULL_MODE=NONE;

IO_LOC "LED_R" C13;
IO_LOC "LED_G" A13;
IO_LOC "LED_B" N16;
IO_LOC "LED_R" C13;
IO_PORT "LED_R" IO_TYPE=LVCMOS33;
IO_LOC "LED_G" A13;
IO_PORT "LED_G" IO_TYPE=LVCMOS33;
IO_LOC "LED_B" N16;
IO_PORT "LED_B" IO_TYPE=LVCMOS33;

// oser
IO_LOC "oser_out" C13;
IO_LOC "fclk_o" N16;
IO_LOC "pclk_o" N14;
IO_LOC "oser_out" C13;
IO_PORT "oser_out" IO_TYPE=LVCMOS33;
IO_LOC "fclk_o" N16;
IO_PORT "fclk_o" IO_TYPE=LVCMOS33;
IO_LOC "pclk_o" N14;
IO_PORT "pclk_o" IO_TYPE=LVCMOS33;

// ides
IO_LOC "fclk_i" B13;
IO_LOC "data_i" C12;
IO_LOC "q_o[0]" P9;
IO_LOC "q_o[1]" E15;
IO_LOC "q_o[2]" T7;
IO_LOC "q_o[3]" R8;
IO_LOC "q_o[4]" T6;
IO_LOC "q_o[5]" P6;
IO_LOC "q_o[6]" T8;
IO_LOC "q_o[7]" P8;
IO_LOC "fclk_i" B13;
IO_PORT "fclk_i" IO_TYPE=LVCMOS33;
IO_LOC "data_i" C12;
IO_PORT "data_i" IO_TYPE=LVCMOS33;
IO_LOC "q_o[0]" P9;
IO_PORT "q_o[0]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[1]" E15;
IO_PORT "q_o[1]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[2]" T7;
IO_PORT "q_o[2]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[3]" R8;
IO_PORT "q_o[3]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[4]" T6;
IO_PORT "q_o[4]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[5]" P6;
IO_PORT "q_o[5]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[6]" T8;
IO_PORT "q_o[6]" IO_TYPE=LVCMOS33;
IO_LOC "q_o[7]" P8;
IO_PORT "q_o[7]" IO_TYPE=LVCMOS33;

// RGB LCD
IO_LOC "LCD_CLK" R9;
IO_LOC "LCD_HYNC" A15;
IO_LOC "LCD_SYNC" D14;
IO_LOC "LCD_DEN" E15;
IO_LOC "LCD_R[0]" L9;
IO_LOC "LCD_R[1]" N8;
IO_LOC "LCD_R[2]" N9;
IO_LOC "LCD_R[3]" N7;
IO_LOC "LCD_R[4]" N6;
// RGB LCD
IO_LOC "LCD_CLK" R9;
IO_PORT "LCD_CLK" IO_TYPE=LVCMOS33;
IO_LOC "LCD_HYNC" A15;
IO_PORT "LCD_HYNC" IO_TYPE=LVCMOS33;
IO_LOC "LCD_SYNC" D14;
IO_PORT "LCD_SYNC" IO_TYPE=LVCMOS33;
IO_LOC "LCD_DEN" E15;
IO_PORT "LCD_DEN" IO_TYPE=LVCMOS33;
IO_LOC "LCD_R[0]" L9;
IO_PORT "LCD_R[0]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_R[1]" N8;
IO_PORT "LCD_R[1]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_R[2]" N9;
IO_PORT "LCD_R[2]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_R[3]" N7;
IO_PORT "LCD_R[3]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_R[4]" N6;
IO_PORT "LCD_R[4]" IO_TYPE=LVCMOS33;

IO_LOC "LCD_G[0]" D11;
IO_LOC "LCD_G[1]" A11;
IO_LOC "LCD_G[2]" B11;
IO_LOC "LCD_G[3]" P7;
IO_LOC "LCD_G[4]" R7;
IO_LOC "LCD_G[5]" D10;
IO_LOC "LCD_G[0]" D11;
IO_PORT "LCD_G[0]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_G[1]" A11;
IO_PORT "LCD_G[1]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_G[2]" B11;
IO_PORT "LCD_G[2]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_G[3]" P7;
IO_PORT "LCD_G[3]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_G[4]" R7;
IO_PORT "LCD_G[4]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_G[5]" D10;
IO_PORT "LCD_G[5]" IO_TYPE=LVCMOS33;

IO_LOC "LCD_B[0]" B12;
IO_LOC "LCD_B[1]" C12;
IO_LOC "LCD_B[2]" B13;
IO_LOC "LCD_B[3]" A14;
IO_LOC "LCD_B[4]" B14;
IO_LOC "LCD_B[0]" B12;
IO_PORT "LCD_B[0]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_B[1]" C12;
IO_PORT "LCD_B[1]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_B[2]" B13;
IO_PORT "LCD_B[2]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_B[3]" A14;
IO_PORT "LCD_B[3]" IO_TYPE=LVCMOS33;
IO_LOC "LCD_B[4]" B14;
IO_PORT "LCD_B[4]" IO_TYPE=LVCMOS33;

// DVI
IO_LOC "tmds_clk_p" G16;
IO_LOC "tmds_clk_p" G16;
IO_PORT "tmds_clk_p" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_clk_n" H15;
IO_LOC "tmds_clk_n" H15;
IO_PORT "tmds_clk_n" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_p[0]" H14;
IO_LOC "tmds_d_p[0]" H14;
IO_PORT "tmds_d_p[0]" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_n[0]" H16;
IO_LOC "tmds_d_n[0]" H16;
IO_PORT "tmds_d_n[0]" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_p[1]" J15;
IO_LOC "tmds_d_p[1]" J15;
IO_PORT "tmds_d_p[1]" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_n[1]" K16;
IO_LOC "tmds_d_n[1]" K16;
IO_PORT "tmds_d_n[1]" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_p[2]" K14;
IO_LOC "tmds_d_p[2]" K14;
IO_PORT "tmds_d_p[2]" PULL_MODE=NONE DRIVE=3.5;
IO_LOC "tmds_d_n[2]" K15;
IO_LOC "tmds_d_n[2]" K15;
IO_PORT "tmds_d_n[2]" PULL_MODE=NONE DRIVE=3.5;

IO_LOC "div_led" C13;
IO_LOC "div_led" C13;
IO_PORT "div_led" IO_TYPE=LVCMOS33;
143 changes: 92 additions & 51 deletions examples/runber.cst
Original file line number Diff line number Diff line change
@@ -1,56 +1,97 @@
IO_LOC "clk" 4;
IO_LOC "clk_i" 4;
IO_LOC "rst_i" 58;
IO_LOC "key_i" 59;
IO_LOC "led[0]" 25;
IO_LOC "led[1]" 26;
IO_LOC "led[2]" 23;
IO_LOC "led[3]" 24;
IO_LOC "led[4]" 27;
IO_LOC "led[5]" 28;
IO_LOC "led[6]" 29;
IO_LOC "led[7]" 30;

IO_LOC "TXD" 39;
IO_PORT "TXD" PULL_MODE=UP;
IO_LOC "RXD" 40;
IO_PORT "RXD" PULL_MODE=UP;

IO_LOC "tlvds_p" 27;
IO_LOC "tlvds_n" 28;

IO_LOC "elvds_p" 40;
IO_LOC "elvds_n" 41;

IO_LOC "LED_R" 25;
IO_LOC "LED_G" 26;
IO_LOC "LED_B" 23;

IO_LOC "LCD_SYNC" 29;
IO_LOC "LCD_CLK" 44;
IO_LOC "clk" 4;
IO_PORT "clk" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "clk_i" 4;
IO_PORT "clk_i" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "rst_i" 58;
IO_PORT "rst_i" IO_TYPE=LVCMOS33 PULL_MODE=NONE;
IO_LOC "key_i" 59;
IO_PORT "key_i" IO_TYPE=LVCMOS33 PULL_MODE=NONE;
IO_LOC "led[0]" 25;
IO_PORT "led[0]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[1]" 26;
IO_PORT "led[1]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[2]" 23;
IO_PORT "led[2]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[3]" 24;
IO_PORT "led[3]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[4]" 27;
IO_PORT "led[4]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[5]" 28;
IO_PORT "led[5]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[6]" 29;
IO_PORT "led[6]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "led[7]" 30;
IO_PORT "led[7]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;

IO_LOC "TXD" 39;
IO_PORT "TXD" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "RXD" 40;
IO_PORT "RXD" IO_TYPE=LVCMOS33 PULL_MODE=UP;

IO_LOC "tlvds_p" 27;
IO_PORT "tlvds_p" IO_TYPE=LVDS25 PULL_MODE=NONE;
IO_LOC "tlvds_n" 28;
IO_PORT "tlvds_n" IO_TYPE=LVDS25 PULL_MODE=NONE;

IO_LOC "elvds_p" 40;
IO_PORT "elvds_p" IO_TYPE=LVDS25 PULL_MODE=NONE;
IO_LOC "elvds_n" 41;
IO_PORT "elvds_n" IO_TYPE=LVDS25 PULL_MODE=NONE;

IO_LOC "LED_R" 25;
IO_PORT "LED_R" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "LED_G" 26;
IO_PORT "LED_G" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "LED_B" 23;
IO_PORT "LED_B" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;

IO_LOC "LCD_SYNC" 29;
IO_PORT "LCD_SYNC" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "LCD_CLK" 44;
IO_PORT "LCD_CLK" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;

// oser
IO_LOC "oser_out" 25;
IO_LOC "io16" 25;
IO_LOC "pclk_o" 28;
IO_LOC "fclk_o" 29;
IO_LOC "oser_out" 25;
IO_PORT "oser_out" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "io16" 25;
IO_PORT "io16" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "pclk_o" 28;
IO_PORT "pclk_o" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "fclk_o" 29;
IO_PORT "fclk_o" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;

// ides
IO_LOC "fclk_i" 54;
IO_LOC "data_i" 30;
IO_LOC "q_o[0]" 38;
IO_LOC "q_o[1]" 39;
IO_LOC "q_o[2]" 40;
IO_LOC "q_o[3]" 27;
IO_LOC "q_o[4]" 23;
IO_LOC "q_o[5]" 43;
IO_LOC "q_o[6]" 42;
IO_LOC "q_o[7]" 41;

IO_LOC "PLL_0_CLKOUT" 38;
IO_LOC "PLL_0_CLKOUTD" 39;
IO_LOC "PLL_0_LOCK" 40;
IO_LOC "PLL_1_CLKOUT" 41;
IO_LOC "PLL_1_CLKOUTD" 42;
IO_LOC "PLL_1_LOCK" 43;
IO_LOC "fclk_i" 54;
IO_PORT "fclk_i" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "data_i" 30;
IO_PORT "data_i" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "q_o[0]" 38;
IO_PORT "q_o[0]" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "q_o[1]" 39;
IO_PORT "q_o[1]" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "q_o[2]" 40;
IO_PORT "q_o[2]" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "q_o[3]" 27;
IO_PORT "q_o[3]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "q_o[4]" 23;
IO_PORT "q_o[4]" IO_TYPE=LVCMOS33 PULL_MODE=DOWN;
IO_LOC "q_o[5]" 43;
IO_PORT "q_o[5]" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "q_o[6]" 42;
IO_PORT "q_o[6]" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "q_o[7]" 41;
IO_PORT "q_o[7]" IO_TYPE=LVCMOS33 PULL_MODE=UP;

IO_LOC "PLL_0_CLKOUT" 38;
IO_PORT "PLL_0_CLKOUT" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "PLL_0_CLKOUTD" 39;
IO_PORT "PLL_0_CLKOUTD" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "PLL_0_LOCK" 40;
IO_PORT "PLL_0_LOCK" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "PLL_1_CLKOUT" 41;
IO_PORT "PLL_1_CLKOUT" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "PLL_1_CLKOUTD" 42;
IO_PORT "PLL_1_CLKOUTD" IO_TYPE=LVCMOS33 PULL_MODE=UP;
IO_LOC "PLL_1_LOCK" 43;
IO_PORT "PLL_1_LOCK" IO_TYPE=LVCMOS33 PULL_MODE=UP;

Loading
Loading