Skip to content
Snippets Groups Projects
Commit bb00f567 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Removed clutter code.

parent c4ad9a01
No related branches found
No related tags found
No related merge requests found
......@@ -43,41 +43,26 @@ 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 365 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
# Instantiate testcase, IO and peripheral classes
tc = test_case.Testcase('TB - ', '')
io = node_io.NodeIO(tc.nodeImages, tc.base_ip)
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 )
bg = pi_diag_block_gen.PiDiagBlockGen(tc, io, 1, 512, tc.nodeFn1Nrs )
# Enable the UDP port on the 1GbE RX side for stream 0
# LB: 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]
# BG -> LB: set dst MAC and IP of node[1] to MAC and IP of node[0]
c_eth_dst_mac = 0x2286080000 + tc.unbNrs[0]*0x100
c_eth_dst_ip = 0x0A630000 + tc.unbNrs[0]*0x100
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
# LB -> 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())
# BG: Enable the blockgenerator
bg.write_enable()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment