Error when using with-select-when in VHDL

OP #3870274
Can someone explain to me this error and how to solve it?
1
architecture xxx of yyy is
2
--
3
signal wrptr,rdptr: std_logic_vector(n-1 downto 0);
4
--
5
begin
6

7
process(reset,clk)
8
begin
9
--
10
end process;
11

12
with rdptr select
13
--
14

15
with wrptr select
16
--
17

18
process(we,dmuxout)
19
--
20
end process;
21
end xxx;

The errors are:
1
Illegal expression
2
xx.vhd, 40
3
yyy
4
  
5
  with rdptr select
6
       ^
7
  Expression must be the name of an object whose subtype is locally static, or
8
  it must be a qualified expression or type conversion whose type mark denotes
9
  a locally static subtype.
10

11
Illegal expression
12
xx.vhd, 40
13
yyy
14
  
15
  with wrptr select
16
       ^
17
  Expression must be the name of an object whose subtype is locally static, or
18
  it must be a qualified expression or type conversion whose type mark denotes
19
  a locally static subtype.
Moderator (Company: Titel) #3870649
Ayush Khemka wrote:
> It can be seen in the code clearly.
Ok, I see. But then the problem is not in the posted code.

> signal wrptr,rdptr: std_logic_vector(n-1 downto 0);
> Expression must be the name of an object whose subtype is locally static
Where does n come from?

Reply

A question of your own? This thread is over 12 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.