change a clock to pulse in vhdl

Discussion in 'VHDL' started by JSreeniv, Jan 31, 2010.

  1. JSreeniv

    JSreeniv Guest

    Hi all,

    I am getting difficult in simulating the vhdl code which is having a
    pulse train input signal x_in (20 ns period) which is synchronus to
    fpga clock of frequency 50 MHz.
    In my VHDL code pulse train is applicable for counting number of
    pulses in defined time base after that code is changes to find only
    high pulse (or counts in given high pulse of defined time base with
    change in x_in input signal of low for 50 ns and high for 1000 ns);
    the difificult i am facing is how to change pulse train x_in to just
    a high pulse or low pulse signal.

    Simulation is not happening when i use x_in signal to high or low
    pulse signal.
    Please give some knowledge on this simulation issue, if anything more
    information i can provide.

    Thanks,
    Sreenu
    JSreeniv, Jan 31, 2010
    #1
    1. Advertising

  2. JSreeniv wrote:

    > I am getting difficult in simulating the vhdl code which is having a
    > pulse train input signal x_in (20 ns period) which is synchronous to
    > fpga clock of frequency 50 MHz.



    I use a synchronous delay to create testbench stimulus.
    See below or
    http://mysite.verizon.net/miketreseler/test_uart.vhd
    for details.

    -- Mike Treseler



    --------------------------------------------------------------
    procedure tic is
    begin
    wait until rising_edge(clk_s);
    end procedure tic;
    --------------------------------------------------------------
    procedure set_bit (signal arg_s : inout std_ulogic) is
    begin-- skip tic if already set
    if arg_s /= '1' then
    arg_s <= '1';
    tic;
    end if;
    end procedure set_bit;
    --------------------------------------------------------------
    procedure clr_bit (signal arg_s : inout std_ulogic) is
    begin -- skip tic if already clear
    if arg_s /= '0' then
    arg_s <= '0';
    tic;
    end if;
    end procedure clr_bit;
    Mike Treseler, Jan 31, 2010
    #2
    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. crazy_kuts

    VHDL PULSE COUNTER - PLS HELP

    crazy_kuts, Mar 30, 2006, in forum: VHDL
    Replies:
    1
    Views:
    3,298
    Dave Pollum
    Mar 30, 2006
  2. LRCR
    Replies:
    3
    Views:
    9,220
  3. himassk
    Replies:
    1
    Views:
    1,226
    Paul Uiterlinden
    May 16, 2007
  4. luserXtrog

    Clock Pulse?

    luserXtrog, Sep 18, 2009, in forum: C Programming
    Replies:
    9
    Views:
    505
    Nobody
    Sep 20, 2009
  5. Replies:
    5
    Views:
    687
Loading...

Share This Page