How to use Buses on Xilinx

This tutorial will give you an introduction to drawing buses on Xilinx. As an added bonus, the tutorial also shows you how to shift an 4-bit number to the left. (this might come in handy in 141L)

Basic Bus setup

1.

Select the Draw Buses icon from the left side toolbar.

2.

Draw the bus as you would a wire in the shape of an inverted "L" (squarish 7 ) with a bus terminal at the end. (the same way you do for wires)

3.

Give your bus a name, such as SLI for Shift Left In, and make sure Terminal Marker is on Input. For the Range, do [ 3 : 0 ]. This tells the bus there are 4 input bits, 0 to 3.

4.

Draw another bus this time in the shape of "L" and add a bus terminal at the end like step 2. Make sure you leave plenty of room for gates in between the buses. Name this one SLO and make sure Terminal Marker is on Output, and make sure the Range is ALWAYS consistent with the input terminal.


*Tip: Always draw both sides of buses first before drawing the gates in between.

Now we draw the meat of the Shift Left Unit

1.

Place two Inverters side by side between the buses and connect them together using wire. Make 2 other copies of this and place them one below the other.

2.

Place one single inverter on top of the doubles, and ground the right side of the inverter.

Place another single inverter on bottom of the doubles, and add VCC (high signal) to the left side.

3.

Select the Draw Bus Taps icon from the toolbar. (the one below the draw Bus icon)

4.

Click on the Input bus once ( check to make sure your cursor turns into a blue box), then click on the unconnected side of the top inverter. A wire with an arrow shape on the bus should appear, with a label of SLI3, if you done everything correct up to this point.

5.

Click on the left side of each sets of double inverters. You should see more wires appearing with labels, down to SLI0. Now repeat for the other side of the Bus, making sure you click on the Output bus first.


Now we are ready to simulate

1.

Save and simulate as you would normally, adding the signals. You should see (SLI3, SLI0) and (SLO3, SLO0)

2.

If you see only 2 signals ( 2 Hex ) you might want to select both of the Hex signals and right click on them, select Bus, then Flatten.

3.

Now simulate as usual. You may give each of the inputs a different value and check out the simulated results. Give it any 4-bit number ( such as 0110) and it should spit out your answer, shifted to the left once. ( 1100 if you followed this tutorial correctly)


*Tip: For future reference, you can choose Bus, Combine to combine the separated signals and see the result of simulation in Hex form or other forms.


For more info, look up the help menu for the Xilinx Schematic Editor. There are some pictures and hints that might help you out.