Skip to content

Commit

Permalink
pexarria10: change top design (PSRAM)
Browse files Browse the repository at this point in the history
  • Loading branch information
alyxazon committed May 8, 2024
1 parent 86a6b4b commit 8ca7ace
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 20 deletions.
88 changes: 88 additions & 0 deletions syn/gsi_pexarria10/control/pexarria10.qsf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
61 changes: 41 additions & 20 deletions top/gsi_pexarria10/control/pexarria10.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8ca7ace

Please sign in to comment.