TAPES AND PARTITIONING
Overview
A unique feature of the VSM system is its ability to divide a large design into one or more sections or partitions and simulate each individually.
There are two principal advantages associated with this:
- In a fully integrated CAD
exercise, the circuit for the whole design of the product will contain
some sections which you may not wish to or cannot simulate. To prevent
the need for carving up the design, some mechanism is required for
determining which components in the design are actually relevant to
a given simulation experiment.
Proteus does this by considering the points being measured and, further back down the design, the points being driven by test sources and/or power rails.
- If the design consists of several stages, it will be a common requirement to see how later stages perform when driven by the outputs of earlier stages. Whilst this could be achieved by simulating all the stages together, this would tend to be unduly slow. Partitioning allows the results from simulating previous stages to be captured in tapes and played back as the input for subsequent stages.
Both can be driven either under manual control or automatically. In the latter case, Proteus detects when the circuitry within given partitions has changed and re-simulates only those which have changed, or which are affected by those which have changed.
Single Partition Operation
Many simulation experiments will consist of testing a single section of a design in isolation from the rest. This will generally involve injecting a signal or signals at the input or inputs of the section, and then monitoring its operation at points throughout it.
It should be self evident that signals can be injected by placing generator gadgets on appropriate input wires, and that circuit operation can be monitored by placing probes. However, these actions by themselves do not isolate the section under test from the rest of the design.
To do this, you need to tick the &Isolate Before? checkbox on the generators and the &Isolate after? checkbox on the probes. Once this is done, only the section between the isolation points will be netlisted and simulated.
To work out which section to simulate, Proteus looks at the probes that have been assigned to the graph, and propagates through components and wires (including inter-terminal connections) outwards until one of the following conditions is met:
- There are no more components to process.
- An isolating probe or generator is reached.
- A tape input or output is reached.
- A power rail is reached. A net is made into a power rail by connecting a POWER or GROUND terminal to it. A GND or VCC wire label will not do here.
See Also:
Partition Files
The results of simulating a partition are written to a partition file, and it is those files that make the re-simulation decisions described below possible. A design carries a PARTITION property whose value identifies the current set of partition files, and the files themselves are managed for you; you do not normally need to know where they are.
Two things follow from this that are worth knowing. The first is that a partition file is keyed on the content of the sub-netlist it came from, so anything that changes that content invalidates it. The second is that partition files are also the transport for persistent model data, so a change that discards a partition file discards the working copy of any EEPROM contents that partition was holding.
See Also:
Tape Objects
Tape objects have two distinct uses with the system:
- To define points at which it is reasonable to ignore circuitry to the right of when simulating circuitry to the left. Such points are generally where low impedance outputs drive high impedance inputs. This can also be achieved by placing isolating probes.
- To provide the means to capture the output of one stage of a design, and use it to drive the next stage but without the overhead of simulating the first stage.
To Place a Tape:
- Select Probe Mode from the mode toolbar, and then select TAPE in the Object Selector. Tapes are not a mode of their own; they are one of the three objects that Probe Mode places, alongside the voltage and current probes.
- Use the Rotation and Mirror buttons to orient the tape according to how you want to place it. The little arrow symbol within the tape body designates the direction of the tape; in its normal orientation, the input is on the left and the output is on the right.
- Click left in the Editing Window, once to attach a tape to the mouse, move the cursor to where you require the tape and left click again to place the tape.
- You can place a tape directly on to an existing wire by placing it such that its connection point touches the wire. Alternatively you can place several tapes in a free area of your design, and wire to them later.
It is vital to place tapes only in sensible locations, that is where low impedance drives high. If you place tapes in other locations, you will change the operation of your circuit and invalidate any results that may then be produced.
Tape Modes
To give the maximum degree of user control, tapes have three modes: AUTO, PLAY and RECORD.
You set the mode by editing the tape, which brings up the Edit Tape Recorder dialogue form. Its &Mode group offers Automatic, Play and Record, which are the three modes under their dialogue names, and the file to play or record to is given in the &Filename: field.
If you choose Play or Record and leave the filename blank, the tape silently reverts to Automatic mode. There is no error and no warning, so check the mode again after you have closed the form if you are not sure you filled the filename in.
In the following discussions, we use the terms left and right in terms of the logical dependency of the partition tree, reading the design input to output, left to right.
AUTO mode
This is the default scheme and defines a mode of operation in which Proteus decides which partitions need re-simulating, and which can use previously stored data. For most situations that require the use of tapes, AUTO mode will prove to be the most useful.
This automatic detection is based on considering all the text that occurs within the sub-netlist related to the partition. It follows that if any part names, values, properties, wiring and so forth in that partition are changed, a re-simulation will be performed unless a partition file already exists for that set of information.
Note also that all models, scripts, design global properties and so forth are included in the sub-netlist, so changing any such object will cause a re-simulation of all automatic partitions. Proteus does not delve into the question of whether particular models, scripts and so on are used by components in a particular partition. If you need to overcome this, you can use the manual RECORD and PLAY modes.
Note that a TAPE object in auto mode will be removed from the circuit if an interactive simulation is performed.
PLAY mode
This mode enables you to play a named file that you have previously recorded, either with a tape or by adding a RECORD property to a probe. The filename of the data to be played should be entered into the &Filename: field of the tape.
When a tape is in PLAY mode, the circuitry to its left is disconnected and ignored, unless it includes probes which are also included on the current graph.
Do bear in mind that you can only play data that has been recorded for the type of analysis currently being performed. Attempts to do otherwise will result in an error.
RECORD mode
This mode causes the data present at the input of the tape to be recorded into the file named in its &Filename: field.
Another effect of record mode is to force the partition to the tape's left to be re-simulated, irrespective of whether it has changed or not. If there is a partition to the right of the tape that is probed, then this will also be re-simulated since it will be deemed to depend on the one to its left.
The RECORD mode for tapes is probably most useful in situations in which you want to record a waveform once, and then lock it as the input for further experiments on the right hand side of the tape.
Record mode requires a graph, so it is not available in interactive simulation. A tape left in record mode when you run interactively reports:
RECORD mode of tape 'T1' not supported in interactive simulation.
Wiring Errors
A tape needs an input in every mode but Play, and an output in every mode but Record, because in those modes the missing side is supplied by the file. Leaving the required side unwired reports one of:
Tape object 'T1' has no input.
Tape object 'T1' has no output.
See Also: