static uint32_t readXLinkDirectionAndNetworkReg(const Node *node, const XLink &xLink) { unsigned value = 0; unsigned directionBits = getDirectionBits(node); setBitRange(value, xLink.getNetwork(), 5, 4); setBitRange(value, xLink.getDirection(), 8 + directionBits + 1, 8); return value; }