Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - VHDL-AMS: assert as simultaneous statement

 
Thread Tools Search this Thread
Old 11-03-2006, 01:32 PM   #1
Default VHDL-AMS: assert as simultaneous statement



Hi,

I consider good design practise to write case statements with a
default 'others' choice to be able to catch design errors and
properly mark them with an assert statement.

This works fine with VHDL sequentials and concurrent assert statements.

However, I canīt get VHDL-AMS simultaneous assert statement to work.
My tool complain with "unknown concurrent/simultaneous statement "
when I write, e.g.:

architecture [...] of [...] is
shared variable a : [...]
[...]
begin
[...]
case a use
when a1=> v'dot == -G - v**2*Air_Res; ;-- e.g.
when b2=> [...]
when others =>
assert false report "case defaulted!" severity failure;
end case;
end;

If you use VHDL-AMS, donīt you find it necessary?
I just canīt find thsi construct in the Quick Reference of several
VHDL-AMS Simulator...



yaveh (Yet Another Vhdl Engineer Hoping)
  Reply With Quote
Old 11-27-2006, 09:17 PM   #2
Paul Floyd
 
Posts: n/a
Default Re: VHDL-AMS: assert as simultaneous statement
On 3 Nov 2006 05:32:51 -0800, yaveh (Yet Another Vhdl Engineer Hoping)
<> wrote:
>
> Hi,
>
> I consider good design practise to write case statements with a
> default 'others' choice to be able to catch design errors and
> properly mark them with an assert statement.
>
> This works fine with VHDL sequentials and concurrent assert statements.
>
> However, I canīt get VHDL-AMS simultaneous assert statement to work.
> My tool complain with "unknown concurrent/simultaneous statement "
> when I write, e.g.:
>
> architecture [...] of [...] is
> shared variable a : [...]
> [...]
> begin
> [...]
> case a use
> when a1=> v'dot == -G - v**2*Air_Res; ;-- e.g.
> when b2=> [...]
> when others =>
> assert false report "case defaulted!" severity failure;
> end case;
> end;
>
> If you use VHDL-AMS, donīt you find it necessary?
> I just canīt find thsi construct in the Quick Reference of several
> VHDL-AMS Simulator...


I haven't checked in the LRM, but I don't think that this is allowed.

A somewhat ugly solution, which doesn't quite do what you want (but
might be good enough for simulation), might be to define a function that
contains an assert.

For instance

function my_assert(s: string) return [type of a1, b2 ...] is
begin
assert false report s severity failure;
return 0.0; -- or whatever is compatible with a1 ...
end;


case a use
when a1=> v'dot == -G - v**2*Air_Res; ;-- e.g.
when b2=> [...]
when others =>
dummy == my_assert("case defaulted!");
end case;

A bientot
Paul
(Not speaking for Mentor Graphics)
--
Paul Floyd http://paulf.free.fr (for what it's worth)
Surgery: ennobled Gerald.


Paul Floyd
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
Help on auto conversion from Matlab to vhdl on filter design hardheart Hardware 0 12-07-2007 09:19 AM
ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL freitass Hardware 0 11-01-2007 03:44 PM
VHDL Query - Indexing / Arrays / std_logic_vectors X_Dreamer Hardware 2 10-31-2007 07:39 PM
vhdl code amirster Hardware 0 05-10-2007 07:28 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46