The PLDshell simulation feature allows simulation digital designs. The simulation always must be the last section in a source (.PDS) file. The simulation section always starts with the keyword SIMULATION. Simulations provides a means by which the logic levels of various inputs and registers can be set and the resulting outputs observed. Time series simulations are possible for sequential circuits. The use of vectors, bitwise collections of variables, makes simulations more convenient.
Basic Commands
Flow Control Commands
BEGIN/END | Defines a sequence of simulation commands to be treated as a block. Used with other flow control commands. |
FOR/TO/DO | Loop a specified number of times. |
WHILE/DO | Loop while a condition is true (1). |
IF/THEN/ELSE | Branch based on a condition. |
Flow Control Commands
EXPRESSIONS | Combinations of Boolean expressions and/or conditional relations used with WHILE/DO and IF/THEN/ELSE structures. |
CONDITIONALS | Relations used in expressions (=, >, <, >=, /=). |
ASSIGNMENTS | Vectors may be assigned any numeric constant (prefix values with #h for hexadecimal, #o for octal or #b for binary) or Boolean expression. |
Examples
VECTOR CRL [RDY PWR] ; Combines the RDY and PWR signals into CRL
SETF PWRON /READY ; PWRON set high (1), READY set low (0)
SETF ADDR_BUS := 0xFF ; Sets 8 bit bus to all 1's
PRLDF /Q1 /Q2 /Q3 ; Preload Q1, Q2, and Q3 with 0's
CLOCKF CLK ; Cycle the CLK signal
CHECK /DONE ; Display error message if DONE is 1
FOR X := 1 TO 6 DO
BEGIN
; Other Statements
END
WHILE (/ERROR * /DONE) DO
BEGIN
; Other Statements
END
IF (READY) THEN
BEGIN
; Other Statements
END
ELSE
BEGIN
; Other Statements
END
See the PLDshell Plus/PLDasm User's Guide for more information. User's guides may be checked out from the EECS Technical Support Center.
Send comments and suggestions to: Dr. Charles S. Tritt