Send a PULSE on input change, asynchronous

Discussion in 'VHDL' started by Jamie, Oct 20, 2003.

  1. Jamie

    Jamie Guest

    Trying to formulate and asynchronous design again. I need to generate
    a low pulse to signal an IRQ and wake-up a microcontroller.

    My conditions.

    port(A, B, RIGHT, ENTER: in std_logic; PULSE: out std_logic;)

    1. on A and B any change should send a pulse.
    2. ENTER and RIGHT only a high-to-low (falling_edge) should send a
    pulse

    Any suggestions on this?
     
    Jamie, Oct 20, 2003
    #1
    1. Advertising

  2. (Jamie) wrote:
    > Trying to formulate and asynchronous design again. I need to generate
    > a low pulse to signal an IRQ and wake-up a microcontroller.
    >
    > My conditions.
    >
    > port(A, B, RIGHT, ENTER: in std_logic; PULSE: out std_logic;)
    >
    > 1. on A and B any change should send a pulse.
    > 2. ENTER and RIGHT only a high-to-low (falling_edge) should send a
    > pulse
    >
    > Any suggestions on this?


    There are a few problems concerning the width of the pulses, racing
    conditions and so on. But in general I would use a simple xor to
    detect changes.
    First you have to delay each input to get a chance to see changing
    values.

    A_Delayed<=NOT NOT A; -- Force synthesis to keep this delay

    Pulse_A<=A_delayed XOR A;
    ....
    Pulse_Enter<=(Enter_delayed XOR Enter) AND NOT Enter;-- falling Edge

    Pulse<=Pulse_A OR .. OR Pulse_Enter;

    bye Thomas
     
    Thomas Stanka, Oct 21, 2003
    #2
    1. Advertising

  3. Jamie

    Jamie Guest

    (Thomas Stanka) wrote in message news:<>...
    > (Jamie) wrote:
    > > Trying to formulate and asynchronous design again. I need to generate
    > > a low pulse to signal an IRQ and wake-up a microcontroller.
    > >
    > > My conditions.
    > >
    > > port(A, B, RIGHT, ENTER: in std_logic; PULSE: out std_logic;)
    > >
    > > 1. on A and B any change should send a pulse.
    > > 2. ENTER and RIGHT only a high-to-low (falling_edge) should send a
    > > pulse
    > >
    > > Any suggestions on this?

    >
    > There are a few problems concerning the width of the pulses, racing
    > conditions and so on. But in general I would use a simple xor to
    > detect changes.
    > First you have to delay each input to get a chance to see changing
    > values.
    >
    > A_Delayed<=NOT NOT A; -- Force synthesis to keep this delay


    >
    > Pulse_A<=A_delayed XOR A;
    > ...
    > Pulse_Enter<=(Enter_delayed XOR Enter) AND NOT Enter;-- falling Edge
    >
    > Pulse<=Pulse_A OR .. OR Pulse_Enter;
    >
    > bye Thomas


    What option forces synthesis to keep the 'NOT NOT A' delay?

    And, are all these statements under the same process()?

    Thanks
     
    Jamie, Oct 21, 2003
    #3
  4. Jamie wrote:
    > Trying to formulate and asynchronous design again. I need to generate
    > a low pulse to signal an IRQ and wake-up a microcontroller.
    >
    > My conditions.
    >
    > port(A, B, RIGHT, ENTER: in std_logic; PULSE: out std_logic;)
    >
    > 1. on A and B any change should send a pulse.
    > 2. ENTER and RIGHT only a high-to-low (falling_edge) should send a
    > pulse
    >
    > Any suggestions on this?


    Consider a synchronous process.

    If this is out of the question, then consider
    an HC14 and some diodes, caps, and resistors.
    At least you can tune up the delays that way.


    -- Mike Treseler
     
    Mike Treseler, Oct 21, 2003
    #4
  5. (Jamie) wrote:
    > (Thomas Stanka) wrote:

    [shorted to a line]

    > > There are a few problems concerning the width of the pulses, racing
    > > conditions and so on. But in general I would use a simple xor to
    > > detect changes.
    > > First you have to delay each input to get a chance to see changing
    > > values.
    > >
    > > A_Delayed<=NOT NOT A; -- Force synthesis to keep this delay

    >
    > >
    > > Pulse_A<=A_delayed XOR A;
    > > ...
    > > Pulse_Enter<=(Enter_delayed XOR Enter) AND NOT Enter;-- falling Edge
    > >
    > > Pulse<=Pulse_A OR .. OR Pulse_Enter;

    >
    > What option forces synthesis to keep the 'NOT NOT A' delay?
    >
    > And, are all these statements under the same process()?


    First I don't mean to insult you in any way.
    If you can't answer this questions by your self, your IMHO not
    experienced enough for doing asynchronous design in its real meaning.
    Please start doing synchronos designs, you will likely fail getting
    your synthesis tools doing the right thing in an asynchronous design,
    if you even can't figure out how to instantiate two inverter. I never
    done a real asynchronous design for myself and I'm not sure if I ever
    want to because of the mass of problems I expect to encounter.

    > What option forces synthesis to keep the 'NOT NOT A' delay?


    There are several ways forcing your synthesis tool keeping two
    inverter, depending on which tool you are using.
    Independent of your tool you could instantiate two inverter directly
    from the vendor library and forbid your tool to systhesise these
    libraryelments.
    Or you could instantiate one inverter and manipulate the netlist after
    synthesis, inserting a second.
    But your tool will likely offer you one or two easier ways *g*.

    > And, are all these statements under the same process()?


    They are all out of a process (concurrent statement), but there is no
    problem
    putting the lines in one process or split them over more processes.

    bye Thomas
     
    Thomas Stanka, Oct 22, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Weiss Family

    race conditions/pulse width

    The Weiss Family, Oct 16, 2004, in forum: VHDL
    Replies:
    6
    Views:
    723
    Jim Lewis
    Oct 19, 2004
  2. Replies:
    3
    Views:
    2,558
  3. Praveen

    pulse streatcher

    Praveen, May 6, 2005, in forum: VHDL
    Replies:
    2
    Views:
    797
    Ralf Hildebrandt
    May 7, 2005
  4. Kenneth Brun Nielsen

    Generate pulse on change

    Kenneth Brun Nielsen, May 12, 2009, in forum: VHDL
    Replies:
    2
    Views:
    619
    Kenneth Brun Nielsen
    May 13, 2009
  5. JSreeniv

    change a clock to pulse in vhdl

    JSreeniv, Jan 31, 2010, in forum: VHDL
    Replies:
    1
    Views:
    2,023
    Mike Treseler
    Jan 31, 2010
Loading...

Share This Page