From f221685396d36caa9f5d53c01f40af73b945640a Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Tue, 13 Apr 2021 23:52:57 +0100 Subject: [PATCH 01/16] Changes for DCARD_MONITOR+CONTROL * Change polarity of CLK_OUT RE#/DE control signal * Always tri-state B_IN for new DCARD mode * MUX on sniffer CLK_IN between CLK_IN and CLK_OUT xcvr --- .../PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 4 ++-- targets/PandABox/hdl/encoders.vhd | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index 37c7d81cd..5de84fe86 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -77,13 +77,13 @@ begin end case; end OUTENC_CONV; -function CONV_PADS(INENC, OUTENC : std_logic_vector) return std_logic_vector is +function CONV_PADS(INENC, OUTENC, DCARD_MODE : std_logic_vector) return std_logic_vector is variable enc_ctrl_pad : std_logic_vector(11 downto 0); begin enc_ctrl_pad(1 downto 0) := INENC(1 downto 0); enc_ctrl_pad(3 downto 2) := OUTENC(1 downto 0); - enc_ctrl_pad(4) := INENC(2); + enc_ctrl_pad(4) := not INENC(2) when DCARD_MODE(3 downto 1) = DCARD_MON+CTRL else INENC(2); enc_ctrl_pad(5) := OUTENC(2); enc_ctrl_pad(7 downto 6) := INENC(4 downto 3); enc_ctrl_pad(9 downto 8) := OUTENC(4 downto 3); diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 496a50e7f..4c6771aad 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -127,7 +127,9 @@ signal CLK_OUT : std_logic; signal CLK_IN : std_logic; -signal Bs0_t : std_logic; +signal Bs0_T, Bm0_T : std_logic; + +signal SnffrClk : std_logic; begin @@ -302,7 +304,7 @@ port map ( BITS => INENC_BITS_i, link_up_o => linkup_ssi, error_o => open, - ssi_sck_i => CLK_IN, + ssi_sck_i => SnffrClk, ssi_dat_i => DATA_IN, posn_o => posn_ssi_sniffer ); @@ -335,7 +337,7 @@ port map ( link_up_o => linkup_biss_sniffer, health_o => health_biss_sniffer, error_o => open, - ssi_sck_i => CLK_IN, + ssi_sck_i => SnffrClk, ssi_dat_i => DATA_IN, posn_o => posn_biss_sniffer ); @@ -426,11 +428,13 @@ IOBUF_Am0 : entity work.iobuf_registered port map ( IO => Am0_pad_io ); +Bm0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MON+CTRL) else inenc_ctrl(1); + IOBUF_Bm0 : entity work.iobuf_registered port map ( clock => clk_i, I => Bm0_opad, O => Bm0_ipad, - T => inenc_ctrl(1), + T => Bm0_T, IO => Bm0_pad_io ); @@ -511,6 +515,7 @@ IOBUF_As0 : entity work.iobuf_registered port map ( -- When using a Monitor card the B signal will need to be enabled, for using the CLK -- regardless of the protocol. +-- unnessecary logic ?? Bs0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) else outenc_ctrl(1); IOBUF_Bs0 : entity work.iobuf_registered port map ( @@ -547,5 +552,9 @@ clkin_filt : entity work.delay_filter port map ( pulse_i => Bs0_ipad, filt_o => CLK_IN ); + +SnffrClk <= B_IN when DCARD_MODE_i(3 downto 1) = DCARD_MON+CTRL else CLK_IN; + + end rtl; From 302994ba2137e03a77d70befcb2d3ae5dfa0129f Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Wed, 14 Apr 2021 00:00:57 +0100 Subject: [PATCH 02/16] Remove unnecessary logic driving Bs0 (B_OUT) tri-state control --- targets/PandABox/hdl/encoders.vhd | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 4c6771aad..1948c39e0 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -127,7 +127,7 @@ signal CLK_OUT : std_logic; signal CLK_IN : std_logic; -signal Bs0_T, Bm0_T : std_logic; +signal Bm0_T : std_logic; signal SnffrClk : std_logic; @@ -513,16 +513,11 @@ IOBUF_As0 : entity work.iobuf_registered port map ( IO => As0_pad_io ); --- When using a Monitor card the B signal will need to be enabled, for using the CLK --- regardless of the protocol. --- unnessecary logic ?? -Bs0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) else outenc_ctrl(1); - IOBUF_Bs0 : entity work.iobuf_registered port map ( clock => clk_i, I => Bs0_opad, O => Bs0_ipad, - T => Bs0_T, + T => outenc_ctrl(1), IO => Bs0_pad_io ); From d1711f669988414d3b57fb7cd7f3878337a468dc Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Wed, 14 Apr 2021 00:09:14 +0100 Subject: [PATCH 03/16] Change default case for outenc to disable all xcvrs --- targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index 5de84fe86..8dbd081e3 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -73,7 +73,7 @@ begin when "101" => -- Data passthrough (same as SSI) return X"28"; when others => - return X"00"; + return X"04"; end case; end OUTENC_CONV; From 702151df94a1cb3589f811ca67d6ee58ed63e7cb Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Wed, 14 Apr 2021 23:52:31 +0100 Subject: [PATCH 04/16] Fix INENC MON+CTRL to use sniffer signals * renamd DCARD_MON_CTRL constant --- common/templates/top_defines.vhd.jinja2 | 1 + targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 2 +- targets/PandABox/hdl/encoders.vhd | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/templates/top_defines.vhd.jinja2 b/common/templates/top_defines.vhd.jinja2 index e101fdd5b..d2cbdd577 100644 --- a/common/templates/top_defines.vhd.jinja2 +++ b/common/templates/top_defines.vhd.jinja2 @@ -44,6 +44,7 @@ constant EBUSW : natural := 12; -------------------------------------------------------------------------- constant DCARD_MONITOR : std_logic_vector(2 downto 0) := "011"; +constant DCARD_MON_CTRL : std_logic_vector(2 downto 0) := "010"; type t_mode_group is array (5 downto 0) of std_logic_vector(31 downto 0); type t_mode is array (PBUSW-1 downto 0) of t_mode_group; diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index 8dbd081e3..f33464e43 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -83,7 +83,7 @@ begin enc_ctrl_pad(1 downto 0) := INENC(1 downto 0); enc_ctrl_pad(3 downto 2) := OUTENC(1 downto 0); - enc_ctrl_pad(4) := not INENC(2) when DCARD_MODE(3 downto 1) = DCARD_MON+CTRL else INENC(2); + enc_ctrl_pad(4) := not INENC(2) when DCARD_MODE(3 downto 1) = DCARD_MON_CTRL else INENC(2); enc_ctrl_pad(5) := OUTENC(2); enc_ctrl_pad(7 downto 6) := INENC(4 downto 3); enc_ctrl_pad(9 downto 8) := OUTENC(4 downto 3); diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 1948c39e0..1c391a53e 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -359,7 +359,7 @@ begin HOMED_o <= homed_qdec; when "001" => -- SSI & Loopback - if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) then + if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR | DCARD_MON_CTRL) then posn <= posn_ssi_sniffer; STATUS_o(0) <= linkup_ssi; if (linkup_ssi = '0') then @@ -375,7 +375,7 @@ begin HOMED_o <= TO_SVECTOR(1,32); when "010" => -- BISS & Loopback - if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) then + if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR | DCARD_MON_CTRL) then posn <= posn_biss_sniffer; STATUS_o(0) <= linkup_biss_sniffer; INENC_HEALTH_o <= health_biss_sniffer; @@ -428,7 +428,7 @@ IOBUF_Am0 : entity work.iobuf_registered port map ( IO => Am0_pad_io ); -Bm0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MON+CTRL) else inenc_ctrl(1); +Bm0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL) else inenc_ctrl(1); IOBUF_Bm0 : entity work.iobuf_registered port map ( clock => clk_i, @@ -548,7 +548,7 @@ clkin_filt : entity work.delay_filter port map ( filt_o => CLK_IN ); -SnffrClk <= B_IN when DCARD_MODE_i(3 downto 1) = DCARD_MON+CTRL else CLK_IN; +SnffrClk <= B_IN when DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL else CLK_IN; end rtl; From 34a21604048074928bc1dadfe5d4b92004525012 Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Sun, 18 Apr 2021 12:04:10 +0100 Subject: [PATCH 05/16] Encoder changes to support bi-directional protocols --- targets/PandABox/hdl/encoders.vhd | 58 +++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 1c391a53e..7698f1ffa 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -131,13 +131,20 @@ signal Bm0_T : std_logic; signal SnffrClk : std_logic; +signal data_out_biss_master : std_logic; + +signal outenc_data_in : std_logic; + +signal inenc_dir_biss : std_logic; +signal outenc_dir_biss : std_logic; + begin --- Unused Nets. -inenc_dir <= '0'; -outenc_dir <= '0'; -Am0_opad <= '0'; -Zm0_opad <= '0'; +-- Temporary assignments for bi-directional signal - also needs to be implemented for endat +inenc_dir_biss <= '0'; +data_out_biss_master <= '0'; +outenc_dir_biss <= '0'; + -----------------------------OUTENC--------------------------------------------- -------------------------------------------------------------------------------- @@ -150,7 +157,7 @@ B_OUT <= b_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else quad_b; Z_OUT <= z_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else '0'; DATA_OUT <= data_ext_i when (OUTENC_PROTOCOL_i = c_DATA_PASSTHROUGH) else bdat when (OUTENC_PROTOCOL_i = c_BISS) else sdat; - +outenc_dir <= outenc_dir_biss when (OUTENC_PROTOCOL_i = c_BISS) else '0'; -- -- INCREMENTAL OUT -- @@ -357,9 +364,10 @@ begin INENC_HEALTH_o(0) <= not(linkup_incr); INENC_HEALTH_o(31 downto 1)<= (others=>'0'); HOMED_o <= homed_qdec; - + Am0_opad <= '0'; when "001" => -- SSI & Loopback - if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR | DCARD_MON_CTRL) then + if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) + OR (DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL) then posn <= posn_ssi_sniffer; STATUS_o(0) <= linkup_ssi; if (linkup_ssi = '0') then @@ -373,16 +381,22 @@ begin INENC_HEALTH_o <= (others=>'0'); end if; HOMED_o <= TO_SVECTOR(1,32); + Am0_opad <= '0'; when "010" => -- BISS & Loopback - if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR | DCARD_MON_CTRL) then + if (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) + OR (DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL) then posn <= posn_biss_sniffer; STATUS_o(0) <= linkup_biss_sniffer; INENC_HEALTH_o <= health_biss_sniffer; + inenc_dir <= '0'; + Am0_opad <= '0'; else -- DCARD_CONTROL posn <= posn_biss; STATUS_o(0) <= linkup_biss_master; INENC_HEALTH_o<=health_biss_master; + inenc_dir <= inenc_dir_biss; + Am0_opad <= data_out_biss_master; end if; HOMED_o <= TO_SVECTOR(1,32); @@ -391,6 +405,8 @@ begin posn <= (others => '0'); STATUS_o <= (others => '0'); HOMED_o <= TO_SVECTOR(1,32); + inenc_dir <= '0'; -- temporary signal awaiting enDat definitions + Am0_opad <= '0'; end case; end if; end process; @@ -411,7 +427,7 @@ begin when "010" => -- BiSS-C inenc_ctrl <= "101"; when "011" => -- EnDat - inenc_ctrl <= inenc_dir & "00"; + inenc_ctrl <= NOT(inenc_dir) & "00"; when others => inenc_ctrl <= "111"; end case; @@ -447,6 +463,7 @@ IOBUF_Zm0 : entity work.iobuf_registered port map ( ); Bm0_opad <= CLK_OUT; +Zm0_opad <= inenc_dir; a_filt : entity work.delay_filter port map( clk_i => clk_i, @@ -469,12 +486,7 @@ z_filt : entity work.delay_filter port map( filt_o => Z_IN ); -datain_filt : entity work.delay_filter port map( - clk_i => clk_i, - reset_i => reset_i, - pulse_i => Am0_ipad, - filt_o => DATA_IN -); +DATA_IN <= A_IN; -------------------------------------------------------------------------- -- On-chip IOBUF controls based on protocol for OUTENC Blocks @@ -491,9 +503,9 @@ begin when "001" => -- SSI outenc_ctrl <= "011"; when "010" => -- BiSS - outenc_ctrl <= outenc_dir & "10"; + outenc_ctrl <= NOT(outenc_dir) & "10"; when "011" => -- EnDat - outenc_ctrl <= outenc_dir & "10"; + outenc_ctrl <= NOT(outenc_dir) & "10"; -- when "100" => -- Pass-Through -- outenc_ctrl <= "000"; when "101" => @@ -532,7 +544,7 @@ IOBUF_Zs0 : entity work.iobuf_registered port map ( -- A output is shared between incremental and absolute data lines. As0_opad <= A_OUT when (OUTENC_PROTOCOL_i(1 downto 0) = "00") else DATA_OUT; Bs0_opad <= B_OUT; -Zs0_opad <= Z_OUT; +Zs0_opad <= Z_OUT when (OUTENC_PROTOCOL_i(1 downto 0) = "00") else outenc_dir; INENC_A_o <= A_IN; INENC_B_o <= B_IN; @@ -548,8 +560,16 @@ clkin_filt : entity work.delay_filter port map ( filt_o => CLK_IN ); +outenc_din_filt : entity work.delay_filter port map ( + clk_i => clk_i, + reset_i => reset_i, + pulse_i => As0_ipad, + filt_o => outenc_data_in +); + SnffrClk <= B_IN when DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL else CLK_IN; + end rtl; From 6615825e3fdea36d0cd2bc17a9ab19ab55b59a1c Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Sun, 18 Apr 2021 12:05:12 +0100 Subject: [PATCH 06/16] Fix missing signal in function call --- targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index f33464e43..1eb2e7f89 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -133,10 +133,10 @@ begin end process; -- Interleave Input and Output Controls to the Daughter Card Pins. -dcard_ctrl1_io(11 downto 0) <= CONV_PADS(inenc_ctrl(0), outenc_ctrl(0)); -dcard_ctrl2_io(11 downto 0) <= CONV_PADS(inenc_ctrl(1), outenc_ctrl(1)); -dcard_ctrl3_io(11 downto 0) <= CONV_PADS(inenc_ctrl(2), outenc_ctrl(2)); -dcard_ctrl4_io(11 downto 0) <= CONV_PADS(inenc_ctrl(3), outenc_ctrl(3)); +dcard_ctrl1_io(11 downto 0) <= CONV_PADS(inenc_ctrl(0), outenc_ctrl(0), DCARD_MODE_i(0)); +dcard_ctrl2_io(11 downto 0) <= CONV_PADS(inenc_ctrl(1), outenc_ctrl(1), DCARD_MODE_i(1)); +dcard_ctrl3_io(11 downto 0) <= CONV_PADS(inenc_ctrl(2), outenc_ctrl(2), DCARD_MODE_i(2)); +dcard_ctrl4_io(11 downto 0) <= CONV_PADS(inenc_ctrl(3), outenc_ctrl(3), DCARD_MODE_i(3)); DCARD_MODE <= DCARD_MODE_i; From ddc9fbd0705442011b6d1fce62ab37b6611ef893 Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Sun, 18 Apr 2021 12:09:34 +0100 Subject: [PATCH 07/16] Fix INENC termination for MONITOR mode to always OFF * INENC data signal will be terminated by the encoder for the MONITOR card --- targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index 1eb2e7f89..dafaff435 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -87,7 +87,8 @@ begin enc_ctrl_pad(5) := OUTENC(2); enc_ctrl_pad(7 downto 6) := INENC(4 downto 3); enc_ctrl_pad(9 downto 8) := OUTENC(4 downto 3); - enc_ctrl_pad(10) := INENC(5); + enc_ctrl_pad(10) := '1' when (DCARD_MODE(3 downto 1) = DCARD_MONITOR + or DCARD_MODE(3 downto 1) = DCARD_MON_CTRL) else INENC(5); enc_ctrl_pad(11) := OUTENC(5); return enc_ctrl_pad; From b1e8c5f56f38020843a9a1d7d61d36847260e35c Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 10 May 2021 10:48:25 +0100 Subject: [PATCH 08/16] Added Mon+Ctrl Dcard type to encodes block.ini file --- targets/PandABox/blocks/inenc/inenc.block.ini | 2 +- targets/PandABox/blocks/outenc/outenc.block.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/PandABox/blocks/inenc/inenc.block.ini b/targets/PandABox/blocks/inenc/inenc.block.ini index 74c1a42d4..e0aa050af 100644 --- a/targets/PandABox/blocks/inenc/inenc.block.ini +++ b/targets/PandABox/blocks/inenc/inenc.block.ini @@ -91,7 +91,7 @@ type: read enum description: Daughter card jumper mode 0: DCARD id 0 1: Encoder Control -2: DCARD id 2 +2: Encoder Mon+Ctrl 3: Encoder Monitor 4: DCARD id 3 5: DCARD id 4 diff --git a/targets/PandABox/blocks/outenc/outenc.block.ini b/targets/PandABox/blocks/outenc/outenc.block.ini index fd99a5005..0e53bdd4a 100644 --- a/targets/PandABox/blocks/outenc/outenc.block.ini +++ b/targets/PandABox/blocks/outenc/outenc.block.ini @@ -66,7 +66,7 @@ type: read enum description: Daughter card jumper mode 0: DCARD id 0 1: Encoder Control -2: DCARD id 2 +2: Encoder Mon+Ctrl 3: Encoder Monitor 4: DCARD id 3 5: DCARD id 4 From a3ff28c6d020836c143c28ee3d8307d937c2eddc Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 12 Jul 2021 17:18:15 +0100 Subject: [PATCH 09/16] Added Chipscope ILA to Zynq encoders block --- targets/PandABox/blocks/inenc/inenc.block.ini | 1 + targets/PandABox/hdl/encoders.vhd | 20 +++++++++++++++++++ targets/PandABox/scripts/build_ips.tcl | 2 ++ 3 files changed, 23 insertions(+) diff --git a/targets/PandABox/blocks/inenc/inenc.block.ini b/targets/PandABox/blocks/inenc/inenc.block.ini index e0aa050af..2afb40782 100644 --- a/targets/PandABox/blocks/inenc/inenc.block.ini +++ b/targets/PandABox/blocks/inenc/inenc.block.ini @@ -1,6 +1,7 @@ [.] description: Input encoder entity: inenc +ip: ila_32x8K [CLK] type: bit_mux diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 7698f1ffa..7b386a271 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -69,6 +69,15 @@ end entity; architecture rtl of encoders is +COMPONENT ila_32x8K + +PORT ( + clk : IN STD_LOGIC; + probe0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0); + probe1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0) +); +END COMPONENT ; + constant c_ABZ_PASSTHROUGH : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(4,3)); constant c_DATA_PASSTHROUGH : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(5,3)); constant c_BISS : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(2,3)); @@ -569,6 +578,17 @@ outenc_din_filt : entity work.delay_filter port map ( SnffrClk <= B_IN when DCARD_MODE_i(3 downto 1) = DCARD_MON_CTRL else CLK_IN; +ssi_ila : ila_32x8K +PORT MAP ( + clk => clk_i, + probe0 => posn_ssi_sniffer, + probe1(2 downto 0) => INENC_PROTOCOL_i, + probe1(10 downto 3) => INENC_BITS_i, + probe1(11) => linkup_ssi, + probe1(12) => SnffrClk, + probe1(13) => DATA_IN, + probe1(31 downto 14) => (others => '0') +); end rtl; diff --git a/targets/PandABox/scripts/build_ips.tcl b/targets/PandABox/scripts/build_ips.tcl index 6ebcea2ba..5314d54cc 100644 --- a/targets/PandABox/scripts/build_ips.tcl +++ b/targets/PandABox/scripts/build_ips.tcl @@ -240,6 +240,8 @@ create_ip -vlnv [get_ipdefs -filter {NAME == ila}] \ set_property -dict [list \ CONFIG.C_PROBE0_WIDTH {32} \ + CONFIG.C_NUM_OF_PROBES {2} \ + CONFIG.C_PROBE1_WIDTH {32} \ CONFIG.C_DATA_DEPTH {8192} \ ] [get_ips ila_32x8K] From c5819f11182578e10454970dae32ef85c1d41f80 Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Tue, 21 Sep 2021 17:37:18 +0100 Subject: [PATCH 10/16] Added debounce controls to ssi-sniffer module * Also added second ILA to the sssi-sniffer --- targets/PandABox/blocks/inenc/inenc.block.ini | 8 +++ targets/PandABox/hdl/encoders.vhd | 4 ++ targets/PandABox/hdl/encoders_block.vhd | 6 ++ targets/PandABox/hdl/ssi_sniffer.vhd | 65 ++++++++++++++++++- 4 files changed, 81 insertions(+), 2 deletions(-) diff --git a/targets/PandABox/blocks/inenc/inenc.block.ini b/targets/PandABox/blocks/inenc/inenc.block.ini index 2afb40782..b6634d480 100644 --- a/targets/PandABox/blocks/inenc/inenc.block.ini +++ b/targets/PandABox/blocks/inenc/inenc.block.ini @@ -49,6 +49,14 @@ description: Set point type: param bit description: Zero position on Z rising edge +[DEBOUNCE_EN] +type: param bit +description: Enable optional debouncing for clock input lines + +[DEBOUNCE_TIME] +type: param uint 127 +description: Time constant in clock ticks for debounce timeout + [A] type: bit_out description: Quadrature A if in incremental mode diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 7b386a271..c7e2ee7bb 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -58,6 +58,8 @@ port ( SETP_i : in std_logic_vector(31 downto 0); SETP_WSTB_i : in std_logic; RST_ON_Z_i : in std_logic_vector(31 downto 0); + DEBOUNCE_EN_i : in std_logic; + DEBOUNCE_TIME_i : in std_logic_vector(6 downto 0); STATUS_o : out std_logic_vector(31 downto 0); INENC_HEALTH_o : out std_logic_vector(31 downto 0); HOMED_o : out std_logic_vector(31 downto 0); @@ -318,6 +320,8 @@ port map ( clk_i => clk_i, reset_i => reset_i, BITS => INENC_BITS_i, + DEBOUNCE_EN_i => DEBOUNCE_EN_i, + DEBOUNCE_TIME_i => DEBOUNCE_TIME_i, link_up_o => linkup_ssi, error_o => open, ssi_sck_i => SnffrClk, diff --git a/targets/PandABox/hdl/encoders_block.vhd b/targets/PandABox/hdl/encoders_block.vhd index f019eb8f8..6b86068a8 100644 --- a/targets/PandABox/hdl/encoders_block.vhd +++ b/targets/PandABox/hdl/encoders_block.vhd @@ -92,6 +92,8 @@ signal SETP : std_logic_vector(31 downto 0); signal SETP_WSTB : std_logic; signal RST_ON_Z : std_logic_vector(31 downto 0); signal STATUS : std_logic_vector(31 downto 0); +signal DEBOUNCE_EN : std_logic_vector(31 downto 0); +signal DEBOUNCE_TIME : std_logic_vector(31 downto 0); signal read_ack : std_logic; signal LSB_DISCARD : std_logic_vector(31 downto 0); signal MSB_DISCARD : std_logic_vector(31 downto 0); @@ -191,6 +193,8 @@ port map ( SETP_WSTB => SETP_WSTB, RST_ON_Z => RST_ON_Z, RST_ON_Z_WSTB => open, + DEBOUNCE_EN => DEBOUNCE_EN, + DEBOUNCE_TIME => DEBOUNCE_TIME, HEALTH => INENC_HEALTH, HOMED => HOMED, DCARD_TYPE => DCARD_TYPE @@ -249,6 +253,8 @@ port map( SETP_i => SETP, SETP_WSTB_i => SETP_WSTB, RST_ON_Z_i => RST_ON_Z, + DEBOUNCE_EN_i => DEBOUNCE_EN(0), + DEBOUNCE_TIME_i => DEBOUNCE_TIME(6 downto 0), STATUS_o => STATUS, INENC_HEALTH_o => INENC_HEALTH, HOMED_o => HOMED, diff --git a/targets/PandABox/hdl/ssi_sniffer.vhd b/targets/PandABox/hdl/ssi_sniffer.vhd index dd0d635c7..b7eb0b4b2 100644 --- a/targets/PandABox/hdl/ssi_sniffer.vhd +++ b/targets/PandABox/hdl/ssi_sniffer.vhd @@ -23,8 +23,11 @@ port ( reset_i : in std_logic; -- Configuration interface BITS : in std_logic_vector(7 downto 0); + DEBOUNCE_EN_i : in std_logic; + DEBOUNCE_TIME_i : in std_logic_vector(6 downto 0); link_up_o : out std_logic; error_o : out std_logic; + -- Physical SSI interface ssi_sck_i : in std_logic; ssi_dat_i : in std_logic; @@ -35,6 +38,15 @@ end ssi_sniffer; architecture rtl of ssi_sniffer is +COMPONENT ila_32x8K + +PORT ( + clk : IN STD_LOGIC; + probe0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0); + probe1 : IN STD_LOGIC_VECTOR(31 DOWNTO 0) +); +END COMPONENT ; + -- Ticks in terms of internal serial clock period. constant SYNCPERIOD : natural := 125 * 5; -- 5usec @@ -56,6 +68,9 @@ signal serial_clock_fall : std_logic; signal serial_clock_rise : std_logic; signal shift_counter : unsigned(7 downto 0); signal shift_enabled : std_logic; +signal debounce_en : std_logic; +signal db_timeout : std_logic; +signal DEBOUNCE_TIME : unsigned(6 downto 0); begin @@ -68,6 +83,9 @@ uBITS <= unsigned(BITS); -- Internal reset when link is down reset <= reset_i or not link_up; +debounce_en <= DEBOUNCE_EN_i; +DEBOUNCE_TIME <= unsigned(DEBOUNCE_TIME_i); + serial_clock <= ssi_sck_i; serial_data <= ssi_dat_i; @@ -80,10 +98,32 @@ begin end process; -- Shift source synchronous data on the Falling egde of clock -serial_clock_fall <= not serial_clock and serial_clock_prev; -serial_clock_rise <= serial_clock and not serial_clock_prev; +serial_clock_fall <= '0' when (db_timeout='1' and debounce_en='1') else (not serial_clock and serial_clock_prev); +serial_clock_rise <= '0' when (db_timeout='1' and debounce_en='1') else (serial_clock and not serial_clock_prev); serial_data_rise <= serial_data and not serial_data_prev; +-- Optional debounce circuit for incoming serial clock, to ensure logic does not respond to reflections +-- on the incoming clock lines. + +debouncer : process(clk_i) + variable db_ctr : unsigned(6 downto 0); -- Allow just over 1 us timeout +begin + if rising_edge(clk_i) then + if (db_timeout = '0') then + if (serial_clock_rise='1' or serial_clock_fall='1') then + db_timeout <= '1'; + end if; + else + if (db_ctr = DEBOUNCE_TIME) then + db_timeout <= '0'; + db_ctr := (others => '0'); + else + db_ctr := db_ctr + 1; + end if; + end if; + end if; +end process; + -------------------------------------------------------------------------- -- Detect link if clock is asserted for > 5us. -------------------------------------------------------------------------- @@ -184,4 +224,25 @@ end process; link_up_o <= link_up; error_o <= '0'; -- n/a +ssi_ila : ila_32x8K +PORT MAP ( + clk => clk_i, + probe0 => data, + probe1(0) => data_valid, + probe1(1) => serial_data, + probe1(2) => serial_clock_fall, + probe1(10 downto 3) => BITS, + probe1(11) => link_up, + probe1(12) => serial_clock, + probe1(13) => reset, + probe1(14) => serial_data_prev, + probe1(15) => serial_clock_prev, + probe1(16) => ssi_frame, + probe1(17) => serial_data_rise, + probe1(18) => serial_clock_rise, + probe1(19) => shift_enabled, + probe1(27 downto 20) => std_logic_vector(shift_counter), + probe1(31 downto 28) => (others => '0') +); + end rtl; From c84b8677d746f6eaf386274c9164123825511fea Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Wed, 29 Sep 2021 12:12:50 +0100 Subject: [PATCH 11/16] Changes for SSI-splitter mode --- .../PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd | 4 ++ targets/PandABox/blocks/inenc/inenc.block.ini | 1 + .../PandABox/blocks/outenc/outenc.block.ini | 1 + targets/PandABox/hdl/encoders.vhd | 47 +++++++++++++++---- 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd index dafaff435..3f17ef426 100644 --- a/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd +++ b/targets/PandABox/SlowFPGA/src/hdl/dcard_ctrl.vhd @@ -52,6 +52,8 @@ begin return X"0C"; when "011" => -- EnDat return X"14"; + when "110" => -- SSI-splitter + return X"03"; -- same as Incremental when others => return X"00"; end case; @@ -72,6 +74,8 @@ begin return X"07"; when "101" => -- Data passthrough (same as SSI) return X"28"; + when "110" => -- SSI-splitter + return X"07"; -- same as Incremental when others => return X"04"; end case; diff --git a/targets/PandABox/blocks/inenc/inenc.block.ini b/targets/PandABox/blocks/inenc/inenc.block.ini index b6634d480..f51f5101c 100644 --- a/targets/PandABox/blocks/inenc/inenc.block.ini +++ b/targets/PandABox/blocks/inenc/inenc.block.ini @@ -14,6 +14,7 @@ description: Type of absolute/incremental protocol 1: SSI 2: BISS 3: enDat +6: SSI-Splitter [CLK_SRC] type: param enum diff --git a/targets/PandABox/blocks/outenc/outenc.block.ini b/targets/PandABox/blocks/outenc/outenc.block.ini index 0e53bdd4a..5959d9685 100644 --- a/targets/PandABox/blocks/outenc/outenc.block.ini +++ b/targets/PandABox/blocks/outenc/outenc.block.ini @@ -37,6 +37,7 @@ description: Type of absolute/incremental protocol 3: enDat 4: ABZ Passthrough 5: DATA Passthrough +6: SSI-Splitter [BITS] type: param uint 32 diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index c7e2ee7bb..add6bcf4d 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -84,10 +84,14 @@ constant c_ABZ_PASSTHROUGH : std_logic_vector(2 downto 0) := std_logic_vector(t constant c_DATA_PASSTHROUGH : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(5,3)); constant c_BISS : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(2,3)); constant c_enDat : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(3,3)); +constant c_SSI_SPLITTER : std_logic_vector(2 downto 0) := std_logic_vector(to_unsigned(6,3)); signal quad_a : std_logic; signal quad_b : std_logic; -signal sdat : std_logic; +signal ssi_slave1_dat : std_logic; +signal ssi_slave2_dat : std_logic; +signal ssi_slave1_clk : std_logic; +signal ssi_slave2_clk : std_logic; signal bdat : std_logic; signal health_biss_slave : std_logic_vector(31 downto 0); @@ -163,11 +167,15 @@ outenc_dir_biss <= '0'; -- used to generate the Clock inputted to the Inenc. -- Assign outputs -A_OUT <= a_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else quad_a; -B_OUT <= b_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else quad_b; -Z_OUT <= z_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else '0'; +A_OUT <= a_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) + else clk_out_encoder_ssi when (OUTENC_PROTOCOL_i = c_SSI_SPLITTER) + else quad_a; +B_OUT <= b_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else + ssi_slave2_dat when (OUTENC_PROTOCOL_i = c_SSI_SPLITTER) else quad_b; +Z_OUT <= z_ext_i when (OUTENC_PROTOCOL_i = c_ABZ_PASSTHROUGH) else + ssi_slave1_dat when (OUTENC_PROTOCOL_i = c_SSI_SPLITTER) else '0'; DATA_OUT <= data_ext_i when (OUTENC_PROTOCOL_i = c_DATA_PASSTHROUGH) else - bdat when (OUTENC_PROTOCOL_i = c_BISS) else sdat; + bdat when (OUTENC_PROTOCOL_i = c_BISS) else ssi_slave1_dat; outenc_dir <= outenc_dir_biss when (OUTENC_PROTOCOL_i = c_BISS) else '0'; -- -- INCREMENTAL OUT @@ -188,14 +196,29 @@ port map ( -- -- SSI SLAVE -- -ssi_slave_inst : entity work.ssi_slave + +ssi_slave1_clk <= Z_IN when (INENC_PROTOCOL_i = c_SSI_SPLITTER) else CLK_IN; +ssi_slave2_clk <= B_IN; + +ssi_slave1_inst : entity work.ssi_slave -- regular SSI slave instance, \ + -- or PMAC in SSI-Splitter mode +port map ( + clk_i => clk_i, + reset_i => reset_i, + BITS => OUTENC_BITS_i, + posn_i => posn_i, + ssi_sck_i => ssi_slave1_clk, + ssi_dat_o => ssi_slave1_dat +); + +ssi_slave2_inst : entity work.ssi_slave -- for PLC in SSI-Splitter mode port map ( clk_i => clk_i, reset_i => reset_i, BITS => OUTENC_BITS_i, posn_i => posn_i, - ssi_sck_i => CLK_IN, - ssi_dat_o => sdat + ssi_sck_i => ssi_slave2_clk, + ssi_dat_o => ssi_slave2_dat ); -- @@ -555,9 +578,13 @@ IOBUF_Zs0 : entity work.iobuf_registered port map ( ); -- A output is shared between incremental and absolute data lines. -As0_opad <= A_OUT when (OUTENC_PROTOCOL_i(1 downto 0) = "00") else DATA_OUT; +As0_opad <= A_OUT when + (OUTENC_PROTOCOL_i(1 downto 0) = "00" OR OUTENC_PROTOCOL_i = c_SSI_SPLITTER) + else DATA_OUT; Bs0_opad <= B_OUT; -Zs0_opad <= Z_OUT when (OUTENC_PROTOCOL_i(1 downto 0) = "00") else outenc_dir; +Zs0_opad <= Z_OUT when + (OUTENC_PROTOCOL_i(1 downto 0) = "00" OR OUTENC_PROTOCOL_i = c_SSI_SPLITTER) + else outenc_dir; INENC_A_o <= A_IN; INENC_B_o <= B_IN; From c2f645fa3c76722caab79a4bfdb9e6e9c15887bb Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 4 Oct 2021 17:19:12 +0100 Subject: [PATCH 12/16] Added MUX to OUTENC clock going to the bitbus --- targets/PandABox/hdl/encoders.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index add6bcf4d..588b27000 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -591,7 +591,7 @@ INENC_B_o <= B_IN; INENC_Z_o <= Z_IN; INENC_DATA_o <= DATA_IN; -clk_int_o <= CLK_IN; +clk_int_o <= Z_IN when OUTENC_PROTOCOL_i = c_SSI_SPLITTER else SnffrClk; clkin_filt : entity work.delay_filter port map ( clk_i => clk_i, From ec75792021433c394e0e9121b3499756d29ff7e4 Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 4 Oct 2021 18:30:08 +0100 Subject: [PATCH 13/16] Removed ASYNC_REG property from delay_filter and added IDDR sync --- common/hdl/delay_filter.vhd | 3 --- common/hdl/iobuf_registered.vhd | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/common/hdl/delay_filter.vhd b/common/hdl/delay_filter.vhd index 0d31ce182..931c6b173 100644 --- a/common/hdl/delay_filter.vhd +++ b/common/hdl/delay_filter.vhd @@ -38,9 +38,6 @@ signal pulse_buf : std_logic_vector(2 downto 0) := "000"; signal filt : std_logic := '0'; signal jk : std_logic_vector(1 downto 0); -attribute async_reg : string; -attribute async_reg of pulse_buf : signal is "TRUE"; - begin -------------------------------------------------------------------------- diff --git a/common/hdl/iobuf_registered.vhd b/common/hdl/iobuf_registered.vhd index fd911d85d..fc28b9538 100644 --- a/common/hdl/iobuf_registered.vhd +++ b/common/hdl/iobuf_registered.vhd @@ -32,6 +32,14 @@ architecture rtl of iobuf_registered is signal ipad : std_logic; signal opad : std_logic; +attribute IOB : string; +attribute IOB of ipad : signal is "TRUE"; +attribute ASYNC_REG : string; +attribute ASYNC_REG of opad : signal is "TRUE"; + +signal tied_to_ground : std_logic := '0'; +signal tied_to_vcc : std_logic := '1'; + begin -------------------------------------------------------------------------- @@ -39,11 +47,23 @@ begin -------------------------------------------------------------------------- process(clock) begin if rising_edge(clock) then - O <= opad; ipad <= I; end if; end process; +IDDR_inst : IDDR + generic map ( + DDR_CLK_EDGE => "SAME_EDGE_PIPELINED") + port map ( + Q1 => O, + Q2 => open, + C => clock, + CE => tied_to_vcc, + D => opad, + R => tied_to_ground, + S => tied_to_ground +); + -- Physical IOBUF instantiations controlled with PROTOCOL IOBUF_inst : IOBUF port map ( From 2373f5792d5a43d8849e54cfa79e27af8143fb16 Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 4 Oct 2021 18:30:59 +0100 Subject: [PATCH 14/16] Removing unnecessary logic from encoders module * This logic did not what was expected and would be ignored by * the Slow FPGA in Monitor Card mode. --- targets/PandABox/hdl/encoders_top.vhd | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/targets/PandABox/hdl/encoders_top.vhd b/targets/PandABox/hdl/encoders_top.vhd index cdee5b644..d60eb106c 100644 --- a/targets/PandABox/hdl/encoders_top.vhd +++ b/targets/PandABox/hdl/encoders_top.vhd @@ -126,12 +126,7 @@ begin if (OUTENC_write_address = OUTENC_PROTOCOL_addr) then slow_tlp_o.strobe <= '1'; slow_tlp_o.address <= OUTPROT_ADDR_LIST(OUTENC_blk_addr); - -- When using a monitor card, the protocol needs to make sure the CLK is enabled. - if (DCARD_MODE_i(OUTENC_blk_addr)(3 downto 1) = DCARD_MONITOR) then - slow_tlp_o.data <= x"0000000" & '0' & write_data_i(2) & '1' & write_data_i(0); - else - slow_tlp_o.data <= write_data_i; - end if; + slow_tlp_o.data <= write_data_i; end if; elsif (INENC_write_strobe_i = '1') then if (INENC_write_address = INENC_PROTOCOL_addr) then From 27e8a7b6cca984f42b21dccac5abeeda7cec0a9b Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 4 Oct 2021 18:33:26 +0100 Subject: [PATCH 15/16] Revert "Remove unnecessary logic driving Bs0 (B_OUT) tri-state control" This reverts commit 302994ba2137e03a77d70befcb2d3ae5dfa0129f. --- targets/PandABox/hdl/encoders.vhd | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index 588b27000..ce1c10b4c 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -142,7 +142,7 @@ signal CLK_OUT : std_logic; signal CLK_IN : std_logic; -signal Bm0_T : std_logic; +signal Bs0_T, Bm0_T : std_logic; signal SnffrClk : std_logic; @@ -561,11 +561,16 @@ IOBUF_As0 : entity work.iobuf_registered port map ( IO => As0_pad_io ); +-- When using a Monitor card the B signal will need to be enabled, for using the CLK +-- regardless of the protocol. +-- unnessecary logic ?? +Bs0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) else outenc_ctrl(1); + IOBUF_Bs0 : entity work.iobuf_registered port map ( clock => clk_i, I => Bs0_opad, O => Bs0_ipad, - T => outenc_ctrl(1), + T => Bs0_T, IO => Bs0_pad_io ); From b75928620cd100bdfd20e9e106a68740f9605d2b Mon Sep 17 00:00:00 2001 From: "Christian, Glenn (DLSLtd,RAL,LSCI)" Date: Mon, 4 Oct 2021 18:36:37 +0100 Subject: [PATCH 16/16] Minor tidy-up --- targets/PandABox/hdl/encoders.vhd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/PandABox/hdl/encoders.vhd b/targets/PandABox/hdl/encoders.vhd index ce1c10b4c..3ade9c9f3 100644 --- a/targets/PandABox/hdl/encoders.vhd +++ b/targets/PandABox/hdl/encoders.vhd @@ -142,7 +142,8 @@ signal CLK_OUT : std_logic; signal CLK_IN : std_logic; -signal Bs0_T, Bm0_T : std_logic; +signal Bs0_T : std_logic; +signal Bm0_T : std_logic; signal SnffrClk : std_logic; @@ -563,7 +564,6 @@ IOBUF_As0 : entity work.iobuf_registered port map ( -- When using a Monitor card the B signal will need to be enabled, for using the CLK -- regardless of the protocol. --- unnessecary logic ?? Bs0_T <= '1' when (DCARD_MODE_i(3 downto 1) = DCARD_MONITOR) else outenc_ctrl(1); IOBUF_Bs0 : entity work.iobuf_registered port map (