# verilog code needed for my sequence

1. ## 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.

•

2. ## 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

•

3. ## 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.

•

4. ## Re: verilog code needed for my sequence

ok thanks, I will do it. thanks for suggestion

5. ## 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.

•

6. ## Re: verilog code needed for my sequence

Originally Posted by Bosechandran
This 8 bit should move one by one till 63 and repeat.
Originally Posted by vGoodtimes
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.

--[[ ]]--