-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
I am using the standalone-generator tool for Pulpissimo peripherals. I have a feature request. Currently the tool correctly generates the functional stub for peripheral X having a function registerResources() found in gen/x.h
namespace foo {
class x_regs:
public sc_core::sc_module,
public scc:resetable
{
// ...
template<unsigned BUSWIDTH=32>
void registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset=0);
};
template<unsigned BUSWIDTH>
inline void foo::gen::x_regs::registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset) {
target.addResource(XYZ, 0x0UL);
target.addResource(ABC, 0x4UL);
// ...
}
}
i would request to use offset in implementation like in the following
template<unsigned BUSWIDTH>
inline void foo::gen::x_regs::registerResources(scc::tlm_target<BUSWIDTH>& target, uint64_t offset) {
target.addResource(XYZ, 0x0UL + offset);
target.addResource(ABC, 0x4UL + offset);
// ...
}
if there are strong reasons to avoid this then maybe a CLI switch could be provided (like -ns for namespace) to enable this. Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels