Resolve HPR-86
8 unresolved threads
8 unresolved threads
Closes HPR-86
Merge request reports
Activity
requested review from @kooistra
assigned to @walle
18 19 -- Author: 20 -- . Reinier van der Walle 21 -- Purpose: 22 -- . Bridge between AXI4 stream and DP stream interfaces. 23 -- Description: 24 -- . This core consists of: 25 -- . Combinatorial translation of one interface to the other. 26 -- . SOP insertion for AXI4 -> DP as AXI4 does not have a SOP equivalent. 27 -- . Implementation for deriving dp.empty from axi4.tkeep (see details). 28 -- . Ready latency adapters. 29 -- . Details: 30 -- . g_nof_bytes is used to indicate the number of bytes in the data field. Only 31 -- used for deriving the DP empty field. 32 -- . g_use_empty: when true, it will derive the DP empty field from the AXI4 tkeep signal. 33 -- tkeep is the AXI4 signal that indicates with a bit for each byte of the data wheter changed this line in version 2 of the diff
28 -- . Ready latency adapters. 29 -- . Details: 30 -- . g_nof_bytes is used to indicate the number of bytes in the data field. Only 31 -- used for deriving the DP empty field. 32 -- . g_use_empty: when true, it will derive the DP empty field from the AXI4 tkeep signal. 33 -- tkeep is the AXI4 signal that indicates with a bit for each byte of the data wheter 34 -- it is considered a valid or null byte. '1' for a valid byte or '0' for a null byte. 35 -- The DP empty field is derived by counting the number of '0' bits in 36 -- tkeep(g_nof_bytes DOWNTO 0). This means that it is only possible to derive the empty 37 -- field correctly when tkeep only has bits set to '0' at the end of the vector. For example: 38 -- . tkeep = "11111000" is valid and will translate to empty = 0011 (3 Decimal). 39 -- . tkeep = "11011101" is not valid. 40 -- . g_axi4_rl is the ready latency of the axi4_in/out interfaces. 41 -- . g_dp_rl is the ready latency of the dp_in/out interfaces. 42 -- . g_active_low_rst should be set to TRUE when in_rst is active low. This is useful as an 43 -- AXI4 interface oftem comes with an active-low reset while DP comes with an active-high changed this line in version 2 of the diff
24 -- . This core consists of: 25 -- . Combinatorial translation of one interface to the other. 26 -- . SOP insertion for AXI4 -> DP as AXI4 does not have a SOP equivalent. 27 -- . Implementation for deriving dp.empty from axi4.tkeep (see details). 28 -- . Ready latency adapters. 29 -- . Details: 30 -- . g_nof_bytes is used to indicate the number of bytes in the data field. Only 31 -- used for deriving the DP empty field. 32 -- . g_use_empty: when true, it will derive the DP empty field from the AXI4 tkeep signal. 33 -- tkeep is the AXI4 signal that indicates with a bit for each byte of the data wheter 34 -- it is considered a valid or null byte. '1' for a valid byte or '0' for a null byte. 35 -- The DP empty field is derived by counting the number of '0' bits in 36 -- tkeep(g_nof_bytes DOWNTO 0). This means that it is only possible to derive the empty 37 -- field correctly when tkeep only has bits set to '0' at the end of the vector. For example: 38 -- . tkeep = "11111000" is valid and will translate to empty = 0011 (3 Decimal). 39 -- . tkeep = "11011101" is not valid. changed this line in version 2 of the diff
19 -- Author: 20 -- . Reinier van der Walle 21 -- Purpose: 22 -- . Bridge between AXI4 stream and DP stream interfaces. 23 -- Description: 24 -- . This core consists of: 25 -- . Combinatorial translation of one interface to the other. 26 -- . SOP insertion for AXI4 -> DP as AXI4 does not have a SOP equivalent. 27 -- . Implementation for deriving dp.empty from axi4.tkeep (see details). 28 -- . Ready latency adapters. 29 -- . Details: 30 -- . g_nof_bytes is used to indicate the number of bytes in the data field. Only 31 -- used for deriving the DP empty field. 32 -- . g_use_empty: when true, it will derive the DP empty field from the AXI4 tkeep signal. 33 -- tkeep is the AXI4 signal that indicates with a bit for each byte of the data wheter 34 -- it is considered a valid or null byte. '1' for a valid byte or '0' for a null byte. changed this line in version 2 of the diff
51 USE dp_lib.dp_stream_pkg.ALL; 52 USE work.axi4_stream_pkg.ALL; 53 54 ENTITY axi4_stream_dp_bridge IS 55 GENERIC ( 56 g_nof_bytes : NATURAL := 64; -- Max = 64 bytes 57 g_use_empty : BOOLEAN := FALSE; -- When True the dp empty field is derived from axi4 tkeep. 58 g_axi4_rl : NATURAL := 0; 59 g_dp_rl : NATURAL := 1; 60 g_active_low_rst : BOOLEAN := FALSE -- When True, in_rst is interpreted as active-low. 61 ); 62 PORT ( 63 in_clk : IN STD_LOGIC := '0'; 64 in_rst : IN STD_LOGIC := is_true(g_active_low_rst); -- Default state is "not in reset". 65 66 aclk : OUT STD_LOGIC := '0'; -- AXI4 clk changed this line in version 2 of the diff
92 SIGNAL dp_from_axi4_siso : t_dp_siso; 93 94 TYPE t_reg IS RECORD 95 r_eop : STD_LOGIC; 96 dp_from_axi4_sosi : t_dp_sosi; 97 END RECORD; 98 99 CONSTANT c_reg_init : t_reg := ('1', c_dp_sosi_rst) ; 100 101 -- Registers 102 SIGNAL d_reg : t_reg := c_reg_init; 103 SIGNAL q_reg : t_reg := c_reg_init; 104 105 BEGIN 106 i_rst <= NOT in_rst WHEN g_active_low_rst ELSE in_rst; 107 aclk <= in_clk; changed this line in version 2 of the diff
7 -- This program is free software: you can redistribute it and/or modify 8 -- it under the terms of the GNU General Public License as published by 9 -- the Free Software Foundation, either version 3 of the License, or 10 -- (at your option) any later version. 11 -- 12 -- This program is distributed in the hope that it will be useful, 13 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 14 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 -- GNU General Public License for more details. 16 -- 17 -- You should have received a copy of the GNU General Public License 18 -- along with this program. If not, see <http://www.gnu.org/licenses/>. 19 -- 20 -------------------------------------------------------------------------------- 21 22 LIBRARY IEEE, common_lib, dp_lib; 123 -- Sync interval 124 proc_dp_sync_interval(clk, sync); 125 126 -- Input data 127 cnt_val <= in_ready AND cnt_en; 128 129 proc_dp_cnt_dat(rst, clk, cnt_val, cnt_dat); 130 proc_dp_tx_data(g_dp_rl, rst, clk, cnt_val, cnt_dat, tx_data, tx_val, in_data, in_val); 131 proc_dp_tx_ctrl(c_tx_offset_sync, c_tx_period_sync, in_data, in_val, in_sync); 132 proc_dp_tx_ctrl(c_tx_offset_sop, c_tx_period_sop, in_data, in_val, in_sop); 133 proc_dp_tx_ctrl(c_tx_offset_eop, c_tx_period_eop, in_data, in_val, in_eop); 134 in_empty <= RESIZE_UVEC(INCR_UVEC(in_data, c_empty_offset)(c_max_empty_w-1 DOWNTO 0), c_dp_stream_empty_w) WHEN in_eop = '1' ELSE (OTHERS => '0'); 135 in_channel <= RESIZE_UVEC(INCR_UVEC(in_data, c_channel_offset)(c_max_channel_w-1 DOWNTO 0), c_dp_stream_channel_w); 136 137 -- Stimuli control 138 proc_dp_count_en(rst, clk, sync, lfsr1, state, verify_done, tb_end, cnt_en); mentioned in commit bd37f0f3
unassigned @walle
Please register or sign in to reply