CLAMP Command
Forces signals to remain at specified values or defines PLA, BOOLEAN, and RAM functionality.
| Command | CLAMP |
|---|---|
| Abbreviation | CL |
| Category | Circuit Modification |
Function
The CLAMP command can be used to force signals to remain at specified values until explicitly released (with the NO CLAMP command), either for debugging or for circuit initialization.
The CLAMP command is used to define the functionality of the SIMIC PLA primitive (specifically, its AND plane and its OR planes), and may be used to define the functionality of BOOLEAN elements.
The CLAMP command is used to initialize the contents of the SIMIC ROM primitive, and may also be used to initialize the contents of the RAM primitives.
Forcing And Releasing Signal Values
Signals may be forced to logic-0, logic-1, X (unknown), or Z (floating unknown) with the respective commands:
CLAMP ZERO=<signals> TNUM=<tnum range>
CLAMP ONE=<signals> TNUM=<tnum range>
CLamp X=<signals> TNUM=<tnum range>
CLAMP HIZ=<signals> TNUM=<tnum range>
The specified signals will be clamped to the specified value at the start of the specified test. If the TNUM keyword option is omitted, the signals will be clamped to the specified value at the start of the next test, after simulation is resumed.
Clamped signals remain at their forced values until explicitly released. The LIST keyword, with either a list of signals or its colon form, may be additionally used to release signals regardless of forced value. For example:
NO CLAMP ONE=a,b TNUM=50
releases signals a and b from being forced to logic-1 at test 50 (but does nothing if they are not forced to this value). The command:
NO CLAMP ONE: TNUM=50
releases all signals forced to logic-1 at test 50, while:
NO CLAMP LIST: TNUM=50
releases all forced signals at test 50. If the TNUM keyword option is omitted, signals are released at the start of the next test, after simulation is resumed.
Defining PLA Functionality
A PLA's personality is defined by specifying the product terms of its AND plane and the sum terms of its OR plane.
The AND plane personality is set by the CLAMP command as follows:
CLAMP PART=<part_pla> $
AND=<ninputs>*<nproducts> $
BITMAP=<connection_map>
where <part_pla> is the PLA's part name, <ninputs> is the number of inputs to the AND plane (which must be the number of data inputs), and <nproducts> is the number of AND plane product terms (and the number of inputs to the OR plane). This keyword-field is used for error checking.
The <connection_map> contains <nproducts> items, each containing <ninputs> 0, 1, or X characters that define a single product term, ordered according to the PLA data inputs. These characters correspond to complemented, true, or don't-care, respectively.
The OR plane personality is set by the CLAMP command as follows:
CLAMP PART=<part_pla> $
OR=<nproducts>*<noutputs> $
BITMAP=<connection_map>
where <part_pla> is the PLA's part name, <nproducts> is the number of inputs to the OR plane (which must be the number of AND plane outputs), and <noutputs> is the number of OR plane sum terms (and the number of PLA outputs). This keyword-field is used for error checking.
The <connection_map> contains <noutputs> items, each containing <nproducts> 0, 1, or X entries that define a single sum term, ordered by the AND plane outputs. These characters correspond to complemented, true, or don't-care, respectively. The sum terms, in turn, are ordered by the PLA outputs.
For example, if a PLA with three data inputs, a, b, and c (plus CS and EN), two outputs, sum and cout, and instance name fadd implements a full-adder with equations:
sum = abc + abc + abc + abc
cout = ab + bc + ac
then the following CLAMP commands personalize the PLA:
CLAMP PART=fadd AND=3*7 $
BITMAP=100 010 001 111 11x x11 1x1
CLAMP PART=fadd OR=7*2 $
BITMAP=1111xxx xxxx111
When the PLA's EN input is logic-0, the outputs are set to the disabled value specified by the ENABLE option of the CLAMP command:
CLAMP PART=<part_pla> ENABLE=<dis_val>
where <dis_val> can be either 1 or 0. If unspecified, the value defaults to 0.
For example:
CLAMP PART=pla1 ENABLE=1
causes all outputs to be logic-1 whenever the enable, EN, is logic-0.
Defining BOOLEAN Functionality
The CLAMP command can be used to define the functionality of all instances of a BOOLEAN type or of a single BOOLEAN part with the respective commands:
CLAMP TYPE=<type_name> BOOLEAN=<boolean_block>
CLAMP PART=<part_name> BOOLEAN=<boolean_block>
where:
<type_name>is the name of the BOOLEAN TYPE to modify.<boolean_block>is the BEGIN; equation; equation; ... END; format illustrated below.<part_name>is the name of a BOOLEAN instance to modify.
For example, if a BOOLEAN TYPE represents a full-adder having three inputs, a, b, and c, and two outputs, sum and cout, and the full-adder equations are:
sum = abc + abc + abc + abc
cout = ab + bc + ac
then the following CLAMP commands would make every instance of this element have this functionality:
CLAMP TYPE=fadd BOOLEAN= $
BEGIN ; $
sum = a*^b*^c + ^a*b*^c + ^a*^b*c ; $
cout = a*b + b*c + a*c ; end ;
If only instance fad5 need be defined at run-time, the same command would be used, except the keyword field TYPE=fadd would be replaced with PART=fad5.
Initializing the Contents of a RAM
Normally, RAM contents are initialized during simulation by performing writes to the RAM. However, SIMIC also supports partial or complete initialization of the RAMA, RAMB, and RAMC primitives prior to simulation via the CLAMP command. The command structure is:
CLAMP PART=<part_ram> DATA=<addresses_data>
where <part_ram> is the RAM's part name, and <addresses_data> is the data to write into the RAM in the following format:
X<address> <data> X<address> <data> ...
where <address> is the starting address for the data that follows, in hexadecimal, and <data> is the data described in hexadecimal. For example:
CLAMP PART=RAM1 DATA= $
X0000 00 01 02 03 04 05 06 07 $
08 09 0A 0B 0C 0D 0E 0F $
XC000 FF FF FF FF