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
dde6b67f
Commit
dde6b67f
authored
9 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Added tc_compaan_unb1_dp_offload_bg_lb_dop17.py.
parent
93167355
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/compaan/designs/compaan_unb1_dp_offload/tb/python/tc_compaan_unb1_dp_offload_bg_lb_dop17.py
+78
-0
78 additions, 0 deletions
...fload/tb/python/tc_compaan_unb1_dp_offload_bg_lb_dop17.py
with
78 additions
and
0 deletions
applications/compaan/designs/compaan_unb1_dp_offload/tb/python/tc_compaan_unb1_dp_offload_bg_lb_dop17.py
0 → 100644
+
78
−
0
View file @
dde6b67f
#! /usr/bin/env python
###############################################################################
#
# Copyright (dC) 2015
# 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: Stream BG data from FN1 to FN0, forward this data from FN0 to dop17
# Description:
# . BG outputs blocks of 365 32b words = 1460 bytes;
# . BG uses inter-block gap size of 9*365 words to limit BG output rate to
# 1/10th of max
# . BG theoretical max output rate is 200MHz*32b = 6.4Gbps
# . The above translates to an ethernet data rate of about (6.4Gbps/10) 640Mbps
# (excluding packet overhead).
# Usage: python tc_compaan_unb1_dp_offload_bg_lb.py --unb # --fn 0,1
# . Use tcpdump to view the received packets.
from
common
import
*
import
test_case
import
node_io
import
pi_dp_offload_tx_hdr_dat_unb_dp_offload
import
pi_diag_block_gen
import
pi_eth
###############################################################################
# Setup
###############################################################################
tc
=
test_case
.
Testcase
(
'
TB -
'
,
''
)
c_bg_nof_streams
=
1
c_bg_ram_size
=
512
# Only the first 375 words are output
io
=
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
c_eth_dst_mac
=
0x2286080000
+
tc
.
unbNrs
[
0
]
*
0x100
c_eth_dst_ip
=
0x0A630000
+
tc
.
unbNrs
[
0
]
*
0x100
eth
=
pi_eth
.
PiEth
(
tc
,
io
)
dpotx_hdr_dat
=
pi_dp_offload_tx_hdr_dat_unb_dp_offload
.
PiDpOffloadTxHdrDatUnbDpOffload
(
tc
,
io
,
nof_inst
=
1
)
bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
c_bg_nof_streams
,
c_bg_ram_size
,
tc
.
nodeFn1Nrs
)
# Enable the UDP port on the 1GbE RX side for stream 0
eth
.
write_udp_port_en
(
0
)
# From BG to LB: set dst MAC and IP of node[1] to MAC and IP of node[0]
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
eth_dst_mac
'
,
c_eth_dst_mac
+
0
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_ip
'
,
c_eth_dst_ip
+
0
+
1
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
## From LB to DOP17
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
0
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
eth_dst_mac
'
,
0x0030482D82A1
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
0
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_addr
'
,
0x0A6300FE
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
# Enable the blockgenerator
bg
.
write_enable
()
###############################################################################
# end
###############################################################################
tc
.
set_section_id
(
''
)
tc
.
append_log
(
0
,
'
>>> Test Case result: %s
'
%
tc
.
get_result
())
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