We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 3205

1.5i Foundation Logic simulator - Bus ordering reversed after bus has been flattened, then combined


Keywords: Foundation, F1.4, Simulation, Bus, Flatten, Combine

Urgency: Standard


When simulating a bus signal, if it is first flattened from the menu selection (Signal->Bus->Flatten) and then recombined (Signal->Bus->Combine), the bit order appears to be reversed. (i.e. the most significant bit becomes the least significant bit, and the least significant bit becomes the most significant bit).

This appears to produce incorrect simulation results.


The confusion lies in the function of the Flatten and Combine options. Bus -> Flatten actually breaks the bus. After you have peformed a Bus -> Flatten, the bus is no longer a bus. When you perform Bus -> Combine, it creates the bus. When the bus is Combined, the bit order is determined by the order in which the signals are listed in the Simulator window. The top-most bit becomes the LSB. Note that even if BIT7 is on top, and BIT0 on the bottom of the list, BIT7 is the LSB after you do a Bus -> Combine.

The function which you probably want to use in this case (rather than Bus -> Flatten and Bus -> Combine) is the Buses icon in the toolbar which looks like a sideways fork. This icon performs the function of simply expanding and collapsing the bus to be able to VIEW the individual bits. This is different than the Bus -> Flatten and Bus -> Combine which actually break and create the bus.
With the Buses icon, the bus always remains a bus, but what changes is the view of it, ie, whether you see it as a bus or as indivual bits.

In case the bit order or your bus has been switched, (by inadvertantly using the Bus -> Flatten, Bus -> Combine) you can restore the correct
order by selecting:

Signal -> Bus -> Change Direction
AR# 3205
Date Created 12/16/1997
Last Updated 03/06/2002
Status Archive
Type General Article