rising_edge(clock) vs clock'event 
Author Message
 rising_edge(clock) vs clock'event

Hi,
        I was wondering if any of the mainstream tools still don't
support rising_edge(clock).

I'm using (clock'event and clock = '1') in my code, because I believe
that this is more portable, but I'd much rather use rising_edge, as
it's much easier to read (and type!).

Thanks,
Allan.



Mon, 06 May 2002 03:00:00 GMT  
 rising_edge(clock) vs clock'event

Hi,
    We had a similar discussion a few months back, we had a broader look
at most of the main stream tools - Synthesis, Simulation, & Formal
Verification. All of them seem to support it. We started recommanding
the usage of this construct within our company b'cos as you have
rightly said,

1.> It is more concise and clear

also

2.> It detects the exact rising edge and not a transaction from say "X"
to "1" which would be the case with the other construct.

Kind Regards,
Srini



Quote:
> Hi,
>    I was wondering if any of the mainstream tools still don't
> support rising_edge(clock).

> I'm using (clock'event and clock = '1') in my code, because I believe
> that this is more portable, but I'd much rather use rising_edge, as
> it's much easier to read (and type!).

> Thanks,
> Allan.

Sent via Deja.com http://www.deja.com/
Before you buy.


Mon, 06 May 2002 03:00:00 GMT  
 rising_edge(clock) vs clock'event

Quote:

> Hi,
>         I was wondering if any of the mainstream tools still don't
> support rising_edge(clock).

> I'm using (clock'event and clock = '1') in my code, because I believe
> that this is more portable, but I'd much rather use rising_edge, as
> it's much easier to read (and type!).

> Thanks,
> Allan.

The rising_edge() function is defined in the std_logic_1164 package as:

function rising_edge(signal s : std_ulogic) return boolean is
begin
        return (s'event and (to_x01(s)='1') and (to_x01(s'last_value) = '1'));
end

So the question is rather if a particular tool supports the above VHDL
constructs (like the last_value attribute) or not. I can't see any other
resons for this function not to work (provided you use have access to
the 1164 package). In any case, you can always define your own
rising_edge function and use when and where you like.

Regards,

Mats Olsson
Ericsson Mobile Data Design AB
Gothenburg, Sweden



Tue, 07 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. clock scan [clock format [clock seconds]] fails

2. Calendar.Clock vs. Real_Time.Clock

3. change TOD clock with set and store clock

4. How to do IP clock balance with external clock

5. How to Generate 1MHz clock from 44MHz Clock??

6. Problem with clocking logic usign a derived clock

7. Gated Clock(double rate clock)?

8. clocking on rising AND falling edge of a clock

9. Gated Clock(double rate clock)?

10. clocks and clock enables in Xilinx

11. Creating a clock with a clock enable

12. clock skew and clock overloading

 

 
Powered by phpBB® Forum Software