Re: [vhdl-200x] VHDL enhancements wish list

From: Daniel Kho <daniel.kho@gmail.com>
Date: Fri Feb 18 2011 - 05:29:22 PST

Hi Martin,

If Rst is in the sensitivity list, does this not imply an async reset? And
if not, then a sync reset?

Yes, you're right. I think the intent of having Rst in the sensitivity list
together with specifying "synchronous" or "asynchronous" within the process
is to distinguish between the two.

Probably the following explains it better:
label: *process*(Rst, Clk'*rising*) *is*
*synchronous* *reset*(Rst)
 -- reset logic
*begin*
 -- non-reset logic
*end process*;

gets synthesized to:
label: *process*(Rst, Clk) *is*
* begin*
    *if rising_edge*(Clk) *then*
         *if *Rst='1' *then*
                -- synchronous reset logic;
        *else*
                -- non-reset logic.
        *end if*;
    *end if*;
*end process*;

And similarly, for asynchronous reset:
label: *process*(Rst, Clk'*rising*) *is*
*asynchronous* *reset*(Rst)
 -- reset logic
*begin*
 -- non-reset logic
*end process*;

gets synthesized to:
label: *process*(Rst, Clk) *is*
* begin*
    *if *Rst='1' *then*
         -- asynchronous reset logic.
    *elsif rising_edge*(Clk) *then*
        -- non-reset logic.
    *end if*;
*end process*;

I'm not sure what this gains though - unless your processes are very short,
the lines of code overhead is negligible. Yes, there's a bit less
boilerplate code, but a decent editor reduces that to a handful of
keystrokes anyway.

Yes, we may need to evaluate how much gains this enhancement would bring to
the community. As for myself, I do try to use many small processes as much
as I can (sometimes with only several lines of code per process). I do start
with a big process in the beginning, but will try to break the single
process down into smaller processes.

Well, just my thought.

Regards,
Daniel

On Fri, Feb 18, 2011 at 5:12 PM, Martin.J Thompson <
Martin.J.Thompson@trw.com> wrote:

> >>> On 18 February 2011 at 02:02, in message
> <AANLkTimLg1_LDP=fcHEk=_GB6EpROziHOB2AX6y0ms2e@mail.gmail.com>, Daniel Kho
> <daniel.kho@gmail.com> wrote:
> > I was thinking of having another attribute just for these conditions,
> such
> > as 'rising and 'falling attributes, so we can just specify:
> > if clk'rising then
> > or similarly do the same with the falling edge.
> >
> > Adding this idea to your original proposal (those if-statements are also
> > still omitted), we could have something like:
> > label: process(Rst, Clk'rising) is
> > <synchronous | asynchronous> reset(Rst)
>
> If Rst is in the sensitivity list, does this not imply an async reset? And
> if not, then a sync reset?
>
> > -- reset logic
> > begin
> > -- non-reset logic
> > end process;
> >
>
> I'm not sure what this gains though - unless your processes are very short,
> the lines of code overhead is negligible. Yes, there's a bit less
> boilerplate code, but a decent editor reduces that to a handful of
> keystrokes anyway.
>
> Just my tuppence :)
>
> Cheers,
> Martin
> --
>
> Martin Thompson CEng MIET
> TRW Conekt, Stratford Road, Solihull, B90 4GW. UK
> +44 (0)121-627-3569 : martin.j.thompson@trw.com
> http://www.conekt.co.uk/
>
> Conekt is a trading division of TRW Limited
> Registered in England, No. 872948
> Registered Office Address: Stratford Road, Solihull B90 4AX
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Feb 18 05:33:33 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 18 2011 - 05:33:56 PST