From 8875176896b285e2ea8c67a6f72442fe1018e0fe Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Thu, 21 Mar 2024 15:00:06 +0100 Subject: [PATCH] check in old latest changes to MDC designs --- DBO/config.vhd | 4 ++-- DBO/mdctdc.lpf | 2 +- DBO/mdctdc.vhd | 19 +++++++++++++------ DBO/par.p2t | 2 +- OEP/config_compile_frankfurt.pl | 2 +- OEP/mdcoep.vhd | 30 ++++++++++++++++++------------ OEP/nodelist_frankfurt.txt | 7 +++++++ OEP/par.p2t | 2 +- pinout/oep.lpf | 2 +- 9 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 OEP/nodelist_frankfurt.txt diff --git a/DBO/config.vhd b/DBO/config.vhd index 82ea37a..53db3ca 100644 --- a/DBO/config.vhd +++ b/DBO/config.vhd @@ -20,8 +20,8 @@ package config is constant NUM_TDC_CHANNELS : integer range 1 to 65 := 33; -- number of tdc channels per module constant NUM_TDC_CHANNELS_POWER2 : integer range 0 to 6 := 5; --the nearest power of two, for convenience reasons - constant EVENT_BUFFER_SIZE : integer range 9 to 13 := 11; -- size of the event buffer, 2**N - constant EVENT_MAX_SIZE : integer := 400; --maximum event size. Must not exceed EVENT_BUFFER_SIZE/2 + constant EVENT_BUFFER_SIZE : integer range 9 to 13 := 12; -- size of the event buffer, 2**N + constant EVENT_MAX_SIZE : integer := 200; --maximum event size. Must not exceed EVENT_BUFFER_SIZE/2 --Use sync mode, RX clock for all parts of the FPGA diff --git a/DBO/mdctdc.lpf b/DBO/mdctdc.lpf index e5a15bb..bb2595b 100644 --- a/DBO/mdctdc.lpf +++ b/DBO/mdctdc.lpf @@ -18,7 +18,7 @@ MULTICYCLE TO CELL "THE_MEDIA_INTERFACE/THE_MED_CONTROL/THE_TX/STAT_REG_OUT*" 10 MULTICYCLE FROM ASIC THE_MEDIA_INTERFACE/gen_pcs0.THE_SERDES/serdes_sync_0_inst/DCU0_inst PIN SCIRDATA* 15 ns; REGION "MEDIA" "R57C34D" 13 30; -LOCATE UGROUP "THE_MEDIA_INTERFACE/media_interface_group" REGION "MEDIA" ; +#LOCATE UGROUP "THE_MEDIA_INTERFACE/media_interface_group" REGION "MEDIA" ; #REGION "RESTAREA" "R2C12D" 65 67; #UGROUP "REST" diff --git a/DBO/mdctdc.vhd b/DBO/mdctdc.vhd index 99f1c3e..67e668d 100644 --- a/DBO/mdctdc.vhd +++ b/DBO/mdctdc.vhd @@ -10,6 +10,7 @@ use work.trb_net_components.all; use work.trb3_components.all; use work.med_sync_define.all; + entity mdctdc is port( CLK : in std_logic; @@ -103,6 +104,11 @@ architecture arch of mdctdc is signal prepare_for_reload_i : std_logic; signal sd_txdis_i : std_logic; + signal dtrout : std_logic_vector(7 downto 0); + + + + begin --------------------------------------------------------------------------- @@ -135,7 +141,7 @@ reset_i <= reset_i_tmp when falling_edge(clk_sys); THE_MEDIA_INTERFACE : entity work.med_ecp5_sfp_sync generic map( - USE_NEW_ECP5_RESET => 0, + USE_NEW_ECP5_RESET => c_YES, SERDES_NUM => 0, IS_SYNC_SLAVE => c_YES ) @@ -325,10 +331,11 @@ GPIO(1) <= sd_txdis_i or prepare_for_reload_i; --------------------------------------------------------------------------- -- LED --------------------------------------------------------------------------- - LED(0) <= (med2int(0).stat_op(10) or med2int(0).stat_op(11)) and not led_off; - LED(1) <= med2int(0).stat_op(9) and not led_off; - LED(2) <= (LVDS(1) or LVDS(0) or dummy_i or FLASH_SELECT) and not led_off; - + LED(0) <= med2int(0).stat_op(15); --med2int(0).stat_op(9) and not led_off; --Link active + LED(2) <= reset_i; --(med2int(0).stat_op(10) or med2int(0).stat_op(11)) and not led_off; --TX/RX + LED(1) <= med2int(0).stat_op(13); -- (FLASH_SELECT) and not led_off; + IO(1) <= GPIO(0) when rising_edge(clk_sys); --LOS + IO(2) <= med2int(0).stat_op(4); --rx_allow -------------------------------------------------------------------------- -- Controls @@ -381,7 +388,7 @@ THE_SPI : entity work.pasttrec_spi SPI_RST_OUT => RSTN ); - + ------------------------------------------------------------------------------- -- No trigger/data endpoint included ------------------------------------------------------------------------------- diff --git a/DBO/par.p2t b/DBO/par.p2t index b4a1089..f559d83 100644 --- a/DBO/par.p2t +++ b/DBO/par.p2t @@ -4,7 +4,7 @@ #-m nodelist.txt # Controlled by the compile.pl script. #-n 1 # Controlled by the compile.pl script. -s 10 --t 2 +-t 18 -c 2 -e 2 -i 10 diff --git a/OEP/config_compile_frankfurt.pl b/OEP/config_compile_frankfurt.pl index de5e337..aa65869 100644 --- a/OEP/config_compile_frankfurt.pl +++ b/OEP/config_compile_frankfurt.pl @@ -6,7 +6,7 @@ Speedgrade => '8', TOPNAME => "mdcoep", lm_license_file_for_synplify => "27020\@jspc29", #"27000\@lxcad01.gsi.de"; -lm_license_file_for_par => "1702\@jspc29", +lm_license_file_for_par => "1710\@jspc29", #1702 lattice_path => '/d/jspc29/lattice/diamond/3.12', synplify_path => '/d/jspc29/lattice/synplify/S-2021.09-SP2/', diff --git a/OEP/mdcoep.vhd b/OEP/mdcoep.vhd index d6a14c6..0caf2e9 100644 --- a/OEP/mdcoep.vhd +++ b/OEP/mdcoep.vhd @@ -50,6 +50,7 @@ entity mdcoep is LED : out std_logic_vector(7 downto 0); --Other Connectors + LONG_SHORT : in std_logic; IO : inout std_logic_vector(8 downto 1) ); @@ -140,7 +141,7 @@ begin THE_MEDIA_INTERFACE : entity work.med_ecp5_sfp_sync_2 generic map( - USE_NEW_ECP5_RESET => 0, + USE_NEW_ECP5_RESET => c_NO, DUAL => 0, IS_SYNC_SLAVE => (c_YES,c_NO) ) @@ -180,7 +181,7 @@ begin --------------------------------------------------------------------------- THE_DOWN_INTERFACE_2 : entity work.med_ecp5_sfp_sync_2 generic map( - USE_NEW_ECP5_RESET => 0, + USE_NEW_ECP5_RESET => c_NO, DUAL => 1, IS_SYNC_SLAVE => (c_NO,c_NO) @@ -390,15 +391,20 @@ begin monitor_inputs_i <= (others => '0'); trigger_inputs_i <= (others => '0'); -IO(3) <= GPIO(1) when rising_edge(clk_sys); -IO(4) <= med_dataready_in(1); -IO(5) <= hub_stat_debug(8); -IO(6) <= GPIO(5) when rising_edge(clk_sys); -IO(7) <= med_dataready_in(3); -IO(8) <= hub_stat_debug(9); +-- IO(3) <= GPIO(1) when rising_edge(clk_sys); +-- IO(4) <= med_dataready_in(1); +-- IO(5) <= hub_stat_debug(8); +-- IO(6) <= GPIO(5) when rising_edge(clk_sys); +-- IO(7) <= med_dataready_in(3); +-- IO(8) <= hub_stat_debug(9); --IO(7) <= hub_stat_debug(8); --IO(8) <= hub_stat_debug(9); - +IO(3) <= int2med(0).dataready; +IO(4) <= med2int(0).stat_op(15); +IO(5) <= GPIO(1) when rising_edge(clk_sys); +IO(6) <= med2int(1).stat_op(4); +IO(7) <= med2int(0).dataready; +IO(8) <= med2int(0).stat_op(4); --------------------------------------------------------------------------- -- LED @@ -407,9 +413,9 @@ IO(8) <= hub_stat_debug(9); LED(1) <= med2int(0).stat_op(9) and not led_off; LED(2) <= FLASH_SELECT and not led_off; - LED(3) <= (med2int(1).stat_op(10) or med2int(1).stat_op(11)) and not led_off; - LED(4) <= (med2int(2).stat_op(10) or med2int(2).stat_op(11)) and not led_off; - LED(5) <= (med2int(3).stat_op(10) or med2int(3).stat_op(11)) and not led_off; + LED(3) <= (med2int(1).stat_op(10)) and not led_off; --only on RX + LED(4) <= (med2int(2).stat_op(10)) and not led_off; --only on RX + LED(5) <= (med2int(3).stat_op(10)) and not led_off; --only on RX diff --git a/OEP/nodelist_frankfurt.txt b/OEP/nodelist_frankfurt.txt new file mode 100644 index 0000000..8b55fff --- /dev/null +++ b/OEP/nodelist_frankfurt.txt @@ -0,0 +1,7 @@ +// nodes file for parallel place&route + +[jspc85] +SYSTEM = linux +CORENUM = 7 +ENV = /d/jspc29/lattice/312_settings.sh +WORKDIR = /d/jspc22/trb/git/mdcupgrade/OEP/workdir diff --git a/OEP/par.p2t b/OEP/par.p2t index f989847..a3b9c1d 100644 --- a/OEP/par.p2t +++ b/OEP/par.p2t @@ -4,7 +4,7 @@ #-m nodelist.txt # Controlled by the compile.pl script. #-n 1 # Controlled by the compile.pl script. -s 10 --t 6 +-t 30 -c 2 -e 2 -i 10 diff --git a/pinout/oep.lpf b/pinout/oep.lpf index ee7d3e2..53efcbd 100644 --- a/pinout/oep.lpf +++ b/pinout/oep.lpf @@ -2,7 +2,7 @@ COMMERCIAL ; BLOCK RESETPATHS ; BLOCK ASYNCPATHS ; -SYSCONFIG MCCLK_FREQ=38.8 CONFIG_IOVOLTAGE=2.5 ; #BACKGROUND_RECONFIG=ON +SYSCONFIG MCCLK_FREQ=38.8 CONFIG_IOVOLTAGE=2.5 BACKGROUND_RECONFIG=OFF ; FREQUENCY PORT CLK 200 MHz; BLOCK PATH TO PORT "LED*"; BLOCK PATH TO PORT "PROGRAMN"; -- 2.43.0