OrCAD's PLD directory is for programmable logic devices. PLDs are blank chips that you can customize in the lab with logic device programmers. These are also known as ASICs (Application Specific Integrated Circuits).
OrCAD's PLD compiler creates detailed logic from your high-level descriptions. You can choose from the following high-level ways to describe your design.
Operators (some of them)
= assignment
' complement or NOT
& AND
# OR
## XOR
?? Tri-state enable
// Rising edge of the clock
\\ Falling edge of the clock
Examples:
Examples:
If we want to implement this TT
AB | f
00 | 1
01 | 1
10 | 0
11 | 0
we would use this PLD truth table format:
| Table: A, B -> f
| { 00b -> 1b
| 01b -> 1b
| 10b -> 0b
| 11b -> 0b }
If we want to implement this TT
AB | x y
00 | 1 0
01 | 1 1
10 | 0 1
11 | 0 0
we would use this PLD truth table format
| Table: A, B -> x, y
| { 00b -> 10b
| 01b -> 11b
| 10b -> 01b
| 11b -> 00b }
3. State Equations.
| PAL12H6 in: (A[1~6], B[1~3,5~6]), out: Y[1~6]
||
| Y1 = A1 & B1 || AND
| Y2 = A2 # B2 || OR
| Y3 = A3 ## B3 || XOR
| Y4 = A4' || NOT
| Y5 = (A5 & B5)' || NAND
| Y6 = (A6 # B6)' || NOR
Minimal PLD file source code (only B, C & G). Registered logic.
| PAL16R4 in:(CLEAR, PRESET), out:(A, B), clock:CK
||
| A = (CLEAR & B) # PRESET'
| B = (CLEAR & A' & B) # (CLEAR & A & B') # PRESET'
The PALs DO NOT require a clock as part of the state equations.
BUT, the GALs DO require a clock as part of the state equations.
| GAL16V8 in:(CLEAR, PRESET), io:(A, B), clock:CK
||
| A = CK // (CLEAR & B) # PRESET'
| B = CK // (CLEAR & A' & B) # (CLEAR & A & B') # PRESET'
The following example includes test commands.
| GAL16V8 in:(CLEAR, PRESET), io:(A, B), clock:CK
||
| A = CK // (CLEAR & A' & B) # (CLEAR & A & B') # PRESET'
| B = CK // (CLEAR & B') # PRESET'
| Vectors:
| Display (CK,CLEAR,PRESET,A,B)c," TT ",(A,B)L," count ",(A,B)d
| Test CK=0,1;CLEAR=0;PRESET=1
| Test CK=8(0,1); CLEAR=1; PRESET=1
| End
Starting the PLD Compiler
- Display (CK,CLEAR,PRESET,A,B)c," TT ",(A,B)L," count ",(A,B)d
this will display CK, CLEAR,PRESET,A & B in chart form (note the c)
and A & B in logic form (T & F) (note the L) and also A & B in digital
form (0 & 1) (note the d).
Once you have declared which signals you want to display and in what form
the prompt will return. At this time you can indicate the input signals to
use.
- Test CK=0,1;CLEAR=0;PRESET=1
this will pulse the clock once with the clear & preset values set as
shown. That is, the registers (FFs) will be cleared.
Now that all FFs have a state (not U) we can run the circuit. Type:
- Test CK=8(0,1); CLEAR=1; PRESET=1
this will pulse the clock 8 times with clear and preset disabled. The
outputs will be displayed as the simulation runs.