Answers Database


Foundation F1.4, F1.5. Logic simulator: Bus ordering reversed after bus has been flattened, then combined


Record #3205

Product Family: Software

Product Line: Aldec

Product Part: Foundation Logic Simulator

Product Version: 1.4

Problem Title:
Foundation F1.4, F1.5. Logic simulator: Bus ordering reversed after bus has been flattened, then combined



Problem Description:
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 will produce incorrect simulation results.


Solution 1:

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




End of Record #3205 - Last Modified: 03/03/99 12:24

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips!