Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Halt synthesiser with an assert?

Reply
Thread Tools

Halt synthesiser with an assert?

 
 
Tricky
Guest
Posts: n/a
 
      11-18-2008
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.
 
Reply With Quote
 
 
 
 
Tricky
Guest
Posts: n/a
 
      11-18-2008
On 18 Nov, 17:39, Jonathan Bromley <(E-Mail Removed)>
wrote:
> On Tue, 18 Nov 2008 09:34:36 -0800 (PST), Tricky
>
> <(E-Mail Removed)> 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
> (E-Mail Removed)://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.
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      11-18-2008
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'
 
Reply With Quote
 
Mark McDougall
Guest
Posts: n/a
 
      11-19-2008
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
 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      11-19-2008
> 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

 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      11-19-2008
On 19 Nov, 15:41, Peter <(E-Mail Removed)> 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".
 
Reply With Quote
 
HT-Lab
Guest
Posts: n/a
 
      11-19-2008

"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
On 19 Nov, 15:41, Peter <(E-Mail Removed)> 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


 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      11-19-2008
On Nov 19, 11:54 am, Jonathan Bromley
<(E-Mail Removed)>
> 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
 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      11-19-2008
>
> >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
 
Reply With Quote
 
Tricky
Guest
Posts: n/a
 
      11-19-2008

>
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Why is it that when I download a 50mb file from one of the binaries evrything else slows to a screeching halt? zZz Computer Support 10 04-25-2005 07:29 PM
Computer grinds to a halt... Skybluepink Computer Support 1 06-22-2004 03:12 PM
Dowloads grind to a halt on my dialup Fatfreek Computer Support 2 04-23-2004 09:03 PM
how to halt DECNET processes William J King Cisco 1 12-24-2003 01:25 AM
Music Synthesiser Track? Slarty Bartfast MCSE 2 06-30-2003 10:21 PM



Advertisments