mirror of
https://github.com/verilator/verilator.git
synced 2026-09-01 18:36:28 +02:00
Associate trace codes with function indices (#4610)
For each traced variable, also register the trace function index that will write it.
This commit is contained in:
+13
-10
@@ -520,32 +520,35 @@ void VerilatedVcd::declare(uint32_t code, const char* name, const char* wirep, b
|
||||
m_namemapp->emplace(hiername, decl);
|
||||
}
|
||||
|
||||
void VerilatedVcd::declEvent(uint32_t code, const char* name, bool array, int arraynum) {
|
||||
void VerilatedVcd::declEvent(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum) {
|
||||
declare(code, name, "event", array, arraynum, false, false, 0, 0);
|
||||
}
|
||||
void VerilatedVcd::declBit(uint32_t code, const char* name, bool array, int arraynum) {
|
||||
void VerilatedVcd::declBit(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum) {
|
||||
declare(code, name, "wire", array, arraynum, false, false, 0, 0);
|
||||
}
|
||||
void VerilatedVcd::declBus(uint32_t code, const char* name, bool array, int arraynum, int msb,
|
||||
int lsb) {
|
||||
void VerilatedVcd::declBus(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum, int msb, int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, false, true, msb, lsb);
|
||||
}
|
||||
void VerilatedVcd::declQuad(uint32_t code, const char* name, bool array, int arraynum, int msb,
|
||||
int lsb) {
|
||||
void VerilatedVcd::declQuad(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum, int msb, int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, false, true, msb, lsb);
|
||||
}
|
||||
void VerilatedVcd::declArray(uint32_t code, const char* name, bool array, int arraynum, int msb,
|
||||
int lsb) {
|
||||
void VerilatedVcd::declArray(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum, int msb, int lsb) {
|
||||
declare(code, name, "wire", array, arraynum, false, true, msb, lsb);
|
||||
}
|
||||
void VerilatedVcd::declDouble(uint32_t code, const char* name, bool array, int arraynum) {
|
||||
void VerilatedVcd::declDouble(uint32_t code, uint32_t fidx, const char* name, bool array,
|
||||
int arraynum) {
|
||||
declare(code, name, "real", array, arraynum, false, false, 63, 0);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Get/commit trace buffer
|
||||
|
||||
VerilatedVcd::Buffer* VerilatedVcd::getTraceBuffer() {
|
||||
VerilatedVcd::Buffer* VerilatedVcd::getTraceBuffer(uint32_t fidx) {
|
||||
VerilatedVcd::Buffer* const bufp = new Buffer{*this};
|
||||
if (parallel()) {
|
||||
// Note: This is called from VerilatedVcd::dump, which already holds the lock
|
||||
|
||||
Reference in New Issue
Block a user