Forum Discussion

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

How do we select specific bits from a bus?

Hello all, I am new here and I have a problem using the block diagram in quartus II with cyclone III.

So I am trying to select specific bits from a bus, and have no luck yet.

I know how I can select a bits to connect to a Node but I am not sure how I do this in Bus with my set up now.

So I have a LPM_ShiftReg with 40 bits as a data input.

bit [39..28], [15..0] of this data will be a constant (using LPM_constant)

and I need to input bit [27..18].

On the other side of my block diagram, I have another LPM_shiftReg which inputs ****fIn and output Q as data bus with 16bits (15..0).

Now I need to take the bits [11..0] of this second shift register to feed back into [27..18] of first shiftregister.

Can someone tell me how I can achieve this please?

(I am not familiar with VHDL or verilog.. and it would be really appreciated if you tell me how I can do this with block diagram.)

Thank you!

5 Replies

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

    You can access the partial vectors by using named bus signals. There's also a connector symbol to connect bus signals with different names.

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

    Thank you so much!

    Would you mind explain what the connector symbol to connect bus with different names in the program?

    Thank you so much!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Try this method of naming your bus and using parts of it:

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

    This may help if you want to insert the variable bus on an input to a register. Use commas.