Apply 'make format'

This commit is contained in:
github action 2022-09-05 22:43:09 +00:00
parent 1af046986d
commit e94cdcf29c

View File

@ -446,21 +446,21 @@ static inline void VL_ASSIGNBIT_WO(int bit, WDataOutP owp) VL_MT_SAFE {
{ (vvar) = VL_CLEAN_QQ((obits), (obits), (svar).read().to_uint64()); } { (vvar) = VL_CLEAN_QQ((obits), (obits), (svar).read().to_uint64()); }
#define VL_ASSIGN_WSB(obits, owp, svar) \ #define VL_ASSIGN_WSB(obits, owp, svar) \
{ \ { \
const int words = VL_WORDS_I(obits); \ const int words = VL_WORDS_I(obits); \
sc_biguint<(obits)> _butemp = (svar).read(); \ sc_biguint<(obits)> _butemp = (svar).read(); \
uint32_t* chunk = _butemp.get_raw(); \ uint32_t* chunk = _butemp.get_raw(); \
int32_t lsb = 0; \ int32_t lsb = 0; \
while (lsb < obits - BITS_PER_DIGIT) { \ while (lsb < obits - BITS_PER_DIGIT) { \
const uint32_t data = *chunk; \ const uint32_t data = *chunk; \
++chunk; \ ++chunk; \
_vl_insert_WI(owp.data(), data, lsb+BITS_PER_DIGIT-1, lsb); \ _vl_insert_WI(owp.data(), data, lsb + BITS_PER_DIGIT - 1, lsb); \
lsb += BITS_PER_DIGIT; \ lsb += BITS_PER_DIGIT; \
} \ } \
if (lsb < obits) { \ if (lsb < obits) { \
const uint32_t msb_data = *chunk; \ const uint32_t msb_data = *chunk; \
_vl_insert_WI(owp.data(), msb_data, obits-1, lsb); \ _vl_insert_WI(owp.data(), msb_data, obits - 1, lsb); \
} \ } \
(owp)[words - 1] &= VL_MASK_E(obits); \ (owp)[words - 1] &= VL_MASK_E(obits); \
} }
// Copying verilog format from systemc integers and bit vectors. // Copying verilog format from systemc integers and bit vectors.
@ -499,24 +499,25 @@ static inline void VL_ASSIGNBIT_WO(int bit, WDataOutP owp) VL_MT_SAFE {
{ (svar).write(rd); } { (svar).write(rd); }
#define VL_ASSIGN_SBQ(obits, svar, rd) \ #define VL_ASSIGN_SBQ(obits, svar, rd) \
{ (svar).write(rd); } { (svar).write(rd); }
#define VL_SC_BITS_PER_DIGIT 30 // This comes from sc_nbdefs.h BITS_PER_DIGIT #define VL_SC_BITS_PER_DIGIT 30 // This comes from sc_nbdefs.h BITS_PER_DIGIT
#define VL_ASSIGN_SBW(obits, svar, rwp) \ #define VL_ASSIGN_SBW(obits, svar, rwp) \
{ \ { \
sc_biguint<(obits)> _butemp; \ sc_biguint<(obits)> _butemp; \
int32_t lsb = 0; \ int32_t lsb = 0; \
uint32_t* chunk = _butemp.get_raw(); \ uint32_t* chunk = _butemp.get_raw(); \
while (lsb + VL_SC_BITS_PER_DIGIT < (obits)) { \ while (lsb + VL_SC_BITS_PER_DIGIT < (obits)) { \
static_assert(std::is_same<IData, EData>::value, "IData and EData missmatch"); \ static_assert(std::is_same<IData, EData>::value, "IData and EData missmatch"); \
const uint32_t data = VL_SEL_IWII(lsb+VL_SC_BITS_PER_DIGIT+1, (rwp).data(), lsb, VL_SC_BITS_PER_DIGIT); \ const uint32_t data = VL_SEL_IWII(lsb + VL_SC_BITS_PER_DIGIT + 1, (rwp).data(), lsb, \
*chunk = data & VL_MASK_E(VL_SC_BITS_PER_DIGIT); \ VL_SC_BITS_PER_DIGIT); \
++chunk; \ *chunk = data & VL_MASK_E(VL_SC_BITS_PER_DIGIT); \
lsb += VL_SC_BITS_PER_DIGIT; \ ++chunk; \
} \ lsb += VL_SC_BITS_PER_DIGIT; \
if (lsb < (obits)) { \ } \
const uint32_t msb_data = VL_SEL_IWII((obits)+1, (rwp).data(), lsb, (obits) - lsb); \ if (lsb < (obits)) { \
*chunk = msb_data & VL_MASK_E((obits) - lsb); \ const uint32_t msb_data = VL_SEL_IWII((obits) + 1, (rwp).data(), lsb, (obits)-lsb); \
} \ *chunk = msb_data & VL_MASK_E((obits)-lsb); \
(svar).write(_butemp); \ } \
(svar).write(_butemp); \
} }
//=================================================================== //===================================================================