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
38a43199
Commit
38a43199
authored
Jun 20, 2024
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
fix clear fifo on erroneous frame
parent
408018f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdl/ccn_pack.vhd
+25
-3
25 additions, 3 deletions
hdl/ccn_pack.vhd
with
25 additions
and
3 deletions
hdl/ccn_pack.vhd
+
25
−
3
View file @
38a43199
...
...
@@ -109,13 +109,16 @@ architecture rtl of ccn_pack is
-- Output FIFO
signal
fifo_tvalid
:
std_logic
;
signal
fifo_tvalid_c
:
std_logic
;
signal
fifo_tready
:
std_logic
;
signal
fifo_tready_c
:
std_logic
;
signal
fifo_tdata
:
std_logic_vector
(
63
downto
0
);
signal
fifo_tkeep
:
std_logic_vector
(
7
downto
0
);
signal
fifo_tlast
:
std_logic
;
signal
fifo_tuser
:
std_logic_vector
(
0
downto
0
);
signal
fifo_tuser_slv
:
std_logic_vector
(
7
downto
0
);
signal
fifo_err_rst
:
std_logic
;
signal
fifo_clr
:
std_logic
;
-- Some constant for mapping
constant
C_TKEEP_S00
:
std_logic_vector
(
23
downto
0
)
:
=
(
others
=>
'1'
);
...
...
@@ -235,6 +238,23 @@ begin
end
if
;
end
process
p_frame_cnt
;
----------------
-- FIFO CLEAR --
----------------
p_fifo_clr
:
process
(
aclk
,
aresetn
)
begin
if
aresetn
=
'0'
then
fifo_clr
<=
'0'
;
elsif
rising_edge
(
aclk
)
then
if
fifo_tuser
(
0
)
=
'1'
then
fifo_clr
<=
'1'
;
else
if
fifo_tlast
=
'1'
then
fifo_clr
<=
'0'
;
end
if
;
end
if
;
end
if
;
end
process
p_fifo_clr
;
----------------------
-- HEADER INSERTION --
...
...
@@ -290,7 +310,7 @@ begin
s01_axis_tlast
=>
pkt_ix_tlast
,
s01_axis_tuser
=>
pkt_ix_tuser
,
m00_axis_tvalid
=>
fifo_tvalid
,
m00_axis_tready
=>
fifo_tready
,
m00_axis_tready
=>
fifo_tready
_c
,
m00_axis_tdata
=>
fifo_tdata
,
m00_axis_tkeep
=>
fifo_tkeep
,
m00_axis_tlast
=>
fifo_tlast
,
...
...
@@ -303,14 +323,16 @@ begin
-- FIFO --
----------
fifo_tuser
(
0
)
<=
or_reduce
(
fifo_tuser_slv
);
fifo_err_rst
<=
(
not
fifo_tuser
(
0
))
and
aresetn
;
fifo_err_rst
<=
(
not
fifo_clr
)
and
aresetn
;
fifo_tready_c
<=
fifo_tready
or
fifo_clr
;
fifo_tvalid_c
<=
fifo_tvalid
and
not
fifo_clr
;
inst_fifo
:
entity
work
.
ccn_axis_fifo_pframe
port
map
(
s_axis_aresetn
=>
fifo_err_rst
,
s_axis_aclk
=>
aclk
,
m_axis_aclk
=>
m_axis_clk
,
s_axis_tvalid
=>
fifo_tvalid
,
s_axis_tvalid
=>
fifo_tvalid
_c
,
s_axis_tready
=>
fifo_tready
,
s_axis_tdata
=>
fifo_tdata
,
s_axis_tkeep
=>
fifo_tkeep
,
...
...
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