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
f56536fc
Commit
f56536fc
authored
9 years ago
by
Reinier van der Walle
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
b661ed37
Branches
Branches containing commit
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_10g_bg_db/tb/python/tc_compaan_unb1_10g_bg_db.py
+18
-2
18 additions, 2 deletions
...aan_unb1_10g_bg_db/tb/python/tc_compaan_unb1_10g_bg_db.py
with
18 additions
and
2 deletions
applications/compaan/designs/compaan_unb1_10g_bg_db/tb/python/tc_compaan_unb1_10g_bg_db.py
+
18
−
2
View file @
f56536fc
...
@@ -40,6 +40,7 @@ from common import *
...
@@ -40,6 +40,7 @@ from common import *
import
test_case
import
test_case
import
node_io
import
node_io
import
pi_dp_offload_tx_hdr_dat_compaan_unb1_10g_bg_db
import
pi_dp_offload_tx_hdr_dat_compaan_unb1_10g_bg_db
import
pi_dp_offload_rx_hdr_fields_compaan_unb1_10g_bg_db
import
pi_diag_block_gen
import
pi_diag_block_gen
import
pi_diag_data_buffer
import
pi_diag_data_buffer
import
pi_eth
import
pi_eth
...
@@ -58,6 +59,9 @@ c_write_block_gen = True
...
@@ -58,6 +59,9 @@ c_write_block_gen = True
tc
=
test_case
.
Testcase
(
'
TB -
'
,
''
)
tc
=
test_case
.
Testcase
(
'
TB -
'
,
''
)
io
=
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
io
=
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
# rx fields reg
rx_filter_hdr
=
pi_dp_offload_rx_hdr_fields_compaan_unb1_10g_bg_db
.
PiDpOffloadRxFilterHdrFieldsCompaanUnb110gBgDb
(
tc
,
io
,
nof_inst
=
1
)
# Instantiate 10G offload objects: FN0=[0], FN1=[1]
# Instantiate 10G offload objects: FN0=[0], FN1=[1]
dpotx_hdr_dat
=
pi_dp_offload_tx_hdr_dat_compaan_unb1_10g_bg_db
.
PiDpOffloadTxHdrDatCompaanUnb110GBgDb
(
tc
,
io
,
nof_inst
=
1
)
dpotx_hdr_dat
=
pi_dp_offload_tx_hdr_dat_compaan_unb1_10g_bg_db
.
PiDpOffloadTxHdrDatCompaanUnb110GBgDb
(
tc
,
io
,
nof_inst
=
1
)
...
@@ -69,7 +73,7 @@ db = pi_diag_data_buffer.PiDiagDataBuffer(tc, io, instanceName = '', nofStreams=
...
@@ -69,7 +73,7 @@ db = pi_diag_data_buffer.PiDiagDataBuffer(tc, io, instanceName = '', nofStreams=
# MAC Addresses
# MAC Addresses
eth_src_mac
=
0x2286080008
# 10G MAC base address for UniBoard
eth_src_mac
=
0x2286080008
# 10G MAC base address for UniBoard
eth_dst_mac
=
0x074306C700
# 10G MAC address jop63
eth_dst_mac
=
0x074306C700
#+ 1
# 10G MAC address jop63
# Fixed header constants
# Fixed header constants
IP_HEADER_LENGTH
=
20
IP_HEADER_LENGTH
=
20
...
@@ -96,7 +100,7 @@ ip_header_checksum = 0 # to be calculated
...
@@ -96,7 +100,7 @@ ip_header_checksum = 0 # to be calculated
#ip_src_addr_fn1 = 0xc0a80165 # 0xc0a80165 = 192.168.1.101
#ip_src_addr_fn1 = 0xc0a80165 # 0xc0a80165 = 192.168.1.101
ip_src_addr_fn2
=
0xc0a80166
# 0xc0a80164 = 192.168.1.102
ip_src_addr_fn2
=
0xc0a80166
# 0xc0a80164 = 192.168.1.102
ip_src_addr_fn3
=
0xc0a80167
# 0xc0a80165 = 192.168.1.103
ip_src_addr_fn3
=
0xc0a80167
# 0xc0a80165 = 192.168.1.103
ip_dst_addr
=
0xc0a80102
# 0xc0a80102 = 192.168.1.2 = IP-address 10G in jop63
ip_dst_addr
=
0xc0a80102
#+ 1
# 0xc0a80102 = 192.168.1.2 = IP-address 10G in jop63
###############################################################################
###############################################################################
# Calculate and print the IP header checksum for FN0
# Calculate and print the IP header checksum for FN0
...
@@ -173,6 +177,18 @@ dpotx_hdr_dat.write(node_nrs=tc.nodeNrs[1], inst_nrs=tc.gpNumbers, registers=[('
...
@@ -173,6 +177,18 @@ dpotx_hdr_dat.write(node_nrs=tc.nodeNrs[1], inst_nrs=tc.gpNumbers, registers=[('
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_addr
'
,
ip_dst_addr
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_addr
'
,
ip_dst_addr
)],
regmap
=
dpotx_hdr_dat
.
regmap
)
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_header_checksum
'
,
ip_hdr_checksum
(
hdr_bytes_fn3
))],
regmap
=
dpotx_hdr_dat
.
regmap
)
dpotx_hdr_dat
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_header_checksum
'
,
ip_hdr_checksum
(
hdr_bytes_fn3
))],
regmap
=
dpotx_hdr_dat
.
regmap
)
# Configure rx filter
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
eth_dst_mac
'
,
eth_dst_mac
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_addr
'
,
ip_dst_addr
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
udp_dst_port
'
,
4000
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_total_length
'
,
ip_total_length
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
eth_dst_mac_ena
'
,
0
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_dst_addr_ena
'
,
0
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
ip_total_length_ena
'
,
1
)],
regmap
=
rx_filter_hdr
.
regmap
)
rx_filter_hdr
.
write
(
node_nrs
=
tc
.
nodeNrs
[
1
],
inst_nrs
=
tc
.
gpNumbers
,
registers
=
[(
'
udp_dst_port_ena
'
,
1
)],
regmap
=
rx_filter_hdr
.
regmap
)
################################################################################
################################################################################
##
##
...
...
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