AR# 2620: Foundation Simulator: How can I use a Formula to assign Z to a bus?
AR# 2620
|
Foundation Simulator: How can I use a Formula to assign Z to a bus?
説明
Keywords: stimulus simulate high impedance tristate bidirectional
Urgency: Standard
General Description: When defining a formula for a bus, if you use the value [Z], the bus is driven to a random state (e.g. 23) instead of high impedance.
ソリューション
1
The Foundation Logic Simulator cannot correctly interpret the bus value [Z] in a formula.
One workaround is to break up the formula into sections that are valid data and sections that are high impedance, then reassemble the pieces.
NOTE: Only use this workaround if you want the Z value to propagate through your simulation. If you want to release the assigned stimulator to allow a tristate buffer to drive the signal, refer to the other resolution.
Example ------- You want to put the following pattern onto an 8-bit bus called DATA: [Z]50 [30]50 [FF]50 [Z]100 [A5]50 [Z]50 [00]50
1. Add the DATA bus to the Waveform Viewer.
2. Select Waveform->Formula->Edit to open the Formula Editor dialog.
3. Define the following formulas, clicking on Add after entering each formula:
Z50 <---IMPORTANT: Notice there are no brackets [30]50[FF]50 Z100 [A5]50 [00]50
4. In the Waveform Viewer, locate the line for the DATA bus. Click on the DATA line, underneath time 0ns. The DATA signal name should turn green.
5. Select Waveform->Formula->Insert to open the Formula Selection dialog.
6. Select the formula you need (Z50 in this case) and click OK.
7. Now click on the DATA line, right where the first formula ends.
8. Select Waveform->Formula->Insert and insert the next piece of the waveform ([30]50[FF]50 in this case).
9. Repeat steps 7 and 8 to construct the entire formula.
If you insert the wrong formula, just select Waveform-> Formula->Replace and select the correct formula. The incorrect formula will automatically be deleted.
2
If you are trying to put stimulus onto a bidirectional bus, use a Chip Controlled stimulator instead of putting a 'Z' state into your formula.
A stimulator that is in Chip Controlled mode has a weak driving strength. When applied to the output of a tristate buffer, the stimulator will be active when the buffer is disabled, but will be overridden whenever the buffer becomes enabled.
Example ------- If you originally wanted to define the following formula:
[Z]50 [30]50 [FF]50 [Z]100 [A5]50 [Z]50 [00]50
Define it like this instead:
[30]100 [FF]50 [A5]150 [00]100
Note that each occurence of [Z] in the original formula has been absorbed into the next bus value.
After assigning this formula to a bus in the Waveform Viewer, select the bus and then select Signal->Stimulator Mode-> Chip Controlled.