diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index 9f679faf5..4e400886c 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -646,7 +646,9 @@ static inline ssize_t dmaGetBuffCount(int32_t fd) { */ static inline std::string dmaGetGitVersion(int32_t fd) { char gitv[32] = {0}; // Initialize with zeros to ensure null-termination - if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { return ""; } + if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { + return ""; + } gitv[32 - 1] = '\0'; // Ensure null-termination return std::string(gitv); } diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 0989ea26e..5943bcef4 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -48,7 +48,9 @@ template inline boost::python::list std_vector_to_py_list(std::vector vector) { typename std::vector::iterator iter; boost::python::list list; - for (iter = vector.begin(); iter != vector.end(); ++iter) { list.append(*iter); } + for (iter = vector.begin(); iter != vector.end(); ++iter) { + list.append(*iter); + } return list; } diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index 088b18419..e9862039d 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -273,11 +273,11 @@ class CRC { #endif #ifdef CRCPP_USE_CPP11 - CRC() = delete; - CRC(const CRC& other) = delete; + CRC() = delete; + CRC(const CRC& other) = delete; CRC& operator=(const CRC& other) = delete; CRC(CRC&& other) = delete; - CRC& operator=(CRC&& other) = delete; + CRC& operator=(CRC&& other) = delete; #endif private: @@ -553,7 +553,9 @@ inline CRCType CRC::Finalize(CRCType remainder, CRCType finalXOR, bool reflectOu static crcpp_constexpr CRCType BIT_MASK = (CRCType(1) << (CRCWidth - CRCType(1))) | ((CRCType(1) << (CRCWidth - CRCType(1))) - CRCType(1)); - if (reflectOutput) { remainder = Reflect(remainder, CRCWidth); } + if (reflectOutput) { + remainder = Reflect(remainder, CRCWidth); + } return (remainder ^ finalXOR) & BIT_MASK; } @@ -583,7 +585,9 @@ inline CRCType CRC::UndoFinalize(CRCType crc, CRCType finalXOR, bool reflectOutp crc = (crc & BIT_MASK) ^ finalXOR; - if (reflectOutput) { crc = Reflect(crc, CRCWidth); } + if (reflectOutput) { + crc = Reflect(crc, CRCWidth); + } return crc; } diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index eaf0fd480..540fc5239 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -133,7 +133,9 @@ void rha::AxiStreamDma::closeShared(rha::AxiStreamDmaSharedPtr desc) { desc->openCount--; if (desc->openCount == 0) { - if (desc->rawBuff != NULL) { dmaUnMapDma(desc->fd, desc->rawBuff); } + if (desc->rawBuff != NULL) { + dmaUnMapDma(desc->fd, desc->rawBuff); + } ::close(desc->fd); desc->fd = -1; diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index 0f3db6151..9de23e302 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -289,7 +289,9 @@ void rogue::interfaces::ZmqClientWrap::doUpdate(bp::object data) { if (bp::override f = this->get_override("_doUpdate")) { try { f(data); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } rogue::interfaces::ZmqClient::doUpdate(data); } diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index 97c8195ae..d7a967b52 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -243,7 +243,9 @@ bp::object rogue::interfaces::ZmqServerWrap::doRequest(bp::object data) { if (bp::override f = this->get_override("_doRequest")) { try { return (f(data)); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } return (rogue::interfaces::ZmqServer::doRequest(data)); } @@ -258,7 +260,9 @@ std::string rogue::interfaces::ZmqServerWrap::doString(std::string data) { if (bp::override f = this->get_override("_doString")) { try { return (f(data)); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rogue::interfaces::ZmqServer::doString(data)); diff --git a/src/rogue/interfaces/api/Bsp.cpp b/src/rogue/interfaces/api/Bsp.cpp index fa804cae4..757607377 100644 --- a/src/rogue/interfaces/api/Bsp.cpp +++ b/src/rogue/interfaces/api/Bsp.cpp @@ -56,7 +56,9 @@ ria::Bsp::Bsp(std::string modName, std::string rootClass) { } ria::Bsp::~Bsp() { - if (this->_isRoot) { this->_obj.attr("stop")(); } + if (this->_isRoot) { + this->_obj.attr("stop")(); + } } void ria::Bsp::addVarListener(void (*func)(std::string, std::string), void (*done)()) { @@ -110,14 +112,18 @@ std::shared_ptr ria::Bsp::getNode(std::string name) std::string ria::Bsp::operator()(std::string arg) { try { return (std::string(bp::extract(this->_obj.attr("callDisp")(arg)))); - } catch (...) { throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); } + } catch (...) { + throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); + } } //! Execute command operator without arg std::string ria::Bsp::operator()() { try { return (std::string(bp::extract(this->_obj.attr("callDisp")()))); - } catch (...) { throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); } + } catch (...) { + throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); + } } //! Execute command diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 931929c9f..d6d21ae87 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -191,7 +191,9 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri highByte = size_ - 1; if (type == rim::Write || type == rim::Post) { stale_ = false; - for (vit = variables_.begin(); vit != variables_.end(); ++vit) { (*vit)->stale_ = false; } + for (vit = variables_.begin(); vit != variables_.end(); ++vit) { + (*vit)->stale_ = false; + } } } else { if (type == rim::Read || type == rim::Verify) { @@ -733,7 +735,9 @@ void rim::Block::getBytes(uint8_t* data, rim::Variable* var, uint32_t index) { } // Change byte order - if (var->byteReverse_) { reverseBytes(data, var->valueBytes_); } + if (var->byteReverse_) { + reverseBytes(data, var->valueBytes_); + } } ////////////////////////////////////////// @@ -922,11 +926,15 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) if (PyArray_TYPE(arr) == NPY_UINT64) { uint64_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(uint64_t); - for (x = 0; x < dims[0]; x++) { setUInt(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setUInt(src[x * stride], var, index + x); + } } else if (PyArray_TYPE(arr) == NPY_UINT32) { uint32_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(uint32_t); - for (x = 0; x < dims[0]; x++) { setUInt(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setUInt(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setUIntPy", "Passed nparray is not of type (uint64 or uint32) for %s", @@ -1083,11 +1091,15 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) if (PyArray_TYPE(arr) == NPY_INT64) { int64_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(int64_t); - for (x = 0; x < dims[0]; x++) { setInt(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setInt(src[x * stride], var, index + x); + } } else if (PyArray_TYPE(arr) == NPY_INT32) { int32_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(int32_t); - for (x = 0; x < dims[0]; x++) { setInt(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setInt(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setIntPy", "Passed nparray is not of type (int64 or int32) for %s", @@ -1250,7 +1262,9 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) if (PyArray_TYPE(arr) == NPY_BOOL) { bool* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(bool); - for (x = 0; x < dims[0]; x++) { setBool(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setBool(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setBoolPy", "Passed nparray is not of type (bool) for %s", @@ -1460,7 +1474,9 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index if (PyArray_TYPE(arr) == NPY_FLOAT32) { float* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(float); - for (x = 0; x < dims[0]; x++) { setFloat(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setFloat(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (float32) for %s", @@ -1607,7 +1623,9 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde if (PyArray_TYPE(arr) == NPY_FLOAT64) { double* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(double); - for (x = 0; x < dims[0]; x++) { setDouble(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setDouble(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (double) for %s", @@ -1754,7 +1772,9 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index if (PyArray_TYPE(arr) == NPY_FLOAT64) { double* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(double); - for (x = 0; x < dims[0]; x++) { setFixed(src[x * stride], var, index + x); } + for (x = 0; x < dims[0]; x++) { + setFixed(src[x * stride], var, index + x); + } } else { throw(rogue::GeneralError::create("Block::setFixedPy", "Passed nparray is not of type (double) for %s", @@ -1855,7 +1875,9 @@ void rim::Block::setFixed(const double& val, rim::Variable* var, int32_t index) int64_t fPoint = static_cast(round(val * pow(2, var->binPoint_))); // Check for positive edge case uint64_t mask = 1 << (var->valueBits_ - 1); - if (val > 0 && ((fPoint & mask) != 0)) { fPoint -= 1; } + if (val > 0 && ((fPoint & mask) != 0)) { + fPoint -= 1; + } setBytes(reinterpret_cast(&fPoint), var, index); } @@ -1866,7 +1888,9 @@ double rim::Block::getFixed(rim::Variable* var, int32_t index) { getBytes(reinterpret_cast(&fPoint), var, index); // Do two-complement if negative - if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { fPoint = fPoint - (1 << var->valueBits_); } + if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { + fPoint = fPoint - (1 << var->valueBits_); + } // Convert to float tmp = static_cast(fPoint); diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index f0f431597..95c1958ef 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -181,7 +181,9 @@ void rim::HubWrap::doTransaction(rim::TransactionPtr transaction) { try { pb(transaction); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } rim::Hub::doTransaction(transaction); diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index 317a7e16f..80d4e8bf6 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -100,7 +100,9 @@ rim::TransactionPtr rim::Slave::getTransaction(uint32_t index) { // Clean up if we found an expired transaction, overtime this will clean up // the list, even if it deletes one expired transaction per call - if (exp != tranMap_.end()) { tranMap_.erase(exp); } + if (exp != tranMap_.end()) { + tranMap_.erase(exp); + } } return ret; } @@ -188,7 +190,9 @@ uint32_t rim::SlaveWrap::doMinAccess() { if (boost::python::override pb = this->get_override("_doMinAccess")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doMinAccess()); @@ -207,7 +211,9 @@ uint32_t rim::SlaveWrap::doMaxAccess() { if (boost::python::override pb = this->get_override("_doMaxAccess")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doMaxAccess()); @@ -226,7 +232,9 @@ uint64_t rim::SlaveWrap::doAddress() { if (boost::python::override pb = this->get_override("_doAddress")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doAddress()); @@ -246,7 +254,9 @@ void rim::SlaveWrap::doTransaction(rim::TransactionPtr transaction) { try { pb(transaction); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } rim::Slave::doTransaction(transaction); diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 5a8230c88..f33956335 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -109,7 +109,9 @@ rim::TransactionLockPtr rim::Transaction::lock() { //! Get expired state bool rim::Transaction::expired() { bool done = false; - if (isSubTransaction_) { done = parentTransaction_.expired(); } + if (isSubTransaction_) { + done = parentTransaction_.expired(); + } return done || (iter_ == NULL || done_); } diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 29eff3c28..a9523981c 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -623,7 +623,9 @@ void rim::VariableWrap::queueUpdate() { try { pb(); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } @@ -652,7 +654,9 @@ void rim::Variable::rateTest() { uint32_t ret; gettimeofday(&stime, NULL); - for (x = 0; x < count; ++x) { ret = getUInt(); } + for (x = 0; x < count; ++x) { + ret = getUInt(); + } gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); @@ -662,7 +666,9 @@ void rim::Variable::rateTest() { printf("\nVariable c++ get: Read %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); gettimeofday(&stime, NULL); - for (x = 0; x < count; ++x) { setUInt(x); } + for (x = 0; x < count; ++x) { + setUInt(x); + } gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index 6713079f9..2348aeefb 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -434,7 +434,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { PyObject* obj = p.ptr(); // Check that this is a PyArrayObject - if (!PyArray_Check(obj)) { throw(rogue::GeneralError("Frame::putNumpy", "Object is not a numpy array")); } + if (!PyArray_Check(obj)) { + throw(rogue::GeneralError("Frame::putNumpy", "Object is not a numpy array")); + } // Cast to an array object and check that the numpy array // data buffer is write-able and contiguous @@ -442,7 +444,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { PyArrayObject* arr = reinterpret_cast(obj); int flags = PyArray_FLAGS(arr); bool ctg = flags & (NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_F_CONTIGUOUS); - if (!ctg) { arr = PyArray_GETCONTIGUOUS(arr); } + if (!ctg) { + arr = PyArray_GETCONTIGUOUS(arr); + } // Get the number of bytes in both the source and destination buffers uint32_t size = getSize(); @@ -468,7 +472,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { ris::toFrame(beg, count, src); // If were forced to make a temporary copy, release it - if (!ctg) { Py_XDECREF(arr); } + if (!ctg) { + Py_XDECREF(arr); + } return; } diff --git a/src/rogue/interfaces/stream/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index 297d697a3..34bcff666 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -156,7 +156,9 @@ void ris::Master::equalsPy(boost::python::object p) { boost::python::extract get_master(p.attr("_getStreamMaster")()); // Test extraction - if (get_master.check()) { rMst = get_master(); } + if (get_master.check()) { + rMst = get_master(); + } } // Attempt to access object as a stream slave @@ -172,7 +174,9 @@ void ris::Master::equalsPy(boost::python::object p) { boost::python::extract get_slave(p.attr("_getStreamSlave")()); // Test extraction - if (get_slave.check()) { rSlv = get_slave(); } + if (get_slave.check()) { + rSlv = get_slave(); + } } if (rMst == NULL || rSlv == NULL || lSlv == NULL) @@ -200,7 +204,9 @@ bp::object ris::Master::rshiftPy(bp::object p) { boost::python::extract get_slave(p.attr("_getStreamSlave")()); // Test extraction - if (get_slave.check()) { slv = get_slave(); } + if (get_slave.check()) { + slv = get_slave(); + } } if (slv != NULL) diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index 5a3e0013e..e7a918a46 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -49,7 +49,9 @@ ris::Pool::Pool() { //! Destructor ris::Pool::~Pool() { - while (!dataQ_.empty()) { free(dataQ_.front()); } + while (!dataQ_.empty()) { + free(dataQ_.front()); + } } //! Get allocated memory diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index 0c6894ef7..d7504bdb6 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -115,7 +115,9 @@ void ris::SlaveWrap::acceptFrame(ris::FramePtr frame) { try { pb(frame); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } ris::Slave::acceptFrame(frame); diff --git a/src/rogue/protocols/packetizer/ControllerV1.cpp b/src/rogue/protocols/packetizer/ControllerV1.cpp index f37f9445c..659f0a6b7 100644 --- a/src/rogue/protocols/packetizer/ControllerV1.cpp +++ b/src/rogue/protocols/packetizer/ControllerV1.cpp @@ -165,7 +165,9 @@ void rpp::ControllerV1::transportRx(ris::FramePtr frame) { if (tmpEof) { tranFrame_[0]->setLastUser(tmpLuser); tranCount_[0] = 0; - if (app_[tranDest_]) { app_[tranDest_]->pushFrame(tranFrame_[0]); } + if (app_[tranDest_]) { + app_[tranDest_]->pushFrame(tranFrame_[0]); + } tranFrame_[0].reset(); // Detect SSI error diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index 1990f8d70..b9ccffd58 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -233,7 +233,9 @@ void rpp::ControllerV2::transportRx(ris::FramePtr frame) { tranFrame_[tmpDest]->setLastUser(tmpLuser); transSof_[tmpDest] = true; tranCount_[tmpDest] = 0; - if (app_[tmpDest]) { app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } + if (app_[tmpDest]) { + app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); + } tranFrame_[tmpDest].reset(); // Detect SSI error diff --git a/src/rogue/protocols/rssi/Controller.cpp b/src/rogue/protocols/rssi/Controller.cpp index ce9300d37..0da04ad32 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -236,7 +236,9 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { // Reset if (head->rst) { - if (state_ == StOpen || state_ == StWaitSyn) { stQueue_.push(head); } + if (state_ == StOpen || state_ == StWaitSyn) { + stQueue_.push(head); + } // Syn frame goes to state machine if state = open // or we are waiting for ack replay @@ -388,7 +390,9 @@ void rpr::Controller::applicationRx(ris::FramePtr frame) { flock->unlock(); // Connection is closed - if (state_ != StOpen) { return; } + if (state_ != StOpen) { + return; + } // Wait while busy either by flow control or buffer starvation while (txListCount_ >= curMaxBuffers_) { diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index 31f7ee3c9..6103b7ed4 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -132,7 +132,9 @@ uint32_t rpx::JtagDriver::cvtPerNs(Header reply) { unsigned rawVal = (reply >> XID_SHIFT) & 0xff; double tmp; - if (0 == rawVal) { return UNKNOWN_PERIOD; } + if (0 == rawVal) { + return UNKNOWN_PERIOD; + } tmp = static_cast(rawVal) * 4.0 / 256.0; @@ -150,7 +152,9 @@ unsigned rpx::JtagDriver::getMemDepth() { rpx::JtagDriver::Header rpx::JtagDriver::getHdr(uint8_t* buf) { Header hdr; memcpy(&hdr, buf, sizeof(hdr)); - if (!isLE()) { hdr = ntohl(hdr); } + if (!isLE()) { + hdr = ntohl(hdr); + } return hdr; } @@ -200,7 +204,9 @@ int rpx::JtagDriver::xferRel(uint8_t* txb, unsigned txBytes, Header* phdr, uint8 throw(rogue::GeneralError::create("JtagDriver::xferRel()", "Protocol error")); } if (xid == XID_ANY || xid == getXid(hdr)) { - if (phdr) { *phdr = hdr; } + if (phdr) { + *phdr = hdr; + } return got; } } catch (rogue::GeneralError&) {} diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index 38b0c2d6a..b8735edcc 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -93,7 +93,9 @@ void rpx::XvcConnection::fill(uint64_t n) { void rpx::XvcConnection::bump(uint64_t n) { rp_ += n; rl_ -= n; - if (rl_ == 0) { rp_ = &rxb_[0]; } + if (rl_ == 0) { + rp_ = &rxb_[0]; + } } void rpx::XvcConnection::allocBufs() { @@ -192,7 +194,9 @@ void rpx::XvcConnection::run() { fill(10); bits = 0; - for (got = 9; got >= 6; got--) { bits = (bits << 8) | rp_[got]; } + for (got = 9; got >= 6; got--) { + bits = (bits << 8) | rp_[got]; + } bytes = (bits + 7) / 8; if (bytes > maxVecLen_) @@ -209,7 +213,9 @@ void rpx::XvcConnection::run() { // bother...). for (off = 0, bitsLeft = bits; bitsLeft > 0; bitsLeft -= bitsSent, off += vecLen) { bitsSent = 8 * vecLen; - if (bitsLeft < bitsSent) { bitsSent = bitsLeft; } + if (bitsLeft < bitsSent) { + bitsSent = bitsLeft; + } drv_->sendVectors(bitsSent, rp_ + off, rp_ + bytes + off, &txb_[0] + off); } diff --git a/src/rogue/protocols/xilinx/XvcServer.cpp b/src/rogue/protocols/xilinx/XvcServer.cpp index fb3edd9dd..60d6690b0 100644 --- a/src/rogue/protocols/xilinx/XvcServer.cpp +++ b/src/rogue/protocols/xilinx/XvcServer.cpp @@ -75,7 +75,9 @@ void rpx::XvcServer::run(bool& threadEn, rogue::LoggingPtr log) { try { XvcConnection conn(sd_, drv_, maxMsgSize_); conn.run(); - } catch (rogue::GeneralError& e) { log->debug("Sub-connection failed"); } + } catch (rogue::GeneralError& e) { + log->debug("Sub-connection failed"); + } } } } diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index 1d4bd67fb..40852689d 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -198,7 +198,9 @@ void ru::Prbs::flfsr(uint8_t* data) { void ru::Prbs::runThread() { txLog_->logThreadId(); - while (threadEn_) { genFrame(txSize_); } + while (threadEn_) { + genFrame(txSize_); + } } //! Auto run data generation diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 0d76cf049..d2911e187 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -177,7 +177,9 @@ void ruf::LegacyStreamReader::runThread() { size = header & 0x0FFFFFFF; chan = header >> 28; - if (chan == 0) { size = size * 4; } + if (chan == 0) { + size = size * 4; + } // cout << "Frame with size" << size << "and channel" << chan; log.info("Got frame with header %" PRIx32 ", size %" PRIu32 " and channel %" PRIu8, header, size, chan);