vhdl construct problem

S

sudip saha

Guest
Hi, <BR>
In my vhdl code, on construct is as follows <BR>
case to_integer(addr) is <p> when to_integer(fifo1_base + fifo_status )=&gt; <p>Where addr is signal of type unsigned(11 downto 0) and fifo1_base and fifo_status is constant of type unsigned(11 downto 0) <p>I tried to compile my code in Cadence tool(ncvhdl) and modelsim. In both the cases it said <BR>
for "when" statement <BR>
expecting a locally static statement. <p>But surprisingly the code got compiled successfully in quartus. <BR>
Where is the problem while trying to compile with cadence and modelsim? I am using vhdl 93 flag.
 
&lt;sudip saha&gt; wrote in
message news:ee81337.-1@WebX.sUN8CHnE...

case to_integer(addr) is
when to_integer(fifo1_base + fifo_status )=
Where addr is signal of type unsigned(11 downto 0)
and fifo1_base and
fifo_status is constant of type unsigned(11 downto 0)
I tried to compile my code in Cadence tool(ncvhdl)
and modelsim. In both the cases it said
for "when" statement expecting a locally static statement.
But surprisingly the code got compiled successfully in quartus.
Where is the problem while trying to compile with
cadence and modelsim? I am using vhdl 93 flag.
Quartus is bending the rules here.

Create another constant:

constant fifo_base_status : integer :=
to_integer(fifo1_base + fifo_status );
and use that in your case statement.

(By the way, this is purely a VHDL question and would be
better directed to comp.lang.vhdl)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail: jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top