Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Rising edge of IN- what does it mean.

Status
Not open for further replies.

vishal_sonam

Full Member level 3
Joined
Jan 19, 2012
Messages
187
Helped
14
Reputation
28
Reaction score
14
Trophy points
1,298
Activity points
2,457
I am new to VHDL so please help me
There are two signals RESET and IN. How should the sensitivity list look like
if a method should be called on a rising edge of IN and on every change of
RESET?

I know about the sensitivity list and I understood the change of RESET also but what mean RISING EDGE OF IN.
Please help me to understand this
Thanks
 

IN is an input pin and rising edge means when pulse goes from low to high. It is the transition from low to high state or in 5V TTL logic level it is transition from 0 to 5V.
 
As you didn't post any code as to what you were looking at....

If the code looks like this:

Code VHDL - [expand]
1
2
3
4
5
6
7
8
process (clock, reset)
begin
  if (reset = '1') then
    q <= '0';
  elsif rising_edge(clock) then
    q <= d;
  end if;
end process;


Then it would be an active high asynchronously reset register with a rising edge clock.

If the code is instead like this:

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
process (clock)
begin
  if rising_edge(clock) then
    if (reset = '1') then
      q <= '0';
    else
      q <= d;
    end if;
  end if;
end process;


Then it would be an active high synchronous reset register with a rising edge clock.

If the IN signal is an input pin (as milan.rajik says) and is going directly to the clock pin of a register, then it better be a clean input with well defined transitions, otherwise you may end up with a circuit that has "glitches".

And that rising_edge thing is a function:

Code VHDL - [expand]
1
2
3
4
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) = '0'));
END;

 
Last edited:
this is my program.
This is a system C program.
Code:
#ifndef CRC_CALC_H
#define CRC_CALC_H
#include "systemc.h"
#include "iostream"
#include "iomanip"
SC_MODULE(crc_calc) {
	// ports
	sc_in_clk				clk;
	sc_in	< bool >			reset;
	sc_in	< bool >			crc_en;
	sc_in	< bool >			data_in;
	sc_out	< sc_uint <4> >			crc_out;
	// variables
	sc_uint <4>    ep,Q;
	// functions
	void crc4();
	//constructor
	SC_CTOR(crc_calc) 
	{
              SC_METHOD(crc4);
              sensitive << reset << clk.pos();
         }	
};
#endif

so if I take this program does "RISING EDGE OF IN " here IN means by "CLOCK"?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top