akp494
Member level 1
I'm using index to access some bits of a shift register as this index changes values depending on some conditions.
in VHDL the piece of code looks like this:
a<= reg(ptr+1 downto ptr) where 'a' is a two bit vector.
When I try to synthesize the above piece of code,Synopsys DC says a constant is expected as the index.
In my opinion the synthesis tool should be upgraded to infer these kind of implementations. Here 'reg' is defined, "a" is defined and also "ptr" is defined and hence the tool shouldn't ideally see a problem in implementing this.
Let me explain the problem in a different way.
Suppose I have the following signal declarations.
signal reg : std_logic_vector(15 downto 0);
signal ptr : integer;
signal a : std_logic_vector(1 downto 0);
Then at some place in the code if I say
a<= reg(ptr+1 downto ptr)
Now if I try to synthesize this code using DC it is giving an error at the above statement showing the following comment.
"A Constant is expected as index"
Is there any work around for this?? Is it the problem with the tool.
in VHDL the piece of code looks like this:
a<= reg(ptr+1 downto ptr) where 'a' is a two bit vector.
When I try to synthesize the above piece of code,Synopsys DC says a constant is expected as the index.
In my opinion the synthesis tool should be upgraded to infer these kind of implementations. Here 'reg' is defined, "a" is defined and also "ptr" is defined and hence the tool shouldn't ideally see a problem in implementing this.
Let me explain the problem in a different way.
Suppose I have the following signal declarations.
signal reg : std_logic_vector(15 downto 0);
signal ptr : integer;
signal a : std_logic_vector(1 downto 0);
Then at some place in the code if I say
a<= reg(ptr+1 downto ptr)
Now if I try to synthesize this code using DC it is giving an error at the above statement showing the following comment.
"A Constant is expected as index"
Is there any work around for this?? Is it the problem with the tool.