+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Junior Member level 1
    Points: 577, Level: 5

    Join Date
    Dec 2016
    Posts
    17
    Helped
    0 / 0
    Points
    577
    Level
    5

    verilog code needed for my sequence

    hi i need verilog code for my sequence

    01 2 3.....................63

    1000000000............0
    0100000000............0
    0010000000............0
    0001000000............0
    0000100000............0
    0000010000............0
    0000001000............0
    0000000100............0

    i need shift register code. This 8 bit should move one by one till 63 and repeat.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 77,038, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,608
    Helped
    3556 / 3556
    Points
    77,038
    Level
    67

    Re: verilog code needed for my sequence

    Hi,

    Don't ask for someone else to write code for you in this forum ...
    (..unless you want to pay for this. Then place your post in the "jobs" section of the forum)

    A forum is meant to help you to rectify your code. This means:
    * You look for informations on how to solve the problem
    * you try to find the solution on your own
    * you write the code on your own
    * you test the code

    in case of problems:
    * you show us your code
    * you give detailed error description
    * and test conditions.

    --> then there are many people here in the forum to help you

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  3. #3
    Super Moderator
    Points: 31,313, Level: 43
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    7,231
    Helped
    1710 / 1710
    Points
    31,313
    Level
    43

    Re: verilog code needed for my sequence

    "Shift register code" is trivial...

    Even google gives reasonable results with the quoted text, which I won't bother repeating here.



    •   AltAdvertisement

        
       

  4. #4
    Junior Member level 1
    Points: 577, Level: 5

    Join Date
    Dec 2016
    Posts
    17
    Helped
    0 / 0
    Points
    577
    Level
    5

    Re: verilog code needed for my sequence

    ok thanks, I will do it. thanks for suggestion



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

    Join Date
    Feb 2015
    Posts
    1,019
    Helped
    286 / 286
    Points
    6,203
    Level
    18

    Re: verilog code needed for my sequence

    use either the shift operator "x <= x >> 1;" or concat "x <= {1'b0, x[0:62]};" or be lazy "x <= x[0:62]". division should also work "x <= x/2" but will annoy more people.



    •   AltAdvertisement

        
       

  6. #6
    Super Moderator
    Points: 31,313, Level: 43
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    7,231
    Helped
    1710 / 1710
    Points
    31,313
    Level
    43

    Re: verilog code needed for my sequence

    Quote Originally Posted by Bosechandran View Post
    This 8 bit should move one by one till 63 and repeat.
    Quote Originally Posted by vGoodtimes View Post
    use either the shift operator "x <= x >> 1;" or concat "x <= {1'b0, x[0:62]};" or be lazy "x <= x[0:62]". division should also work "x <= x/2" but will annoy more people.
    The requirement is for a ROTATE operation as stated by the OP all of your suggestions won't work as shown. Only the concatenation will work if the it is written with bit-63 assigned to the MSB position instead of 1'b0.

    Though I have a suspicion that the OP could do whatever they are trying to do differently, but the 64-bit rotate register was the only thing they could think of.



--[[ ]]--