+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Member level 2
    Points: 498, Level: 4

    Join Date
    Feb 2016
    Posts
    42
    Helped
    0 / 0
    Points
    498
    Level
    4

    Pipeline problem VHDL

    Hi guys! I need some help.

    Here is the scenario, in the first timeslot (or one cycle), a value is outputted. Then on the next timeslot, the same signal but it is already updated to anew value. What should I do so that I can use the value from the first timeslot during the second timeslot. Take note that on the second timeslot, the value changes already but what I need is the value from the previous timeslot. Am I gonna store it? How? Help please. newbie here in VHDL. Thanks.

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 29,150, Level: 41
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,721
    Helped
    1604 / 1604
    Points
    29,150
    Level
    41

    Re: Pipeline problem VHDL

    Quote Originally Posted by nizdom View Post
    Am I gonna store it? How? Help please. newbie here in VHDL. Thanks.
    VHDL is a hardware description language, how do you store a value for later use (next clock cycle) in hardware?....

    use a flip-flop.

    input -- DFF -- output

    output is delayed by 1 clock



    •   AltAdvertisment

        
       

  3. #3
    Member level 2
    Points: 498, Level: 4

    Join Date
    Feb 2016
    Posts
    42
    Helped
    0 / 0
    Points
    498
    Level
    4

    Re: Pipeline problem VHDL

    Quote Originally Posted by ads-ee View Post
    VHDL is a hardware description language, how do you store a value for later use (next clock cycle) in hardware?....

    use a flip-flop.

    input -- DFF -- output

    output is delayed by 1 clock
    What kind of flip flop should I use? Thaanks!



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 29,150, Level: 41
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,721
    Helped
    1604 / 1604
    Points
    29,150
    Level
    41

    Re: Pipeline problem VHDL

    Quote Originally Posted by nizdom View Post
    What kind of flip flop should I use? Thaanks!
    I already showed DFF i.e. D Flip-flop. I'm not going to post the truth table, go look it up in google.



  5. #5
    Super Moderator
    Points: 61,891, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,619
    Helped
    2924 / 2924
    Points
    61,891
    Level
    60

    Re: Pipeline problem VHDL

    Hi,

    Here is the scenario, in the first timeslot (or one cycle), a value is outputted.
    I wonder how the output comes at first...

    Isn´t it usually this order:
    input --> processing --> output?

    **
    Without knowing what "value" format and what timeslot you are talking about .. the answer can only be very vague.

    Klaus



  6. #6
    Advanced Member level 4
    Points: 6,322, Level: 18

    Join Date
    Apr 2016
    Posts
    1,341
    Helped
    232 / 232
    Points
    6,322
    Level
    18

    Re: Pipeline problem VHDL

    Quote Originally Posted by nizdom View Post
    Hi guys! I need some help.

    Here is the scenario, in the first timeslot (or one cycle), a value is outputted. Then on the next timeslot, the same signal but it is already updated to anew value. What should I do so that I can use the value from the first timeslot during the second timeslot. Take note that on the second timeslot, the value changes already but what I need is the value from the previous timeslot. Am I gonna store it? How? Help please. newbie here in VHDL. Thanks.
    you need to learn basics of digital design, ie, how to code combinational and sequential logic, as well as how to connect one to the other to form an actual digital system.
    Really, I am not Sam.



    •   AltAdvertisment

        
       

  7. #7
    Member level 2
    Points: 498, Level: 4

    Join Date
    Feb 2016
    Posts
    42
    Helped
    0 / 0
    Points
    498
    Level
    4

    Re: Pipeline problem VHDL

    Quote Originally Posted by ads-ee View Post
    I already showed DFF i.e. D Flip-flop. I'm not going to post the truth table, go look it up in google.
    Oh I didn't see it! Thaaanks!



  8. #8
    Advanced Member level 3
    Points: 6,158, Level: 18
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    793
    Helped
    324 / 324
    Points
    6,158
    Level
    18

    Re: Pipeline problem VHDL

    Quote Originally Posted by nizdom View Post
    What kind of flip flop should I use? Thaanks!
    Don't instantiate individual DFF's. Just assign the value to a signal inside a clocked process. The synthesis tool will add the DFF.



--[[ ]]--