Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

shift register ram based

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?

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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...)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks,

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

    length of the shift register
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.