Forum Discussion

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

How to shift left 4bit signal without making register

Hi

I need to create component witch work like shift register for 4 bit signal . How can I do that?

4 Replies

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

    Hi,

    Got a favourite language? In VHDL you could do something like:

    b <= b(2 downto 0) & '0';

    assuming b is defined as a four bit std_logic_vector.

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

    you could do that, but it wont work without registers. Its called a shift register for a reason...

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

    --- Quote Start ---

    you could do that, but it wont work without registers. Its called a shift register for a reason...

    --- Quote End ---

    Well, yeah, the behaviour of that line of code is entirely dependent on what's around it. On it's own it doesn't hold a value or anything. The OP's question was a little vague...

    Mark.