In my ALU design, I have used a certain logic which has to replicate a certain bit 16 times to make a 16 bit bus. Now this is trivial to do in the hardware, I just have to connect that one bit to 16 pins (not exactly considering the power problems, and that too can be solved by using a buffer). But I just cannot understand how to do this in the HDL.
Re: Replicate 1 bit 16 times to give a 16 bit bus?
I did it by creating an HDL file to take one pin input and replicate it as a sixteen pin output. I'm hoping to find a more 'correct' way to do it before I get too far into it, but that should work as a last resort.
There were a couple times I wanted to expand a 1-bit signal into a 16-bit bus and came up with this one line, but rather inefficient, solution by thinking about strange ways to use the chips already made: