Apply 'make format'
This commit is contained in:
parent
c024ff0836
commit
5901b82bed
|
|
@ -72,7 +72,8 @@ void VerilatedSaifActivityVar::emitBit(const uint64_t time, const CData newval)
|
|||
}
|
||||
|
||||
VL_ATTR_ALWINLINE
|
||||
void VerilatedSaifActivityVar::emitWData(const uint64_t time, const WData* newvalp, const uint32_t bits) {
|
||||
void VerilatedSaifActivityVar::emitWData(const uint64_t time, const WData* newvalp,
|
||||
const uint32_t bits) {
|
||||
assert(m_lastTime <= time);
|
||||
const uint64_t dt = time - m_lastTime;
|
||||
for (std::size_t i = 0; i < std::min(m_width, bits); ++i) {
|
||||
|
|
@ -121,7 +122,7 @@ void VerilatedSaif::open(const char* filename) VL_MT_SAFE_EXCLUDES(m_mutex) {
|
|||
if (isOpen()) return;
|
||||
|
||||
// Set member variables
|
||||
m_filename = filename; // "" is ok, as someone may overload open
|
||||
m_filename = filename; // "" is ok, as someone may overload open
|
||||
|
||||
initializeSaifFileContents();
|
||||
|
||||
|
|
@ -144,9 +145,7 @@ void VerilatedSaif::initializeSaifFileContents() {
|
|||
printStr(")\n");
|
||||
}
|
||||
|
||||
bool VerilatedSaif::preChangeDump() {
|
||||
return isOpen();
|
||||
}
|
||||
bool VerilatedSaif::preChangeDump() { return isOpen(); }
|
||||
|
||||
void VerilatedSaif::emitTimeChange(uint64_t timeui) { m_time = timeui; }
|
||||
|
||||
|
|
@ -359,8 +358,9 @@ void VerilatedSaif::popPrefix() {
|
|||
m_prefixStack.pop_back();
|
||||
}
|
||||
|
||||
void VerilatedSaif::declare(const uint32_t code, const char* name, const char* wirep, const bool array,
|
||||
const int arraynum, const bool bussed, const int msb, const int lsb) {
|
||||
void VerilatedSaif::declare(const uint32_t code, const char* name, const char* wirep,
|
||||
const bool array, const int arraynum, const bool bussed, const int msb,
|
||||
const int lsb) {
|
||||
const int bits = ((msb > lsb) ? (msb - lsb) : (lsb - msb)) + 1;
|
||||
|
||||
const std::string hierarchicalName = m_prefixStack.back().first + name;
|
||||
|
|
@ -390,35 +390,41 @@ void VerilatedSaif::declare(const uint32_t code, const char* name, const char* w
|
|||
m_activityArena.back().data() + bitsIdx});
|
||||
}
|
||||
|
||||
void VerilatedSaif::declEvent(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum) {
|
||||
void VerilatedSaif::declEvent(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum) {
|
||||
declare(code, name, "event", array, arraynum, false, 0, 0);
|
||||
}
|
||||
|
||||
void VerilatedSaif::declBit(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum) {
|
||||
void VerilatedSaif::declBit(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum) {
|
||||
declare(code, name, "wire", array, arraynum, false, 0, 0);
|
||||
}
|
||||
void VerilatedSaif::declBus(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
void VerilatedSaif::declBus(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, true, msb, lsb);
|
||||
}
|
||||
void VerilatedSaif::declQuad(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
void VerilatedSaif::declQuad(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, true, msb, lsb);
|
||||
}
|
||||
void VerilatedSaif::declArray(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
void VerilatedSaif::declArray(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum, const int msb, const int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, true, msb, lsb);
|
||||
}
|
||||
void VerilatedSaif::declDouble(const uint32_t code, const uint32_t fidx, const char* name, const int dtypenum,
|
||||
const VerilatedTraceSigDirection, const VerilatedTraceSigKind,
|
||||
const VerilatedTraceSigType, const bool array, const int arraynum) {
|
||||
void VerilatedSaif::declDouble(const uint32_t code, const uint32_t fidx, const char* name,
|
||||
const int dtypenum, const VerilatedTraceSigDirection,
|
||||
const VerilatedTraceSigKind, const VerilatedTraceSigType,
|
||||
const bool array, const int arraynum) {
|
||||
declare(code, name, "real", array, arraynum, false, 63, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ class VerilatedSaifFile;
|
|||
|
||||
class VerilatedSaifActivityBit final {
|
||||
// MEMBERS
|
||||
bool m_lastVal = false; // last emitted activity bit value
|
||||
uint64_t m_highTime = 0; // total time when bit was high
|
||||
size_t m_transitions = 0; // total number of bit transitions
|
||||
bool m_lastVal = false; // last emitted activity bit value
|
||||
uint64_t m_highTime = 0; // total time when bit was high
|
||||
size_t m_transitions = 0; // total number of bit transitions
|
||||
|
||||
public:
|
||||
// METHODS
|
||||
|
|
@ -60,9 +60,9 @@ public:
|
|||
|
||||
class VerilatedSaifActivityVar final {
|
||||
// MEMBERS
|
||||
uint64_t m_lastTime{0}; // last time when variable value was updated
|
||||
VerilatedSaifActivityBit* m_bits; // pointer to variable bits objects
|
||||
uint32_t m_width; // width of variable (in bits)
|
||||
uint64_t m_lastTime{0}; // last time when variable value was updated
|
||||
VerilatedSaifActivityBit* m_bits; // pointer to variable bits objects
|
||||
uint32_t m_width; // width of variable (in bits)
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
|
|
@ -106,10 +106,11 @@ private:
|
|||
|
||||
class VerilatedSaifActivityScope final {
|
||||
// MEMBERS
|
||||
std::string m_scopeName{}; // name of the activity scope
|
||||
std::vector<int32_t> m_childScopesIndices{}; // array indices of child scopes
|
||||
std::vector<std::pair<uint32_t, std::string>> m_childActivities{}; // children signals codes mapped to their names in the current scope
|
||||
int32_t m_parentScopeIndex{-1}; // array index of parent scope
|
||||
std::string m_scopeName{}; // name of the activity scope
|
||||
std::vector<int32_t> m_childScopesIndices{}; // array indices of child scopes
|
||||
std::vector<std::pair<uint32_t, std::string>>
|
||||
m_childActivities{}; // children signals codes mapped to their names in the current scope
|
||||
int32_t m_parentScopeIndex{-1}; // array index of parent scope
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
|
|
@ -165,16 +166,18 @@ private:
|
|||
bool m_isOpen = false; // True indicates open file
|
||||
std::string m_filename; // Filename we're writing to (if open)
|
||||
|
||||
int m_indent = 0; // indentation size in spaces
|
||||
int m_indent = 0; // indentation size in spaces
|
||||
|
||||
int32_t m_currentScope{-1}; // currently active scope
|
||||
std::vector<VerilatedSaifActivityScope> m_scopes{}; // array of declared scopes
|
||||
std::vector<int32_t> m_topScopes{}; // array of top scopes
|
||||
int32_t m_currentScope{-1}; // currently active scope
|
||||
std::vector<VerilatedSaifActivityScope> m_scopes{}; // array of declared scopes
|
||||
std::vector<int32_t> m_topScopes{}; // array of top scopes
|
||||
|
||||
std::unordered_map<uint32_t, VerilatedSaifActivityVar> m_activity; // map of variables codes mapped to their activity objects
|
||||
std::vector<std::vector<VerilatedSaifActivityBit>> m_activityArena; // memory pool for signals bits objects
|
||||
std::unordered_map<uint32_t, VerilatedSaifActivityVar>
|
||||
m_activity; // map of variables codes mapped to their activity objects
|
||||
std::vector<std::vector<VerilatedSaifActivityBit>>
|
||||
m_activityArena; // memory pool for signals bits objects
|
||||
|
||||
uint64_t m_time{0}; // total time of the currently traced simulation
|
||||
uint64_t m_time{0}; // total time of the currently traced simulation
|
||||
|
||||
// stack of declared scopes combined names
|
||||
std::vector<std::pair<std::string, VerilatedTracePrefixType>> m_prefixStack{
|
||||
|
|
@ -238,7 +241,8 @@ public:
|
|||
|
||||
// ACCESSORS
|
||||
// Set size in bytes after which new file should be created.
|
||||
void rolloverSize(uint64_t size) VL_MT_SAFE { /* noop */ }
|
||||
void rolloverSize(uint64_t size) VL_MT_SAFE { /* noop */
|
||||
}
|
||||
|
||||
// METHODS - All must be thread safe
|
||||
// Open the file; call isOpen() to see if errors
|
||||
|
|
@ -378,7 +382,8 @@ public:
|
|||
/// "cat" to be used to combine the header plus any number of data files.
|
||||
void openNext(bool incFilename = true) VL_MT_SAFE { m_sptrace.openNext(incFilename); }
|
||||
|
||||
void rolloverSize(size_t size) VL_MT_SAFE { /* noop */ }
|
||||
void rolloverSize(size_t size) VL_MT_SAFE { /* noop */
|
||||
}
|
||||
|
||||
/// Close dump
|
||||
void close() VL_MT_SAFE {
|
||||
|
|
|
|||
Loading…
Reference in New Issue