EmbDev.net

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


Author: Ayush Khemka (ayushkhemka)
Posted on:

Rate this post
0 useful
not useful
Can someone explain to me this error and how to solve it?
architecture xxx of yyy is
--
signal wrptr,rdptr: std_logic_vector(n-1 downto 0);
--
begin

process(reset,clk)
begin
--
end process;

with rdptr select
--

with wrptr select
--

process(we,dmuxout)
--
end process;
end xxx;

The errors are:
Illegal expression
xx.vhd, 40
yyy
  
  with rdptr select
       ^
  Expression must be the name of an object whose subtype is locally static, or
  it must be a qualified expression or type conversion whose type mark denotes
  a locally static subtype.

Illegal expression
xx.vhd, 40
yyy
  
  with wrptr select
       ^
  Expression must be the name of an object whose subtype is locally static, or
  it must be a qualified expression or type conversion whose type mark denotes
  a locally static subtype.

: Edited by User
Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

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

Author: Ayush Khemka (Guest)
Posted on:

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

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.