IO of Multiple Types Error #1273
-
I am trying to create IO ports for a variable number of internal objects. If the number of objects is 1, I would like to have the input be Bits() type, and if its more than one, I would like a Vec of Bits.
But when I try to do this, I get several error messages: On the nElem == 1 branch of the io assignments:
On the else branch of the io assignments:
Is something like this possible, or do I need to seperate the vectorized and non-vectorized IO at the top level into different variables and generate them in a mutually exclusive way, like:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@Dolu1990 Do you have any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I would say you would need it, unless you are willing to add function in the io bundle to provide read write access to them. But overall, why do you want to separate them ? Why not just using Vec all the way ?
Isn't it : in(Vec.fill(nElem)(Bits(8 bits))) ? |
Beta Was this translation helpful? Give feedback.
Hi,
I would say you would need it, unless you are willing to add function in the io bundle to provide read write access to them.
But overall, why do you want to separate them ?
Why not just using Vec all the way ?
Isn't it : in(Vec.fill(nElem)(Bits(8 bits))) ?