EmbDev.net

Forum: FPGA, VHDL & Verilog Error when using with-select-when in VHDL


Du wurdest von Mikrocontroller.net auf diese Seite weitergeleitet. Zurück zu Mikrocontroller.net
von Ayush K. (ayushkhemka)


Rate this post
useful
not useful
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.

: Edited by User
von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
The with-select is a concurrent statement. It cannot be used inside a 
process. Use the case-when instead...

von Ayush Khemka (Guest)


Rate this post
useful
not useful
I did put it outside the process. It can be seen in the code clearly.

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
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?

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.