+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Newbie level 3
    Points: 988, Level: 7

    Join Date
    Dec 2011
    Posts
    4
    Helped
    0 / 0
    Points
    988
    Level
    7

    when the "signal will update" in fpga

    hello every one...

    I am working in xilinx ...artix 15t fpga . In this i need to know , in below two process what value will there in "addr" varible in first rising edge ....kindly reply any one ...both clk is same


    initi...addr<=0;
    -----Process-1------

    rising edge of clk

    temp<=ram(addr);

    end process

    -----Process-2------

    rising edge of clk

    addr<=addr+1;

    end process

    •   Alt9th March 2017, 06:08

      advertising

        
       

  2. #2
    Super Moderator
    Points: 54,878, Level: 57
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    11,105
    Helped
    2604 / 2604
    Points
    54,878
    Level
    57

    Re: when the "signal will update" in fpga

    Hi,

    Because the values are updated after the rising clock...
    At the first rising clock addr=0, ...then after a little delay it is updated to 1
    At the next rising clock addr=1

    Klaus



    •   Alt9th March 2017, 08:18

      advertising

        
       

  3. #3
    Newbie level 3
    Points: 988, Level: 7

    Join Date
    Dec 2011
    Posts
    4
    Helped
    0 / 0
    Points
    988
    Level
    7

    Re: when the "signal will update" in fpga

    thanks for reply ...my main doubt is ,In the process-1 rising edge after i will do some operation after that only i am using "addr " ..at the same time i will update the "addr" content in another process-2, so it will affect or not ....in detail below ..


    initi...addr<=0;
    -----Process-1------

    rising edge of clk
    a<=a+1;
    b<=b+3;
    c<=c+1;
    d<=d+3;
    temp<=ram(addr);

    end process

    -----Process-2------

    rising edge of clk

    addr<=addr+1;

    end process



    •   Alt9th March 2017, 10:35

      advertising

        
       

  4. #4
    Super Moderator
    Points: 54,878, Level: 57
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    11,105
    Helped
    2604 / 2604
    Points
    54,878
    Level
    57

    Re: when the "signal will update" in fpga

    Hi,

    process1 and proces2 are running at the same time.

    --> read post#2, I think it is clearely answered.

    Klaus


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 35,434, Level: 45
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,485
    Helped
    1891 / 1891
    Points
    35,434
    Level
    45

    Re: when the "signal will update" in fpga

    VHDL is not a programming language - it is meant to model hardware.
    The way signals work in VHDL is that the are scheduled to update at some future point in time. if no time is specified (with an after clause) then it will be updated at the end of the current delta cycle. All processes trigged on the rising edge of the clock will process in 0 time in the same delta cycle, so nothing will have updated yet. All of your assignments, a,b,c,d and temp will be assigned at the end of the current delta.


    1 members found this post helpful.

--[[ ]]--