rrucha
Member level 3
Hi, I am trying to implement something and I want to fully parameterize it. I will explain the problem.
My data comes into a MUX and I choose which data to accept. then I have some extra bits that need to get appended to this data. These 'number of bits to be appended " will be a parameter.
so we have
So as you can see, the bits that get appended needs to be controlled. So my MUX will select its first data, append the 1st bit. Then the MUX needs to select the next data depending on the control, and append the next part of the additional data. Is there any way to implement a for loop over this MUX?
My data comes into a MUX and I choose which data to accept. then I have some extra bits that need to get appended to this data. These 'number of bits to be appended " will be a parameter.
so we have
Code:
input [3:0] data1;
input [3:0] data2;
input [3:0] data3;
input [1:0] control;
input [2:0] append_data;
parameter bits_to_append = 1;
So as you can see, the bits that get appended needs to be controlled. So my MUX will select its first data, append the 1st bit. Then the MUX needs to select the next data depending on the control, and append the next part of the additional data. Is there any way to implement a for loop over this MUX?