v1.0.0-rc.72
This commit is contained in:
@@ -120,7 +120,7 @@ void HLSDevice::CreateJFPacket(uint64_t frame_number, uint32_t eth_packet,
|
||||
for (int i = 0; i < 6; i++)
|
||||
packet->dest_mac[i] = (tmp_mac >> (8*i)) % 256;
|
||||
|
||||
uint32_t half_module = 2 * module_number | ((eth_packet >= 64) ? 1 : 0);
|
||||
uint32_t half_module = ((eth_packet >= 64) ? 1 : 0);
|
||||
|
||||
packet->ipv4_header_h = htons(0x4500); // Big endian in IP header!
|
||||
packet->ipv4_header_total_length = htons(8268); // Big endian in IP header!
|
||||
@@ -129,7 +129,7 @@ void HLSDevice::CreateJFPacket(uint64_t frame_number, uint32_t eth_packet,
|
||||
packet->ipv4_header_ttl_protocol = htons(0x0011);
|
||||
packet->ipv4_header_checksum = checksum( (uint16_t *) (buff.data() + 14), 20); // checksum is already in network order
|
||||
|
||||
packet->udp_dest_port = htons(234); // port doesn't matter
|
||||
packet->udp_dest_port = htons(2 * module_number + half_module);
|
||||
packet->udp_sour_port = htons(0xDFAC);
|
||||
packet->udp_length = htons(8248);
|
||||
|
||||
@@ -172,7 +172,7 @@ void HLSDevice::CreateEIGERPacket(uint64_t frame_number,
|
||||
packet->ipv4_header_ttl_protocol = htons(0x0011);
|
||||
packet->ipv4_header_checksum = checksum( (uint16_t *) (buff.data() + 14), 20); // checksum is already in network order
|
||||
|
||||
packet->udp_dest_port = htons(234); // ignored
|
||||
packet->udp_dest_port = htons(2 * module_number + row);
|
||||
packet->udp_sour_port = htons(0xDFAC);
|
||||
packet->udp_length = htons(4152);
|
||||
|
||||
@@ -180,7 +180,7 @@ void HLSDevice::CreateEIGERPacket(uint64_t frame_number,
|
||||
packet->eiger.detectortype = SLS_DETECTOR_TYPE_EIGER;
|
||||
packet->eiger.timestamp = 0xABCDEF0000FEDCBAL;
|
||||
packet->eiger.bunchid = 0x1234567898765431L;
|
||||
packet->eiger.row = (2 * module_number) | (row % 2);
|
||||
packet->eiger.row = (row % 2);
|
||||
packet->eiger.column = col % 2;
|
||||
packet->eiger.framenum = frame_number;
|
||||
packet->eiger.packetnum = eth_packet % 128;
|
||||
@@ -283,7 +283,7 @@ void HLSDevice::HLSMainThread() {
|
||||
|
||||
std::vector<std::thread> hls_cores;
|
||||
|
||||
STREAM_512 ip1("ip1"), udp1("udp1"), udp2("udp2"), icmp1("icmp1"), arp1("arp1");
|
||||
STREAM_512 ip1("ip1"), udp1("udp1"), udp2("udp2"), icmp1("icmp1"), arp1("arp1"), ptp1("ptp1");
|
||||
|
||||
STREAM_768 stream_768_00("stream_768_00");
|
||||
STREAM_768 stream_768_01("stream_768_01");
|
||||
@@ -416,7 +416,8 @@ void HLSDevice::HLSMainThread() {
|
||||
if (impl_->din_eth.empty())
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(10));
|
||||
else
|
||||
ethernet(impl_->din_eth, ip1, arp1, mac_addr, 1, 0, eth_packets, clear_counters);
|
||||
ethernet(impl_->din_eth, ip1, arp1, ptp1,
|
||||
mac_addr, 1, 0, eth_packets, clear_counters);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -442,12 +443,13 @@ void HLSDevice::HLSMainThread() {
|
||||
|
||||
hls_cores.emplace_back([&] {
|
||||
ap_uint<1> sls_idle = 1;
|
||||
|
||||
while (!done || !sls_idle) {
|
||||
if (udp2.empty())
|
||||
std::this_thread::sleep_for(std::chrono::microseconds (10));
|
||||
else
|
||||
sls_detector(udp2, udp_metadata, data_0, addr0, sls_packets, udp_eth_err, udp_len_err, current_pulse_id,
|
||||
clear_counters, sls_idle);
|
||||
cfg.data_stream, clear_counters, sls_idle);
|
||||
}
|
||||
sls_done = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user