Matchlib Module class: a wrapper of sc_module with tracing and stats support.
More...
#include <nvhls_module.h>
|
| Module (sc_module_name nm) |
|
void | SetTraceLevel (int l) |
|
bool | HasStats () |
|
bool | ChildrenHaveStats () |
|
void | DumpStats (std::ostream &ofile, unsigned int lvl, Module *aggregator) |
|
template<unsigned int Size> |
void | Marshall (Marshaller< Size > &m) |
|
|
sc_in_clk | clk |
|
sc_in< bool > | rst |
|
sc_attr_base * | module_indicator |
|
|
static const unsigned int | width = 0 |
|
|
bool | IsModule (sc_object *obj) |
|
std::vector< Module * > | GetChildren () |
|
void | IncrStat (const std::string &name, unsigned int num=1) |
|
void | IncrStatIndexed (const std::string &name, unsigned int idx, unsigned int num=1) |
|
Tracer & | T (int l=0) |
|
Tracer & | ASSERT (bool cond) |
|
void | RecordEvent (const std::string &name, uint64 param=0) |
|
void | PrintStats (std::ostream &ofile, unsigned int lvl, Module *aggregator) |
|
void | Indent (std::ostream &ofile, unsigned int lvl) |
|
|
std::map< std::string, uint64 > | stats_ |
|
Tracer | tracer_ |
|
Flusher | EndT |
|
Matchlib Module class: a wrapper of sc_module with tracing and stats support.
- A Simple Example
#include <nvhls_module.h>
class CrossbarModuleConnectionsInterface :
public match::Module {
public:
...
void Process();
SC_HAS_PROCESS(CrossbarModuleConnectionsInterface);
CrossbarModuleConnectionsInterface(sc_module_name name_)
: match::Module(name_) {
SC_THREAD(Process);
sensitive << clk.pos();
async_reset_signal_is(rst, false);
this->SetTraceLevel(2);
}
};
void CrossbarModuleConnectionsInterface::Process() {
...
while(1) {
wait();
T(1) << " Entered DUT" << EndT;
#pragma hls_unroll yes
for(int inp_lane=0; inp_lane<NumInputLanes; inp_lane++) {
data_in_reg[inp_lane] = data_in[inp_lane].Pop();
T(2) << "data_in[" << inp_lane << "] = " << data_in_reg[inp_lane] << EndT;
}
...
}
}
Matchlib Module class: a wrapper of sc_module with tracing and stats support.
Definition at line 107 of file nvhls_module.h.
The documentation for this class was generated from the following file: