From 8ca7ace4094a360b34553d37241dafe06e583072 Mon Sep 17 00:00:00 2001 From: "A. Hahn" Date: Wed, 8 May 2024 10:58:56 +0200 Subject: [PATCH] pexarria10: change top design (PSRAM) --- syn/gsi_pexarria10/control/pexarria10.qsf | 88 +++++++++++++++++++++++ top/gsi_pexarria10/control/pexarria10.vhd | 61 ++++++++++------ 2 files changed, 129 insertions(+), 20 deletions(-) diff --git a/syn/gsi_pexarria10/control/pexarria10.qsf b/syn/gsi_pexarria10/control/pexarria10.qsf index b9ffc5b64..7ec39615a 100644 --- a/syn/gsi_pexarria10/control/pexarria10.qsf +++ b/syn/gsi_pexarria10/control/pexarria10.qsf @@ -1021,6 +1021,94 @@ set_instance_assignment -name MAX_FANOUT 64 -to "monster:main|eca_wb_event:ecawb set_instance_assignment -name MAX_FANOUT 64 -to "monster:main|ftm_lm32_cluster:lm32*" set_instance_assignment -name MAX_FANOUT 64 -to "monster:main|wr_eca:eca" set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top +set_instance_assignment -name SLEW_RATE 1 -to psram_a[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[10] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[11] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[12] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[13] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[14] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[15] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[16] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[17] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[18] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[19] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[20] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[21] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[22] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[23] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[4] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[5] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[6] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[7] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[8] +set_instance_assignment -name SLEW_RATE 1 -to psram_a[9] +set_instance_assignment -name SLEW_RATE 1 -to psram_advn[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_advn[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_advn[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_advn[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_cen[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_cen[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_cen[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_cen[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_clk +set_instance_assignment -name SLEW_RATE 1 -to psram_cre[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_cre[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_cre[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_cre[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[10] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[11] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[12] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[13] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[14] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[15] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[4] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[5] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[6] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[7] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[8] +set_instance_assignment -name SLEW_RATE 1 -to psram_dq[9] +set_instance_assignment -name SLEW_RATE 1 -to psram_lbn[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_lbn[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_lbn[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_lbn[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_oen[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_oen[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_oen[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_oen[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_ubn[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_ubn[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_ubn[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_ubn[3] +set_instance_assignment -name SLEW_RATE 1 -to psram_wen[0] +set_instance_assignment -name SLEW_RATE 1 -to psram_wen[1] +set_instance_assignment -name SLEW_RATE 1 -to psram_wen[2] +set_instance_assignment -name SLEW_RATE 1 -to psram_wen[3] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[0] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[1] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[2] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[3] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[4] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[5] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[6] +set_instance_assignment -name SLEW_RATE 1 -to usb_fd_io[7] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[0] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[1] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[2] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[3] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[4] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[5] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[6] +set_instance_assignment -name SLEW_RATE 1 -to usb_pa_io[7] +set_instance_assignment -name SLEW_RATE 1 -to usb_slrd_o +set_instance_assignment -name SLEW_RATE 1 -to usb_slwr_o +set_instance_assignment -name SLEW_RATE 1 -to usb_ures_o set_instance_assignment -name XCVR_VCCR_VCCT_VOLTAGE 1_0V -to sfp_rxp_i set_instance_assignment -name XCVR_VCCR_VCCT_VOLTAGE 1_0V -to "sfp_rxp_i(n)" set_instance_assignment -name XCVR_VCCR_VCCT_VOLTAGE 1_0V -to sfp_txp_o diff --git a/top/gsi_pexarria10/control/pexarria10.vhd b/top/gsi_pexarria10/control/pexarria10.vhd index 9c9e4c545..a6e68c49a 100644 --- a/top/gsi_pexarria10/control/pexarria10.vhd +++ b/top/gsi_pexarria10/control/pexarria10.vhd @@ -7,6 +7,10 @@ use work.monster_pkg.all; use work.ramsize_pkg.c_lm32_ramsizes; entity pexarria10 is + generic( + g_quad_mode_psram : boolean := false; -- True: Connect all PSRAMs; False: connect only $g_default_psram PSRAM + g_default_psram : natural := 0 -- Possible values: 0, 1, 2, 3 + ); port( ------------------------------------------------------------------------ -- Input clocks @@ -342,26 +346,43 @@ begin ps_advn => s_psram_advn, ps_wait => s_psram_wait_or); - -- PSRAM test connection, add selector later (psram0/1/2/3) - --s_psram_wait_or <= psram_wait(0) or psram_wait(1) or psram_wait(2) or psram_wait(3); - s_psram_wait_or <= psram_wait(0); - psram_advn(0) <= s_psram_advn; - psram_cre(0) <= s_psram_cre; - psram_cen(0) <= s_psram_cen; - psram_oen(0) <= s_psram_oen; - psram_ubn(0) <= s_psram_ubn; - psram_wen(0) <= s_psram_wen; - psram_lbn(0) <= s_psram_lbn; - - psram_disconnect : for i in 1 to 3 generate - psram_advn(i) <= '0'; - psram_cre(i) <= '0'; - psram_cen(i) <= '1'; - psram_oen(i) <= '1'; - psram_ubn(i) <= '0'; - psram_wen(i) <= '1'; - psram_lbn(i) <= '0'; - end generate; + -- Use only one PSRAM (TBD: Multichip support) + psram_single : if not(g_quad_mode_psram) generate + psram_gen : for i in 0 to 3 generate + psram_enable : if (g_default_psram = i) generate + s_psram_wait_or <= psram_wait(i); + psram_advn(i) <= s_psram_advn; + psram_cre(i) <= s_psram_cre; + psram_cen(i) <= s_psram_cen; + psram_oen(i) <= s_psram_oen; + psram_ubn(i) <= s_psram_ubn; + psram_wen(i) <= s_psram_wen; + psram_lbn(i) <= s_psram_lbn; + end generate; -- psram_enable + psram_disable : if not(g_default_psram = i) generate + psram_advn(i) <= '0'; + psram_cre(i) <= '0'; + psram_cen(i) <= '1'; + psram_oen(i) <= '1'; + psram_ubn(i) <= '0'; + psram_wen(i) <= '1'; + psram_lbn(i) <= '0'; + end generate; -- psram_disable + end generate; -- psram_gen + end generate; -- psram_single + + psram_quad : if (g_quad_mode_psram) generate + s_psram_wait_or <= psram_wait(0) or psram_wait(1) or psram_wait(2) or psram_wait(3); + psram_quad_gen : for i in 0 to 3 generate + psram_advn(i) <= s_psram_advn; + psram_cre(i) <= s_psram_cre; + psram_cen(i) <= s_psram_cen; + psram_oen(i) <= s_psram_oen; + psram_ubn(i) <= s_psram_ubn; + psram_wen(i) <= s_psram_wen; + psram_lbn(i) <= s_psram_lbn; + end generate; -- psram_quad_gen + end generate; -- psram_quad -- LEDs wr_leds_o(0) <= not (s_led_link_act and s_led_link_up); -- red = traffic/no-link