Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
7aca94de
Commit
7aca94de
authored
10 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
SVN copied dp_xonoff.vhd to RadioHDL and added g_bypass.
parent
80b761b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/dp/hdllib.cfg
+1
-1
1 addition, 1 deletion
libraries/base/dp/hdllib.cfg
libraries/base/dp/src/vhdl/dp_xonoff.vhd
+112
-0
112 additions, 0 deletions
libraries/base/dp/src/vhdl/dp_xonoff.vhd
with
113 additions
and
1 deletion
libraries/base/dp/hdllib.cfg
+
1
−
1
View file @
7aca94de
...
...
@@ -16,7 +16,7 @@ synth_files =
$UNB/Firmware/modules/dp/src/vhdl/dp_eop_extend.vhd
$UNB/Firmware/modules/dp/src/vhdl/dp_validate.vhd
$UNB/Firmware/modules/dp/src/vhdl/dp_ready.vhd
$UNB/Firmware/modules/dp/
src/vhdl/dp_xonoff.vhd
src/vhdl/dp_xonoff.vhd
$UNB/Firmware/modules/dp/src/vhdl/dp_flush.vhd
$UNB/Firmware/modules/dp/src/vhdl/dp_latency_increase.vhd
$UNB/Firmware/modules/dp/src/vhdl/dp_latency_adapter.vhd
...
...
This diff is collapsed.
Click to expand it.
libraries/base/dp/src/vhdl/dp_xonoff.vhd
0 → 100644
+
112
−
0
View file @
7aca94de
-------------------------------------------------------------------------------
--
-- Copyright (C) 2013
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-------------------------------------------------------------------------------
-- Purpose: Add flow XON-XOFF control by flushing frames
-- Description:
-- When g_bypass=TRUE then the in and out are wired and the component is void.
-- When g_bypass=FALSE then:
-- The output is ON when flush='0'.
-- The output is OFF when flush='1'.
-- The transition from OFF to ON occurs after an in_sosi.eop so between frames
-- The transition from ON to OFF occurs after an in_sosi.eop so between frames
-- Remark:
-- . The output controls are not registered.
-- . The xon timing is not cycle critical therefor register flush to ease
-- timing closure
-- . Originally based on rad_frame_onoff from LOFAR RSP firmware
LIBRARY
IEEE
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
work
.
dp_stream_pkg
.
ALL
;
ENTITY
dp_xonoff
IS
GENERIC
(
g_bypass
:
BOOLEAN
:
=
FALSE
);
PORT
(
rst
:
IN
STD_LOGIC
;
clk
:
IN
STD_LOGIC
;
-- Frame in
in_siso
:
OUT
t_dp_siso
;
in_sosi
:
IN
t_dp_sosi
;
-- Frame out
out_siso
:
IN
t_dp_siso
;
-- flush control via out_siso.xon
out_sosi
:
OUT
t_dp_sosi
);
END
dp_xonoff
;
ARCHITECTURE
rtl
OF
dp_xonoff
IS
SIGNAL
flush
:
STD_LOGIC
;
SIGNAL
nxt_flush
:
STD_LOGIC
;
SIGNAL
out_en
:
STD_LOGIC
;
SIGNAL
nxt_out_en
:
STD_LOGIC
;
BEGIN
gen_bypass
:
IF
g_bypass
=
TRUE
GENERATE
in_siso
<=
out_siso
;
out_sosi
<=
in_sosi
;
END
GENERATE
;
no_bypass
:
IF
g_bypass
=
FALSE
GENERATE
in_siso
<=
out_siso
;
-- pass on ready for detailed flow control per cycle
nxt_flush
<=
NOT
out_siso
.
xon
;
-- use xon for flow control at frame level
p_clk
:
PROCESS
(
clk
,
rst
)
BEGIN
IF
rst
=
'1'
THEN
flush
<=
'0'
;
out_en
<=
'1'
;
ELSIF
rising_edge
(
clk
)
THEN
flush
<=
nxt_flush
;
-- pipeline register flush to ease timing closure
out_en
<=
nxt_out_en
;
-- state register out_en because it can only change between frames
END
IF
;
END
PROCESS
;
p_out_en
:
PROCESS
(
flush
,
out_en
,
in_sosi
)
BEGIN
nxt_out_en
<=
out_en
;
IF
in_sosi
.
eop
=
'1'
THEN
IF
flush
=
'1'
THEN
nxt_out_en
<=
'0'
;
ELSE
nxt_out_en
<=
'1'
;
END
IF
;
END
IF
;
END
PROCESS
;
p_out_sosi
:
PROCESS
(
in_sosi
,
out_en
)
BEGIN
-- Pass on sosi data via wires
out_sosi
<=
in_sosi
;
-- XON/XOFF flow control via sosi control
out_sosi
.
sync
<=
in_sosi
.
sync
AND
out_en
;
out_sosi
.
valid
<=
in_sosi
.
valid
AND
out_en
;
out_sosi
.
sop
<=
in_sosi
.
sop
AND
out_en
;
out_sosi
.
eop
<=
in_sosi
.
eop
AND
out_en
;
END
PROCESS
;
END
GENERATE
;
END
ARCHITECTURE
;
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