I am designing a shift register. It has a control signal called RD
which is asynchronous (so I can't use it inside the procedural block). The whole point is my n-1 bit shift register is value of the input if RD==1
or else it has high impedance; I am not sure how to write the assign
the high impedance value because my n bit is a parameter so I can't define the number of bits.
inout [n-1:0] Data;
input RD;
reg [n-1:0] register; //my register
Example: Data = (RD==1'b1)? [n-1:0] register: 'z ;
It's giving me an error. How can I define that if RD
is 1, then I need to see what is there inside the register, and if it's 0 then, it should be high impedance?