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

Reply

VHDL - Halt synthesiser with an assert?

 
Thread Tools Search this Thread
Old 11-18-2008, 05:34 PM   #1
Default Halt synthesiser with an assert?


Do any Vendors synthesisors actually take action on asserts?

I can see it being quite useful, so why dont they do it?

for example:

...
generic (
word_width : integer; --Only use a multiple of 8
);
...

function check_generics return boolean is
begin
assert ( (word_width rem 8 ) = 0 )
report "word width must be a multiple of 8"
severity failure;
end function check_generics;

constant GEN_CHECK : boolean := check_generics;
begin
...

This would work quite happily in simulation, but if you gave it to
someone else as fully specced and working, they may not want to write
their own testbench to make sure it works (Im sure some people
do ) . This would stop them compiling it out of spec.


Tricky
  Reply With Quote
Old 11-18-2008, 05:57 PM   #2
Tricky
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
On 18 Nov, 17:39, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
> On Tue, 18 Nov 2008 09:34:36 -0800 (PST), Tricky
>
> <Trickyh...@gmail.com> wrote:
> >Do any Vendors synthesisors actually take action on asserts?

>
> >I can see it being quite useful, so why dont they do it?

>
> They do... don't they? *I use such asserts, usually to
> check the legality of generic values, and expect synth
> tools to spot them (I always use "failure" severity,
> so I don't know what would happen with other levels).
>
> Time to go away and try a few examples in several
> different tools....
>
> It is easy to imagine situations where an IP vendor
> would need synthesis to check that their customer
> is not attempting to use absurd values for generics.
> --
> Jonathan Bromley, Consultant
>
> DOULOS - Developing Design Know-how
> VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
>
> Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
> jonathan.brom...@MYCOMPANY.comhttp://www.MYCOMPANY.com
>
> The contents of this message may contain personal views which
> are not the views of Doulos Ltd., unless specifically stated.


Whoops, I think I jumped the gun.

It seems to work fine in brand A, evening giving justs a warning.

I dont know where I got my idea from.


Tricky
  Reply With Quote
Old 11-18-2008, 09:16 PM   #3
Mike Treseler
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
Tricky wrote:

> Whoops, I think I jumped the gun.
> It seems to work fine in brand A, even giving just a warning.
> I dont know where I got my idea from.


I have found that inspiration always
waits on the event 'press_send'


Mike Treseler
  Reply With Quote
Old 11-19-2008, 12:58 AM   #4
Mark McDougall
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
Mike Treseler wrote:

> I have found that inspiration always
> waits on the event 'press_send'


ROTFL!!! Nicely put!

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266


Mark McDougall
  Reply With Quote
Old 11-19-2008, 02:41 PM   #5
Peter
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
> Whoops, I think I jumped the gun.
>
> It seems to work fine in brand A, evening giving justs a warning.
>
> I dont know where I got my idea from.
>


Maybe I did something wrong, but it didnt work using Lattice ispLEVER
software with Synplify....

/Peter



Peter
  Reply With Quote
Old 11-19-2008, 03:14 PM   #6
Peter
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
On 19 Nov, 15:41, Peter <peter.hermans...@sts.saab.se> wrote:
> > Whoops, I think I jumped the gun.

>
> > It seems to work fine in brand A, evening giving justs a warning.

>
> > I dont know where I got my idea from.

>
> Maybe I did something wrong, but it didnt work using Lattice ispLEVER
> software with Synplify....
>
> /Peter


From the Synplify manual:

Ignored VHDL Language Constructs:
The synthesis tool ignores the following constructs in your design. If
found,
the tool parses and ignores them and continues with the synthesis run.
• disconnect
• assert and report

Bad news...

The same result with Mentors "Precision Synthesis".


Peter
  Reply With Quote
Old 11-19-2008, 04:45 PM   #7
HT-Lab
 
Posts: n/a
Default Re: Halt synthesiser with an assert?

"Peter" <> wrote in message
news:1471f587-1099-46ef-bcf6-...
On 19 Nov, 15:41, Peter <peter.hermans...@sts.saab.se> wrote:
>> > Whoops, I think I jumped the gun.

>>
>> > It seems to work fine in brand A, evening giving justs a warning.

>>
>> > I dont know where I got my idea from.

>>
>> Maybe I did something wrong, but it didnt work using Lattice ispLEVER
>> software with Synplify....
>>
>> /Peter

>
>From the Synplify manual:
>
>Ignored VHDL Language Constructs:
>The synthesis tool ignores the following constructs in your design. If
>found,
>the tool parses and ignores them and continues with the synthesis run.
>• disconnect
>• assert and report
>
>Bad news...
>
>The same result with Mentors "Precision Synthesis".


I just tried it out in Precision 2008a and it does evaluate the assertion,

entity cntgen is
GENERIC(CNTRESET : std_logic_vector(7 downto 0):="00000000");

assert ( CNTRESET = "10000000")
report "blablabla" severity failure;

# Info: [44522]: Root Module work.cntgen(rtl){generic map (CNTRESET(7 downto
0) => 00)}: Pre-processing...
# Warning: [45547]: "countergen_assert.vhd", line 24: Assertion Failed:
failure : blablabla

If you change the generic to "10000000" the warning goes away,

Hans
www.ht-lab.com




HT-Lab
  Reply With Quote
Old 11-19-2008, 05:27 PM   #8
KJ
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
On Nov 19, 11:54 am, Jonathan Bromley
<jonathan.brom...@MYCOMPANY.com>
> Synplify does indeed completely ignore the assertion
> (even when used sensibly, as a concurrent assertion).
> Synopsys DC likewise ignores it. Grrr. It's
> inexcusable and silly; assertions over constants
> should be processed by synth tools and failures
> should be fatal failures.
>
> Obviously the synth tool cannot give errors for
> assertions that test things that can vary at runtime,
> but assertions over generic and constant values
> are an important technique and IMO it's outrageous
> that they are not fully supported in synthesis.
>
> I wonder if things will change when SystemVerilog
> gains elaboration-time assertion constructs, in
> the 2009 revision?
>


Wondering will not cause change, taking appropriate action might.

As I have often suggested in the past, the appropriate action here
would be to open a case with Synopsys regarding Synplify (and other
laggard synth tool suppliers) as a new feature request to support
evaluation of static assertions and have it return the appropriate
severity level to the tool so that synthesis stops on 'error' or
'fatal' as it should.

As ammo, use the fact that Quartus supports assertions and has for
quite some time and does just what I described.

My track record with Synplicity (i.e. before Synopsys) was spotty in
that sometimes they would fix the tool, sometimes they would disappear
into a black hole. So far with Synopsys I can say that they appear to
be taking the requests a bit more seriously, they have moved several
bugs/features from 'bug submitted' to 'fixed' to 'closed'.

Requesting VHDL-200x features is not the only thing that synthesis
tool suppliers need to be hammered on for requests, requesting VHDL-87
and VHDL-93 features is fair game too...if they want to lie back on
their statement that "we don't support such and such feature, it says
so in the manual or log file" fine, but such actions over time tend to
push designers to using other tools and cause lost revenue to the
supplier as it should.

> I haven't tried it in Quartus or ISE.


I have with Quartus, it's worked for several years.

Kevin Jennings


KJ
  Reply With Quote
Old 11-19-2008, 05:32 PM   #9
KJ
 
Posts: n/a
Default Re: Halt synthesiser with an assert?
>
> >From the Synplify manual:

>
> >Ignored VHDL Language Constructs:
> >The synthesis tool ignores the following constructs in your design. If
> >found,
> >the tool parses and ignores them and continues with the synthesis run.
> >• disconnect
> >• assert and report

>


Submit a feature suggestion to Synopsys then and tell them that the
competition (i.e. Quartus and Precision) supports assertions and so
should Synplify.

>
> assert ( CNTRESET = "10000000")
> report "blablabla" severity failure;
>
> # Info: [44522]: Root Module work.cntgen(rtl){generic map (CNTRESET(7 downto
> 0) => 00)}: Pre-processing...
> # Warning: [45547]: "countergen_assert.vhd", line 24: Assertion Failed:
> failure : blablabla
>
> If you change the generic to "10000000" the warning goes away,
>


Submit a bug report on Precision then for changing a 'failure'
assertion level into a 'warning'.

Kevin Jennings


KJ
  Reply With Quote
Old 11-19-2008, 05:38 PM   #10
Tricky
 
Posts: n/a
Default Re: Halt synthesiser with an assert?

>
> I haven't tried it in Quartus or ISE.



Works fine in Quartus 5.1 and 8.1. This is from assigning a constant
via a function (that checks generics), and the assert inside the
function. It works for either:

assert (good)
report "" severity failure;

or:

if (not good) then
report "" severity failure.

Warning and Note severities are also dealt with appropriatly.



Tricky
  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




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