FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5917 Discussions

variable length shift register needed

Altera_Forum
Honored Contributor II
780 Views

i need a shift register with variable length, i can't find it in dsp builder.

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
65 Views

I have never used DSP Builder but what you described is often called a barrelshifter. Perhaps it is called that in DSP Builder. 

 

In verilog you can create a barrelshift with code like this: 

 

assign c = b << a; // right shift by variable length 

assign f = e >> d; // left shift by variable length 

 

The code above will be very slow since it's combinational. You can either pipeline the operation or use a multiplier block to do the same thing.
Reply