Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20703 Discussions

shift register ram based

Altera_Forum
Honored Contributor II
1,060 Views

Hi 

Is it possible to define any shift register length using the ALTSHIFT_TAPS Megafunction? 

or the length can only be: No of Taps X distance between Taps 

 

Can I define a long SR with no Taps at all?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
348 Views

Almost every altshift_taps I see doesn't actually have any taps, just an input and the final output. I don't remember if you can completely disable them in the megawizard, i.e. if you say there's 1 tap you still have two outputs, although they're really the same.  

Unless you're doing a schematic, I would recommend just coding a long chain in HDL. Quartus synthesis does a very good job of inferring shift registers into altshift_taps. (Although it can handle this, don't put a reset on the registers, since there's no real way to reset a memory contents...)
0 Kudos
Altera_Forum
Honored Contributor II
348 Views

Thanks, 

I will try that but I did not see anyway in the megawizard to define the  

length of the shift register
0 Kudos
Altera_Forum
Honored Contributor II
348 Views

If you follow the MegaWizard, the ALTSHIFT_TAPS MegaFunction seems not suitable for implementing a simple shift register, but as the Quartus Software Handbook tells, it's used for this purpose when inferring shiftregisters from HDL code, see the recommended HDL coding styles chapter. 

 

Looking at the ALTSHIFT_TAPS implemented behaviour, it turns out, that setting number_of_taps to 1 and tap_distance to an arbitrary value just does what you want. In this case, taps and shiftout carry identical signals with the intended delay.
0 Kudos
Reply