FPGA: load calibration works as dedicated function of the card
This commit is contained in:
@@ -31,7 +31,7 @@ PCIExpressDevice::PCIExpressDevice(const std::string &device_name, uint16_t data
|
||||
|
||||
uint32_t num_buf = GetNumKernelBuffers();
|
||||
|
||||
if (num_buf < max_modules * (3 + 3 * 16) + 2)
|
||||
if (num_buf < max_modules * (3 + 3 * 16))
|
||||
throw JFJochException(JFJochExceptionCategory::PCIeError,
|
||||
"Need to increase number of host-device buffers");
|
||||
|
||||
@@ -211,3 +211,13 @@ void PCIExpressDevice::HW_ReadInternalPacketGen(uint16_t *tmp) const {
|
||||
throw JFJochException(JFJochExceptionCategory::PCIeError,
|
||||
"Failed getting internal packet generator frame", errno);
|
||||
}
|
||||
|
||||
void PCIExpressDevice::HW_LoadCalibration(uint32_t in_modules, uint32_t in_storage_cells) {
|
||||
ActionConfig config{
|
||||
.nmodules = in_modules,
|
||||
.nstorage_cells = in_storage_cells
|
||||
};
|
||||
if (ioctl(fd, IOCTL_JFJOCH_LOAD_CALIB, &config) != 0)
|
||||
throw JFJochException(JFJochExceptionCategory::PCIeError,
|
||||
"Failed writing config", errno);
|
||||
}
|
||||
Reference in New Issue
Block a user