Skip to content
Snippets Groups Projects
Commit 578e7f17 authored by Maciej Lipinski's avatar Maciej Lipinski
Browse files

[wr_streamers] hide dependency of xwr_transmission on btrain

xwr_transmission embeds some btrain specific stuff to easy debugging.
This prevented the xwr_transmission from being generically applicable.
Now, the btrain-specific stuff is enabled only if the width of tx/rx
data is sufficient.
parent f2718f23
No related merge requests found
...@@ -451,27 +451,30 @@ begin ...@@ -451,27 +451,30 @@ begin
end if; end if;
end process; end process;
-- this is b-train specific stuff gen_btrain_debug: if(g_tx_data_width > 47 and g_rx_data_width > 47) generate
p_bfield_for_SNMP: process(clk_sys_i) -- this is b-train specific stuff that allows snooping bfield easily. Btrain is
begin -- the main (and currently) only application of streamers
if rising_edge(clk_sys_i) then p_bfield_for_SNMP: process(clk_sys_i)
if rst_n_i = '0' then begin
dbg_tx_bfield <= (others =>'0'); if rising_edge(clk_sys_i) then
dbg_rx_bfield <= (others =>'0'); if rst_n_i = '0' then
else dbg_tx_bfield <= (others =>'0');
if(rx_valid = '1') then dbg_rx_bfield <= (others =>'0');
dbg_rx_bfield <= rx_data(15+16 downto 0+16) & rx_data(31+16 downto 16+16); else
end if; if(rx_valid = '1') then
if(tx_valid_i = '1') then dbg_rx_bfield <= rx_data(15+16 downto 0+16) & rx_data(31+16 downto 16+16);
dbg_tx_bfield <= tx_data_i(15+16 downto 0+16) & tx_data_i(31+16 downto 16+16); end if;
if(tx_valid_i = '1') then
dbg_tx_bfield <= tx_data_i(15+16 downto 0+16) & tx_data_i(31+16 downto 16+16);
end if;
end if; end if;
end if; end if;
end if; end process;
end process; snmp_array_o(c_STREAMERS_ARR_SIZE_OUT+1) <= dbg_rx_bfield;
snmp_array_o(c_STREAMERS_ARR_SIZE_OUT+2) <= dbg_tx_bfield;
end generate gen_btrain_debug;
snmp_array_o(c_STREAMERS_ARR_SIZE_OUT) <= dbg_word; snmp_array_o(c_STREAMERS_ARR_SIZE_OUT) <= dbg_word;
snmp_array_o(c_STREAMERS_ARR_SIZE_OUT+1) <= dbg_rx_bfield;
snmp_array_o(c_STREAMERS_ARR_SIZE_OUT+2) <= dbg_tx_bfield;
to_wb.dbg_data_i <= dbg_word; to_wb.dbg_data_i <= dbg_word;
to_wb.dbg_rx_bvalue_i <= dbg_rx_bfield; to_wb.dbg_rx_bvalue_i <= dbg_rx_bfield;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment