107 const std::string &
_name,
108 const int __index = -1,
109 const void*
shadow = NULL);
119 unsigned value()
const;
122 std::string
name()
const;
146 void change(
unsigned val);
147 void change(
unsigned val,
unsigned mask);
149 void write(
unsigned val);
175 virtual void cycle();
182 virtual char VcdBit(
int bitNo)
const;
221 virtual char VcdBit(
int bitNo)
const;
228 typedef std::vector<TraceValue*>
TraceSet;
289 DumpVCD(std::ostream *os,
const std::string &tscale =
"ns",
290 const bool rstrobes =
false,
const bool wstrobes =
false);
293 DumpVCD(
const std::string &
name,
const std::string &tscale =
"ns",
294 const bool rstrobes =
false,
const bool wstrobes =
false);
296 void setActiveSignals(
const TraceSet &act);
323 std::map<const TraceValue*, size_t>
id2num;
338 void flushbuffer(
void);
351 static void Reset(
void);
361 void SetSingleDeviceApp(
void);
372 void stopApplication(
void);
383 void save(std::ostream &os)
const;
395 TraceSet load(
const std::string &istr);
408 void appendDeviceName(std::string &s);
414 void unregisterAvrDevice(
AvrDevice* dev);
417 void detachAvrDevices();
445 typedef std::map<std::string*, TraceValue*>
valmap_t;
446 typedef std::map<std::string*, TraceValueRegister*>
regmap_t;
460 virtual size_t _tvr_getValuesCount(
void);
463 virtual void _tvr_insertTraceValuesToSet(
TraceSet &t);
468 _tvr_scopename(name),
469 _tvr_scopeprefix(parent->GetTraceValuePrefix() + name +
"."),
477 _tvr_scopeprefix(
""),
481 if(_tvr_scopename.length() > 0)
482 _tvr_scopeprefix += _tvr_scopename +
".";
497 virtual TraceValue* GetTraceValueByName(
const std::string &name);
501 TraceValue* FindTraceValueByName(
const std::string &name);
505 TraceSet* GetAllTraceValuesRecursive(
void);
512 typedef std::map<std::string*, TraceSet*>
setmap_t;
517 int _tvr_numberindex(
const std::string &str);
522 virtual size_t _tvr_getValuesCount(
void);
526 virtual void _tvr_insertTraceValuesToSet(
TraceSet &t);
535 void RegisterTraceSetValue(
TraceValue *t,
const std::string &
name,
const size_t size);
std::vector< AvrDevice * > devices
Device list.
TraceValue * trace_direct(TraceValueRegister *t, const std::string &name, const bool *val)
Register a directly traced bool value.
virtual char VcdBit(int bitNo) const
Basic AVR device, contains the core functionality.
void read()
Log a read access.
setmap_t _tvr_valset
the registered TraceValue's
std::string _tvr_scopename
the scope name itself
std::map< std::string *, TraceSet * > setmap_t
type of TraceSet map
int index() const
Gives the index of this member in a memory field (or -1)
regmap_t _tvr_registers
the sub-registers
virtual void cycle()
Called for each cycle before dumping the values.
unsigned value() const
Gives the saved shadow value for this trace value.
TraceSet active
Set of active tracing values.
std::string barename() const
Gives the name without the index.
virtual ~Dumper()
Destructor, called for all dumpers at the very end of the run.
std::stringstream osbuffer
virtual void markRead(const TraceValue *t)
static DumpManager * _instance
Atype flags() const
Gives the current set of flag readings.
TraceValueOutput(const std::string &_name)
size_t bits() const
Give number of bits for this value. Max 32.
const unsigned b
number of bits
Build a register for TraceValue's.
std::map< const TraceValue *, size_t > id2num
void clear_flags()
Clear all access flags.
virtual void markWrite(const TraceValue *t)
TraceValue(size_t bits, const std::string &_name, const int __index=-1, const void *shadow=NULL)
Generate a new unitialized trace value of width bits.
std::string name() const
Give name (fully qualified), including the index appended if it is >=0.
void write(unsigned val)
Log a write access on this value.
const void * shadow
shadow reg, if used
std::map< std::string *, TraceValue * > valmap_t
type of values map
std::map< std::string *, TraceValueRegister * > regmap_t
type of subregisters map
~DumpManager()
Destroys the DumpManager instance and shut down all dumpers.
virtual void start()
Called before start of tracing.
virtual void setActiveSignals(const TraceSet &act)
std::string _tvr_scopeprefix
the prefix scope for a TraceValue name
TraceValueRegister()
Create a TraceValueRegister, with a empty scope name, single device application.
unsigned v
The value itself.
const std::string GetTraceValuePrefix(void)
Returns the scope prefix.
TraceSet _all
Set of all traceable values (placeholder instance for all() method)
std::vector< Dumper * > dumps
All dumpers, which we want to use.
virtual void markChange(const TraceValue *t)
bool _enabled
Tracing of this value enabled at all?
valmap_t _tvr_values
the registered TraceValue's
TraceValueRegister * _tvr_parent
Registers a TraceValueRegister for this register, build a hierarchy.
void _tvr_registerTraceValues(TraceValueRegister *r)
std::vector< int > marked
void enable()
Enable tracing.
static DumpManager * Instance(void)
Singleton class access.
void change(unsigned val)
Log a change on this value.
std::vector< TraceValue * > TraceSet
virtual void stop()
Called after stopping tracing.
TraceValueRegister(TraceValueRegister *parent, const std::string &name)
Create a TraceValueRegister, with a scope prefix built on parent scope + name.
bool singleDeviceApp
Flag, if we use only one device, e.g. assign no device name.
void appendDeviceName(std::string &s)
append a unique device name to a string
virtual void markReadUnknown(const TraceValue *t)
const std::string GetScopeName(void)
Returns the scope name.
int f
accesses since last dump/clearflagsd
virtual void cycle()
Called at least once for each cycle if this trace value is activated.
virtual void dump(Dumper &d)
Atype
Possible access types for a trace value.