mortbopet / VSRTL

Visual Simulation of Register Transfer Logic
MIT License
87 stars 17 forks source link

Investigate whether the propagation functions can be width-templated #43

Open mortbopet opened 4 years ago

mortbopet commented 4 years ago

To have compile-time bit-width checking, propagation functions should be typed with a width paramter

for instance

std::function<VSRTL_VT_U()> m_propagationFunction;

would be transformed to

template<unsigned int W>
std::function<VSRTL_VT_U<W>()> m_propagationFunction;