Skip to content
Snippets Groups Projects
Commit fdf65a9a authored by BRONES Romain's avatar BRONES Romain
Browse files

New version, major changes

* Plane separation X/Y on corrector control and monitor
* Fix error flags, make them sticky, use a dedicated reset register to clear
* Switch DAQ to continuous, use IRQ
* Improve CCN packeter, avoid transmit of wrong data
* And several cosmetics fixes...
parents 6483759f f254ec7d
No related branches found
No related tags found
No related merge requests found
fwk @ 53ebc93b
Subproject commit ef471aa8e739fc8de08f9aaf0ad7dbe3c1d3943c
Subproject commit 53ebc93b97b6c66872b09e698b50eb10e03caec7
......@@ -73,22 +73,22 @@ package pkg_app_config is
constant C_DAQ_FIFO_DEPTH_ARRAY : t_natural_vector := (1024,1024,1024);
-- Region 0 is BPM data
constant C_DAQ0_IS_CONTINUOUS : natural := 0;
constant C_DAQ0_MAX_SAMPLES : natural := 16384; -- does not change HDL
constant C_DAQ0_IS_CONTINUOUS : natural := 1;
constant C_DAQ0_MAX_SAMPLES : natural := 16#00800000#; -- Buffer size / 16 bytes
constant C_DAQ0_CHANNELS_IN_TAB : natural := 3;
constant C_DAQ0_TAB_COUNT : natural := 1;
constant C_DAQ0_TAB_CONTENTS : t_natural_vector := (2, 1, 0);
constant C_DAQ0_BUF0_OFFSET : natural := 16#00000000#;
constant C_DAQ0_BUF1_OFFSET : natural := 16#10000000#;
constant C_DAQ0_BUF1_OFFSET : natural := 16#08000000#;
-- Region 1 is Correction data
constant C_DAQ1_IS_CONTINUOUS : natural := 0;
constant C_DAQ1_MAX_SAMPLES : natural := 16384; -- does not change HDL
constant C_DAQ1_IS_CONTINUOUS : natural := 1;
constant C_DAQ1_MAX_SAMPLES : natural := 16#02000000#; -- Buffer size / 4 bytes
constant C_DAQ1_CHANNELS_IN_TAB : natural := 1;
constant C_DAQ1_TAB_COUNT : natural := 1;
constant C_DAQ1_TAB_CONTENTS : t_natural_vector := (0=>3);
constant C_DAQ1_BUF0_OFFSET : natural := 16#20000000#;
constant C_DAQ1_BUF1_OFFSET : natural := 16#30000000#;
constant C_DAQ1_BUF0_OFFSET : natural := 16#10000000#;
constant C_DAQ1_BUF1_OFFSET : natural := 16#18000000#;
-- not used, only two regions
constant C_DAQ2_IS_CONTINUOUS : natural := 0;
......
......@@ -8,6 +8,7 @@ use unisim.vcomponents.all;
use work.pkg_bsp_fmc2zup_payload.all;
use work.pkg_app_fofb_centralnode.all;
use work.pkg_app_config.all;
library desy;
use desy.common_to_desyrdl.all;
......@@ -166,6 +167,7 @@ architecture struct of bsp_fmc2zup_payload is
signal daq_stop : std_logic;
signal r_daq_trigger : std_logic_vector(1 downto 0);
signal daq_data : t_32b_slv_vector(3 downto 0);
signal daq_irq : std_logic_vector(C_DAQ_REGIONS-1 downto 0);
-- Other signals
signal rst : std_logic;
......@@ -667,6 +669,7 @@ begin
pi_ext_str => daq_strobe,
pi_transaction_end(0)=> daq_stop,
pi_transaction_end(1)=> daq_stop,
po_buffer_start => daq_irq,
-- Data
pi_data => daq_data,
--
......@@ -676,15 +679,28 @@ begin
m_axi4_daq_s2m <= f_common_to_bsp(pi_payload.s_axi4_daq);
po_payload.s_axi4_daq <= f_common_to_bsp(m_axi4_daq_m2s);
-------------------------------------------------------
-- Mapping data channel
-- Region 0
-- 2*4 bytes for a xy position data
-- 1 byte for bpmid
-- 1 byte for seq
-- Region 1
-- 2 bytes for a correction data
-- 1 byte for pscid
-- 1 byte for seq
--
daq_data(0) <= axis_pkt_rx_tdata(31 downto 0);
--
daq_data(1) <= axis_pkt_rx_tdata(63 downto 32);
daq_data(2)(15 downto 0) <= axis_pkt_rx_tdata(79 downto 64);
--
daq_data(2)(7 downto 0) <= axis_pkt_rx_tdata(71 downto 64);
daq_data(2)(15 downto 8) <= (others => '0');
daq_data(2)(23 downto 16) <= axis_pkt_rx_tuser;
daq_data(2)(25 downto 24) <= axis_pkt_rx_tid;
daq_data(2)(31 downto 26) <= (others => '0');
daq_data(3)(23 downto 16) <= axis_pscgen_tdata_pscid;
daq_data(2)(31 downto 24) <= (others => '0');
--
daq_data(3)(15 downto 0) <= axis_pscgen_tdata_value;
daq_data(3)(23 downto 16) <= axis_pscgen_tdata_pscid;
daq_data(3)(31 downto 24) <= axis_pscgen_tuser;
daq_strobe(0) <= axis_pkt_rx_tvalid and axis_pkt_rx_tready;
......@@ -704,4 +720,10 @@ begin
end process;
-- IRQ vector
po_payload.ps_irq_req(1 downto 0) <= daq_irq;
po_payload.ps_irq_req(2) <= daq_trigger; --for test
po_payload.ps_irq_req(7 downto 3) <= (others => '0');
end architecture struct;
bsp_msk @ 9f30fa99
Subproject commit 5a6118fb7c6662c406e8953bd7fe2b49424b3321
Subproject commit 9f30fa9926d637df0dffd2918e77778aef92ea26
Subproject commit 83533b449237456271c31547e01907c3aa0a2ffa
Subproject commit 5dd1e818f6553851ba4e749c9f2dbf48d721ad84
Subproject commit 3b898d767b1e7a2395e970d00b3c3a417fb83213
Subproject commit 953d1c8e8409c988beb4f4aa583c0acc6500f1c4
Subproject commit 90d4abe741724fcc9c0aed85094ecb08d99e1901
Subproject commit 2d9af797bf4fc682d7de9c38460abf45be253bba
daq @ c6d96460
Subproject commit c3e08074763a400182d30316edbaba888e832d42
Subproject commit c6d96460a4e1788a68be1f6618eafbd8f4a903b4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment