Forum Discussion

MohamedSharfi's avatar
MohamedSharfi
Icon for New Contributor rankNew Contributor
2 years ago
Solved

can I select a specific bit of a bus to go into another bit to other bus?

I'm trying to take bits from output to input of the bus .

example : result or r[3..0] = 0000

if my ones selector 0 new output[3..0] is 0001

if my ones is high new output[3..0] is 0010

i tough of making a module that just take input as bus and separate them into bits so i can select what ever i want is there a better way to do it , or what should i do exactly

  • Hi,

    For data1x, you have to give a name to the node line of VCC for example s[0].

    Then rename the bus name data1[3..0] to r[3..1],s[0]

    For data0x, same have to give a name to the node line of VCC for example s[1].

    Then rename the bus name data2[3..0] to r[3..2],s[1],r[0]

    Attached a sample screenshot for your reference.

    Thanks,

    Best Regards,

    Sheng

    p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

4 Replies

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Hi,

    how should the tool know which r[] bit connects to which data1[] and data2[] bit?

    Use wire or soft symbol to connect nets.

    • MohamedSharfi's avatar
      MohamedSharfi
      Icon for New Contributor rankNew Contributor

      sorry i didnt get what you mean but i need vcc to connect with data1[0] and r[1] to data1[1] ... etc in the same order starting top data1[0] untill data1[3]
      same down first bit r[0] to data2[0] .....

  • ShengN_altera's avatar
    ShengN_altera
    Icon for Super Contributor rankSuper Contributor

    Hi,

    For data1x, you have to give a name to the node line of VCC for example s[0].

    Then rename the bus name data1[3..0] to r[3..1],s[0]

    For data0x, same have to give a name to the node line of VCC for example s[1].

    Then rename the bus name data2[3..0] to r[3..2],s[1],r[0]

    Attached a sample screenshot for your reference.

    Thanks,

    Best Regards,

    Sheng

    p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.