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

New version, Major changes

* Add moving average capture on BPM error and corrector

* RDL layout changed for ChimeraTK compatibility

* PPS now sources ETH subsystem for stats

* Corrector is now 2 correctors (second order)

* DAQ timestamping on central
parents dbb11faa 5d75e95a
No related branches found
No related tags found
No related merge requests found
fwk @ ef471aa8
Subproject commit 4602bb6ca3f9703f99a35e9738c699932195c3f9
Subproject commit ef471aa8e739fc8de08f9aaf0ad7dbe3c1d3943c
......@@ -6,6 +6,7 @@ use ieee.math_real.ceil;
entity pps_cnt is
generic(
G_PULSE_W : natural := 4;
G_CLK_FREQ : natural;
G_W_TS : natural := 64
);
......@@ -38,25 +39,25 @@ architecture rtl of pps_cnt is
signal r_msb : std_logic_vector(C_N_SUBCNT-1 downto 0);
signal counter : unsigned(C_W_CNT-1 downto 0);
signal s_pps : std_logic;
signal s_pps : std_logic_vector(G_PULSE_W-1 downto 0);
begin
pps <= s_pps;
pps <= s_pps(0);
timestamp <= std_logic_vector(flat_refcounter(G_W_TS-1 downto 0));
p_pps:process(clk, rst_n)
begin
if rst_n = '0' then
counter <= C_ROLL;
s_pps <= '0';
s_pps <= (others => '0');
elsif rising_edge(clk) then
if counter = 0 then
counter <= C_ROLL;
s_pps <= '1';
s_pps <= (others => '1');
else
counter <= counter-1;
s_pps <= '0';
s_pps <= '0' & s_pps(s_pps'left downto 1);
end if;
end if;
end process;
......
......@@ -388,6 +388,8 @@ begin
s_axi_m2s => addrmap_o.ccn_ethernet_0,
s_axi_s2m => addrmap_i.ccn_ethernet_0,
pps => pps,
-- AXIS TX RX
s_axis_tx_tvalid => axis_tx_tvalid,
s_axis_tx_tready => axis_tx_tready,
......@@ -615,7 +617,7 @@ begin
rs_strobe_0 <= '1';
rs_strobe_1 <= '1';
else
if daq_strobe(0) = '1' then
if (axis_tx_tvalid and axis_tx_tready) = '1' then
rs_strobe_0 <= '0';
end if;
if daq_strobe(1) = '1' then
......
......@@ -360,6 +360,8 @@ begin
s_axi_m2s => ccn_eth_am2s(I),
s_axi_s2m => ccn_eth_as2m(I),
pps => pps,
-- AXIS TX RX
s_axis_tx_tvalid => axis_tx_tvalid,
s_axis_tx_tready => axis_tx_tready,
......
bsp_msk @ 5a6118fb
Subproject commit 6d6e75bc78a2262d832de1daf67ab3b7051b4660
Subproject commit 5a6118fb7c6662c406e8953bd7fe2b49424b3321
Subproject commit 0aaa7af039d46235fdd3fcb64c7da3e95c042c9c
Subproject commit 3b898d767b1e7a2395e970d00b3c3a417fb83213
Subproject commit 6b17d06a5ad1af348300c8e9d99f0df89fd28a55
Subproject commit bd2f26cf89ba66f42779fad298453523cacaa126
Subproject commit afad2a14593328ce5baa685be25992d47f64e79a
Subproject commit 90d4abe741724fcc9c0aed85094ecb08d99e1901
desy_vhdl @ 1bdec5dd
Subproject commit 77cb2863b1cc9be1cdec8c4355a2f616da7fbe22
Subproject commit 1bdec5dd65ec7c89fb97cd5ac1b5cea1836cb4ff
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment