Skip to content
Snippets Groups Projects
Commit ad796d8e authored by System User's avatar System User
Browse files

push modif to pck_cnt branch

parent 5d79f517
No related branches found
No related tags found
No related merge requests found
......@@ -233,8 +233,7 @@ begin
-- PACKET RATE COUNTER --
-------------------------
pkt_cnt_incr <= reg_tvalid and pkt_reg_tready; -- same conditions as for pkt decounter
-- pkt_rt_cnt_zero <= '1' when is_pps = 1 else '0';-- unused
-- pkt_rate_cnt <= std_logic_vector(resize(unsigned(pkt_rt_cnt),pkt_rate_cnt'length)) when is_pps = '1'; -- save packet rate cnt value in RO reg
pkt_rate_cnt <= pkt_rt_cnt_v;
p_pkt_rt_cnt:process(aclk, aresetn) -- counter process
......@@ -244,7 +243,7 @@ begin
elsif rising_edge(aclk) then
if is_pps = '1' then
pkt_rt_cnt_v <= std_logic_vector(resize(unsigned(pkt_rt_cnt),pkt_rate_cnt'length));
pkt_rt_cnt_v <= std_logic_vector(pkt_rt_cnt);
pkt_rt_cnt <= (others => '0'); -- reset packet rate value
else
if pkt_rt_cnt_ena = '1' and pkt_cnt_incr = '1' then
......@@ -463,7 +462,7 @@ begin
load_pkt_cnt_ena <= '0';
pass <= '0';
frame_error <= '1';
pkt_rt_cnt_ena <= '0';-- pkt_rt counter disable
pkt_rt_cnt_ena <= '1';-- pkt_rt counter enable even if not necessayr - synthesis optimization ;)
--
fsm_state_next <= STANDBY;
......@@ -472,7 +471,7 @@ begin
load_pkt_cnt_ena <= '0';
pass <= '0';
frame_error <= '1';
pkt_rt_cnt_ena <= '0';-- pkt_rt counter disable
pkt_rt_cnt_ena <= '1';-- pkt_rt counter enable : pps rate cnt --> even if a packet does not belong to the current frame, it is a packet.
--
fsm_state_next <= STANDBY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment