AcquisitionDevice: IPv4 address and UDP destination port is property of the device and not of a particular run
This commit is contained in:
@@ -87,7 +87,7 @@ void HLSSimulatedDevice::CreatePacketJF(const DiffractionExperiment& experiment,
|
||||
|
||||
packet->ipv4_header_h = htons(0x4500); // Big endian in IP header!
|
||||
packet->ipv4_header_total_length = htons(8268); // Big endian in IP header!
|
||||
packet->ipv4_header_dest_ip = experiment.GetDestIPv4Address(data_stream);
|
||||
packet->ipv4_header_dest_ip = fpga_ipv4_addr;
|
||||
packet->ipv4_header_sour_ip = experiment.GetSrcIPv4Address(data_stream, half_module);
|
||||
|
||||
packet->ipv4_header_ttl_protocol = htons(0x0011);
|
||||
@@ -158,7 +158,7 @@ void HLSSimulatedDevice::HW_StartAction() {
|
||||
(hbm256_t *) (hbm_memory[9].data()),
|
||||
(hbm256_t *) (hbm_memory[10].data()),
|
||||
(hbm256_t *) (hbm_memory[11].data()),
|
||||
din_eth, dout_eth, fpga_mac_addr, cfg,
|
||||
din_eth, dout_eth, fpga_mac_addr, fpga_ipv4_addr, cfg,
|
||||
work_request_stream,
|
||||
completion_stream,
|
||||
run_data_collection,
|
||||
@@ -219,6 +219,7 @@ void hls_action(hls::stream<axis_datamover_ctrl> &in_datamover_cmd_stream,
|
||||
hbm256_t *d_hbm_p10, hbm256_t *d_hbm_p11,
|
||||
AXI_STREAM &din_eth, AXI_STREAM &dout_eth,
|
||||
uint64_t fpga_mac_addr,
|
||||
uint32_t fpga_ipv4_addr,
|
||||
const ActionConfig &act_reg,
|
||||
hls::stream<ap_uint<32> > &s_axis_work_request,
|
||||
hls::stream<ap_uint<32> > &m_axis_completion,
|
||||
@@ -271,19 +272,19 @@ void hls_action(hls::stream<axis_datamover_ctrl> &in_datamover_cmd_stream,
|
||||
ethernet(din_eth, ip1, arp1, fpga_mac_addr, eth_packets, clear_counters);
|
||||
|
||||
while(!ip1.empty())
|
||||
ipv4(ip1, udp1, icmp1, act_reg.fpga_ipv4_addr);
|
||||
ipv4(ip1, udp1, icmp1, fpga_ipv4_addr);
|
||||
|
||||
arp(arp1,
|
||||
dout_eth,
|
||||
fpga_mac_addr,
|
||||
act_reg.fpga_ipv4_addr,
|
||||
fpga_ipv4_addr,
|
||||
1, run_data_collection);
|
||||
|
||||
while (!arp1.empty()) {
|
||||
arp(arp1,
|
||||
dout_eth,
|
||||
fpga_mac_addr,
|
||||
act_reg.fpga_ipv4_addr,
|
||||
fpga_ipv4_addr,
|
||||
1, run_data_collection);
|
||||
}
|
||||
|
||||
@@ -291,7 +292,7 @@ void hls_action(hls::stream<axis_datamover_ctrl> &in_datamover_cmd_stream,
|
||||
arp(arp1,
|
||||
dout_eth,
|
||||
fpga_mac_addr,
|
||||
act_reg.fpga_ipv4_addr,
|
||||
fpga_ipv4_addr,
|
||||
0, run_data_collection);
|
||||
|
||||
while(!icmp1.empty())
|
||||
@@ -314,7 +315,7 @@ void hls_action(hls::stream<axis_datamover_ctrl> &in_datamover_cmd_stream,
|
||||
idle_data_collection,
|
||||
act_reg.mode,
|
||||
act_reg.one_over_energy,
|
||||
act_reg.frames_internal_packet_gen,
|
||||
act_reg.nframes,
|
||||
act_reg.nmodules,
|
||||
act_reg.nstorage_cells);
|
||||
run_data_collection = 0;
|
||||
@@ -398,6 +399,10 @@ void hls_action(hls::stream<axis_datamover_ctrl> &in_datamover_cmd_stream,
|
||||
|
||||
}
|
||||
|
||||
uint32_t HLSSimulatedDevice::HW_GetIPv4Address() const {
|
||||
return fpga_ipv4_addr;
|
||||
}
|
||||
|
||||
uint64_t HLSSimulatedDevice::HW_GetMACAddress() const {
|
||||
return fpga_mac_addr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user