Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
ccn_packet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
FOFB
ccn_packet
Commits
b362fac7
Commit
b362fac7
authored
6 months ago
by
System User
Browse files
Options
Downloads
Patches
Plain Diff
fix bug ccn_pck
parent
567bd435
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdl/ccn_pack.vhd
+16
-9
16 additions, 9 deletions
hdl/ccn_pack.vhd
with
16 additions
and
9 deletions
hdl/ccn_pack.vhd
+
16
−
9
View file @
b362fac7
...
...
@@ -86,8 +86,11 @@ architecture rtl of ccn_pack is
-- Packet Rate Counter
signal
pps_detect
:
std_logic_vector
(
1
downto
0
);
signal
is_pps
:
std_logic
;
signal
pkt_rt_cnt
:
unsigned
(
18
downto
0
);
signal
pkt_rt_cnt_v
:
std_logic_vector
(
18
downto
0
);
signal
pkt_rt_cnt_ena
:
std_logic
;
signal
pkt_cnt_incr
:
std_logic
;
-- Frame counter
signal
frame_counter
:
unsigned
(
31
downto
0
);
...
...
@@ -213,7 +216,7 @@ begin
-------------------------
-- PPS PULSE DETECTION --
-------------------------
is_pps
<=
pps_detect
[
0
]
and
not
(
pps_detect
[
1
]
)
is_pps
<=
pps_detect
(
0
)
and
not
(
pps_detect
(
1
));
p_pps_dtc
:
process
(
aclk
,
aresetn
)
begin
...
...
@@ -221,8 +224,8 @@ begin
pps_detect
<=
(
others
=>
'0'
);
elsif
rising_edge
(
aclk
)
then
pps_detect
[
1
]
<=
pps_detect
[
0
]
;
pps_detect
[
0
]
<=
pps
;
pps_detect
(
1
)
<=
pps_detect
(
0
)
;
pps_detect
(
0
)
<=
pps
;
end
if
;
end
process
p_pps_dtc
;
...
...
@@ -231,6 +234,8 @@ begin
-------------------------
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
begin
...
...
@@ -239,7 +244,7 @@ begin
elsif
rising_edge
(
aclk
)
then
if
is_pps
=
'1'
then
pkt_rt_cnt
<=
std_logic_vector
(
unsigned
(
pkt_rt_cnt
)
);
-- save packet
rate
cnt
value in RO reg
pkt_rt_cnt
_v
<=
std_logic_vector
(
resize
(
unsigned
(
pkt_rt_cnt
)
,
pkt_
rate
_
cnt
'length
));
pkt_rt_cnt
<=
(
others
=>
'0'
);
-- reset packet rate value
else
if
pkt_rt_cnt_ena
=
'1'
and
pkt_cnt_incr
=
'1'
then
...
...
@@ -467,6 +472,7 @@ begin
load_pkt_cnt_ena
<=
'0'
;
pass
<=
'0'
;
frame_error
<=
'1'
;
pkt_rt_cnt_ena
<=
'0'
;
-- pkt_rt counter disable
--
fsm_state_next
<=
STANDBY
;
...
...
@@ -475,6 +481,7 @@ begin
load_pkt_cnt_ena
<=
'1'
;
pass
<=
'0'
;
frame_error
<=
'0'
;
pkt_rt_cnt_ena
<=
'0'
;
-- pkt_rt counter disable
--
fsm_state_next
<=
STANDBY
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment