Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pymtl.tools] undo rm [0:0] from 1-bit wire decl (details)
Some parameterizable generated code depends on the ability to slice one-bit wires. For example, accel/mvmult/MatrixVecLaneRTL.py contains a wrapper for a multiply operation we use to enable register retiming for a synthesized multiplier. It has a parametrizable number of register stages, these registers can be enabled individually using the nbit s.enables input port. The bitwidth of s.enables is set by the nstages parameter, and a loop in the posedge_clk block is used with slicing to read each enable bit. This works fine if nstages is > 1 (wire [nstages-1:0] enable), but if nstages is 1 the lack of the [0:0] prevents the wire from being sliced. When we had [0:0] it worked as expected. I tried fixing the code to work around this limitation, but PortBundles currently do not support lists of ports (opened as issue #125).
- Loading branch information