This application note des cribes ho w to
use the features of the ATV750 and
ATV750B in the ABEL (and AtmelABEL) and CUPL (and Atmel-CUPL)
high level de scription lang uages. The
ATV750 and ATV750B are easy
upgrades from a 22V10. They offer twice
the logic densi ty and more fle xibility in
the same footprint. Both devices have 20
registers and individual clock and AR
product terms for each register. Each I/O
pin has a programmable polarity control
and an individual output enable product
term. Independent feedback paths fr om
each register allow all of the registers to
be buried without wasting the I/O pins.
For the ATV750B the registers can also
be configured as D- or T-type and the
clock can be selected as either a synchronous clock pin or a clock product
term. The ATV750 and ATV750B macrocell is shown in Figure 1.
Device Names and Pin and
Node Assignments
The device names for the ATV750 an d
ATV750B for each langu age are shown
in Table 1.
Buried registers (Q1 in each mac rocell) are identified by
node numbers. Table 2 shows the node numbers for the
Q1 registers in the ATV750 and ATV750B. Registers which
are associated with the I/O pin (Q0 in each macrocell) are
identified by the pin numbers. The use of the Q0 node numbers in CUPL is described in the Macrocell Configurations
section.
The following ex amples s how the de vice type specif icatio n
and the pin and node assignments:
Each macrocell has three feedback paths into the array,
one from each of the registers and one from the pin. For a
buried register, th e node name is u sed to refer to th e
feedback path. For a combinatoria l output, the feedb ack
comes from the pin, so th e pin name is used to refer to th e
feedback. For a registered output, the feedback can come
either from the register or from the pin. The feedback paths
are labeled (1), (2), and (3) on Figure 1. The following
examples show how the different feedback paths are
identified:
# O23.fb“(2)feedback from Q0 register
# O23Q1;“(3)feedback from buried register
Note:1. For ABEL, either “.q” or “.fb” can be used to indicate
the buried register feedback path. When “.q” extension is used, the software will select the Q outp ut of
the register, regardless of the output buffer polarity.
When the “.fb” extension is used, the software will
match the polarity of the register feedback with the
output polarity by selecting either the Q or !Q output
of the register.
# O23/*(2)feedback from Q0 register */
# O23Q1;/*(3)feedback from buried register */
2
CMOS PLD
Macrocell Configurations
CMOS PLD
The basic m acroc ell co nfig ura tions are sh own i n Fi gur es 2
through 7. Each macrocell can be configured as either a
registered or combinatorial output. In addition, each macrocell has a buried register. The multiple feedback paths also
allow both registers to be bur ied, with th e I/O pin used as
an input pin.
The macrocells h ave a t otal of b etween 8 a nd 16 pr oduct
terms. If the buried register is used, the product terms are
automatically divided into two sum terms, each with half of
the product ter ms. If the bu ried register is not used, all o f
the product terms are available for the I/O function.
For ABEL, the Q1 register is identified by a node number.
The Q0 register is identif ied by the pin numb er. The OE
should be set to 0 to disable the outputs. The “pinname”
(with no extensions) refers to the input path. The “pin-
name.fb” refers to the register feedback path. Another
Figure 2. Combinatorial Output
name for either th e inpu t o r the register may be substi tute d
in the Declarations section of the file, to make it clearer that
they have separate functions . The pi n and no de nam es wil l
be substituted back into the equations when the file is
compiled.
For CUPL, there are node numbers for both the Q1 and Q0
registers. The Q0 node numbers sho uld onl y b e us ed if th e
Q0 register is buried and the pin is used as an inp ut. The
Q0 node name refers to the register and the pin name
refers to the pin.
For this configuration, the output should be defined as combinatorial, and the equation written as combi natorial. A
clock equation should also be written for the output. The
registered signal which is fed back into the array is identified with “.fb” or “.q” for ABEL or “.dfb” for CUPL.
ABEL and Atmel-ABEL
O21 = I1 # !I2 # I3 # !I4 # I5;
CUPL and Atmel-CUPL
O21 = I1 # !I2 # I3 # !I4 # I5;
Figure 3. Combinatorial Output plus Buried Register
ABEL and Atmel-ABEL
O20 = I3 & !I4;
O20Q1.d = I2 # I3 # I4;
CUPL and Atmel-CUPL
O20 = I3 & !I4;
O20Q1.d = I2 # I3 # I4;
3
Figure 4. Registered Output
Figure 5. Registered Output plus Buried Register
ABEL and Atmel-ABEL
O23.d = I1 # I2 # I3 # I4 # I5;
CUPL and Atmel-CUPL
O23.d = I1 # I2 # I3 # I4 # I5;
ABEL and Atmel-ABEL
O23.d = I1 & I2;
O23Q1.d = I3 & I4;
CUPL and Atmel-CUPL
O23.d = I1 & I2;
O23Q1.d = I3 & I4;
4
CMOS PLD
Figure 6. Both Registers Buried, I/O Pin Used as Input
Asynchronous Reset, Synchronous Preset and Output Enable
There is an indivi dual as ynchro nous res et produ ct term for
each register. A s ingle sync hronou s preset product te rm is
used to preset all registers. Since the synchronous preset
requires a clock, an individual register will only preset if it is
clocked. Each I/O pin has an individual output enable product term. The following examples show how the
asynchronous reset, synchronous preset, and output
enable functions are defined:
ABEL and Atmel-ABEL
O23.ar = I1;
O23.sp = I2; “NOTE: preset is for all registers
O23.oe = I3 & I4;
O22.oe = 1;
CUPL and Atmel-CUPL
O23.ar = I1;
O23.sp = I2; /*NOTE: preset is for all registers*/
O23.oe = I3 & I4;
O22.oe = 'b'1;
5
Programmable Polarity Control
D-type or T-type Registers
Each I/O pin has pr ogrammabl e polarity con trol. Pleas e
refer to the application note “Using the Programmable
Polarity Control” for details on using the polarity control.
Clock Options
For the ATV750, each register has an independent clock
product term. For the ATV750B, each register can be configured to use either the clock product term or a
synchronous clock pin (see Figure 8).
Figure 8. Clock Options
The following examples show how the clock is defined for
the two different modes:
For the ATV750, the registers can only be configured as
D-type flip-flops. For the ATV750B, the registers can be
configured as eithe r D-type or T-typ e flip-f lops. The foll owing examples show ho w to co nfi gur e th e re g ister s as eit her
D- or T-type:
Figure 9 shows a watchdog timer circuit which is implemented in an ATV750B. The circuit detects whether an
event occurs at a regular in terva l. For this desig n, the ti mer
is set to detect whether the WATCHDOGL input goes low
every 18 ms. An 8 bit counter running on a 1ms clock
counts the number of clock cycles between events. A small
state machine detects whether the event occurs within the
expected window. If the event occurs either too soon or too
late, an error is generated. If the event occurs during the
window, the counter is reset to time the next event.
The ABEL and CUPL descriptions for this design follow.
Figure 9. Design Example
"Internal counter values used in state machine
" (these are 1 less than actual due to state machine delay)
LT18 = (COUNT8 < 16);
GT22 = (COUNT8 > 20);
MS256 = (COUNT8 == 255);
IRESET = (STATE_MACH == ERROR);
Equations
" For WATCHDOGL input, generate a 1 clock cycle wide pulse.
" Uses opposite edge of system clock from the state machine to
" insure that there are no setup or metastability problems between
" the inputs to the state machine and the state machine clock.
WDOG.d = (!WATCHDOGL & !WDOG2.fb);
WDOG2.d = (!WATCHDOGL);
WDOG.ck = !CLK1;
WDOG2.ck = !CLK1;
WDOG.ar = !PORL;
WDOG2.ar = !PORL;
" Generate 1 clock cycle wide error pulse upon entering ERROR
" state. Uses opposite clock edge from state machine to ensure
" error pulse generation is clean.
ERRPULSE.d = (IRESET & !ERRPULSE2.fb);
ERRPULSE2.d = IRESET;
ERRPULSE.ck = !CLK1;
ERRPULSE2.ck = !CLK1;
ERRPULSE.ar = !PORL;
ERRPULSE2.ar = !PORL;
"State machine clocks and resets
STATE_MACH.ck = CLK1;
STATE_MACH.ar = !PORL;
state_diagram STATE_MACH;
state POWERUP:
if (WDOG & !MS256) then IDLE;
else if (MS256) then ERROR;
else POWERUP;
state IDLE:
if (WDOG) then ERROR;
else if (!LT18) then WAIT;
else IDLE;
state WAIT:
if (WDOG) then IDLE;
else if (!WDOG & GT22) then ERROR;
else WAIT;
state ERROR:
if (MS256) then POWERUP;
else ERROR;
/* Internal counter values used in state machine */
/* (these are 1 less than actual due to state machine delay) */
LT18 = COUNT8:[0..F];
GT22 = COUNT8:[15..FF];
MS256 = COUNT8:FF;
IRESET = STATE_MACH:ERROR;
/* Equations */
/* For WATCHDOGL input, generate a 1 clock cycle wide pulse.
Uses opposite edge of system clock from the state machine to
insure that there are no setup or metastability problems between
the inputs to the state machine and the state machine clock. */
WDOG.d = (!WATCHDOGL & !WDOG2);
WDOG2.d = (!WATCHDOGL);
WDOG.ck = !CLK1;
WDOG2.ck = !CLK1;
WDOG.ar = !PORL;
WDOG2.ar = !PORL;
/* Generate 1 clock cycle wide error pulse upon entering ERROR
state. Uses opposite clock edge from state machine to ensure
error pulse generation is clean. */
ERRPULSE.d = (IRESET & !ERRPULSE2);
ERRPULSE2.d = IRESET;
ERRPULSE.ck = !CLK1;
ERRPULSE2.ck = !CLK1;
ERRPULSE.ar = !PORL;
ERRPULSE2.ar = !PORL;
/* State machine clocks and resets */
STATE_MACH.ck = CLK1;
STATE_MACH.ar = !PORL;
sequence STATE_MACH {
present POWERUP
if (WDOG & !MS256) next IDLE;
if (MS256) next ERROR;
default next POWERUP;
present IDLE
if (WDOG) next ERROR;
if (!WDOG & !LT18) next WAIT;
default next IDLE;
present WAIT
if (WDOG) next IDLE;
if (!WDOG & GT22) next ERROR;
default next WAIT;
present ERROR
if (MS256) next POWERUP;
default next ERROR;
}
CMOS PLD
CUPL Simulation Input File (WATCH.SI)
Name WATCH;
Partno N/A;
Date 3/27/95;
Rev. -;
Designer PLD Expert;
Company Atmel;
Assembly -;
Location -;
Device V750B;
ORDER: CLK1,%1,PORL,%1,WATCHDOGL,%2,STATE_MACH,%1,COUNT8,%1,RESET;
BASE: decimal;
VECTORS:
$MSG “Test normal powerup and normal watchdog input”;
1 0 X “0" ”0" H
K 1 1 “0" ”1" L
K 1 1 “0" ”2" L
K 1 1 “0" ”3" L
K 1 0 “2" ”0" L
$REPEAT 9;
K 1 0 “2" ”*" L
11
$REPEAT 7;
K 1 1 “2" ”*" L
K 1 1 “1" ”17" L
K 1 1 “1" ”18" L
K 1 1 “1" ”19" L
K 1 0 “2" ”0" L
K 1 0 “2" ”1" L
K 1 0 “2" ”2" L
$MSG “Test various state transitions and timeouts”;
1 0 X “0" ”0" H
K 1 1 “0" ”1" L
K 1 1 “0" ”2" L
K 1 1 “0" ”3" L
K 1 0 “2" ”0" L
$REPEAT 15;
K 1 1 “2" ”*" L
K 1 1 “2" ”16" L
K 1 1 “1" ”17" L
K 1 1 “1" ”18" L
K 1 1 “1" ”19" L
K 1 1 “1" ”20" L
K 1 1 “1" ”21" L
K 1 1 “3" ”22" H /*Input doesn't happen*/
K 1 1 “3" ”0" H
K 1 1 “3" ”1" H
K 0 X “0" ”0" H /*RESET*/
K 1 1 “0" ”1" L
K 1 0 “2" ”0" L
K 1 1 “2" ”1" L
K 1 0 “3" ”0" H /*Input hits too soon*/
K 1 1 “3" ”0" H
K 1 1 “3" ”1" H
1 0 1 “0" ”0" H
$REPEAT 255; /*Test POWERUP timeout*/
K 1 1 “0" ”*" L
$REPEAT 257; /*Test ERROR timeout*/
K 1 1 “3" ”*" H
K 1 1 “0" ”*" L
K 1 1 “0" ”*" L
K 1 1 “0" ”*" L
12
BDTIC www.bdtic.com/Semiconductor
CMOS PLD
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.