All trademarks mentioned in this document http://www.DigitalCoreDesign.com
are trademarks of their respective owners. http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.
Programmable Interval Timer
ver 1.05
OVERVIEW
The D8254 is a programmable interval
timer/counter, binary compatible with industry
standard 82C54. The D8254 solves one of
the most common problems in any micro-
computer system, the generation of accurate
time delays under software control. The
D8254 can be used as a:
Real time clock
Even counter
Digital one-shot
Programmable rate generator
Square wave generator
Binary rate multiplier
Complex waveform generator
Complex motor controller
KEY FEATURES
Three independent 16-bit counters
Six programmable Counter modes
Interrupt on terminal count
Hardware retriggerable One-Shot
Rate Generator
Square wave mode
Software triggered strobe
Hardware trig gered strobe
Binary or BCD counting
Status Read Back Command
Simple interface allows easy connection
to microcontrollers
Fully synthesizable, static design with no
internal tri-states
DELIVERABLES
Source code:
VHDL Source Code or/and
VERILOG Source Code or/and
Encrypted, or plain text EDIF netlist
VHDL & VERILOG test bench environ-
ment
Active-HDL automatic simulation mac-
ros
ModelSim automatic simulation macros
Tests with reference responses
Technical documentation
Installation notes
HDL core specification
Datasheet
Synthesis scripts
Example application
Technical support
IP Core implementation support
3 months maintenance
Delivery the IP Core updates, mi-
nor and major versions changes
Delivery the documentation up-
dates
Phone & email support
All trademarks mentioned in this document http://www.DigitalCoreDesign.com
are trademarks of their respective owners. http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.
LICENSING
Comprehensible and clearly defined licensing
methods without royalty fees make using of
IP Core easy and simply.
Single Design license allows use IP Core in
single FPGA bitstream and ASIC implemen-
tation.
Unlimited Designs, One Year licenses allow
use IP Core in unlimited number of FPGA
bitstreams and ASIC implementations.
In all cases number of IP Core instantiations
within a design, and number of manufactured
chips are unlimited. There is no time restric-
tion except One Year license where time of
use is limited to 12 months.
Single Design license for
VHDL, Verilog source code called HDL
Source
Encrypted or plain text EDIF called Netlist
One Year license for
Encrypted N et lis t only
Unlimited Designs license for
HDL Source
Netlist
Upgrade from
HDL Source to Netlist
Single Design to Unlimited Designs
SYMBOL
datai(7:0)
addr(1:0)
cs
rd
wr
datao(7:0)
out0
clk0
gate0
rst
out1
clk1
gate1
out2
clk2
gate2
PINS DESCRIPTION
PIN TYPE DESCRIPTION
rst input Global reset
datai(7:0) input Processor data bus (input)
addr(1:0) input Processor address lines
cs input Chip select
rd input Processor read strobe
wr input Processor write strobe
clk0 input Clock input for Counter 0
gate0 input Gate input for Counter 0
clk1 input Clock input for Counter 1
gate1 input Gate input for Counter 1
clk2 input Clock input for Counter 2
gate2 input Gate input for Counter 2
datao(7:0) output Processor data bus (output)
out0 output Output of Counter 0
out1 output Output of Counter 1
out2 output Output of Counter 2
BLOCK DIAGRAM
Counter 0
clk0
gate0
out0
Counter 1
Read/Write
Logict
Counter 2
rs
t
addr(1:0)
w
r
rd
cs
Data Bus
Buffer
Control Word
Register
datai(7:0)
datao(7:0)
clk1
gate1
out1
clk1
gate1
out1
Read Write Logic - The Read/Write Logic
accepts inputs from the system bus and gen-
erates control signals for the other functional
blocks of the D8254. ADDR(1:0) select one of
the three counters or the Control Word Regis-
ter to be read from/written into. A “low'' on the
RD input tells the D8254 that the CPU is
reading one of the counters. A “low'' on the
WR input tells the D8254 that the CPU is writ-
ing either a Control Word or an initial count.
Both RD and WR are qualified by CS; RD
and WR are ignored unless the 82C54 has
been selected by holding CS low. The WR
and CLK signals should be synchronous. This
All trademarks mentioned in this document http://www.DigitalCoreDesign.com
are trademarks of their respective owners. http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.
is accomplished by using a CLK input signal
to the D8254 counters which is a derivative of
the system clock source. Another technique
is to externally synchronize the WR and CLK
input signals. This is done by gating WR with
CLK.
Data Bus Buffer 8-bit buffer is used to inter-
face the D8254 to the system bus.
Control Word - The Control Word Register is
selected by the Read/Write Logic when
ADDR(1:0) = 11. If the CPU then does a write
operation to the D8254, the data is stored in
the Control Word Register and is interpreted
as a Control Word used to define the opera-
tion of the Counters.
COUNTERS BLOCK
DIAGRAM
All three Counters (0, 1, 2) are functionally
identical and fully independent. Each can
work as a 16 bit wide Binary or BCD counter,
in one of the six available modes:
Interrupt on terminal count
Hardware retriggerable One-Shot
Rate Generator
Square wave mode
Software triggered strobe
Hardware triggered strobe
The internal block diagram of a single counter
is shown in Figure below.
CRLCRM
CE
OLLOLM
Satus
Register
Status
Latch
Ctrl. Word
Register
Control
Unit
clkn
gaten
outn
datao(7:0)
datai(7:0)
The central element of each Counter is CE
module - Counting Element – 16 bit pre-
settable synchronous down BIN/BCD
counter.
Status Register, Status Latch – Status
register contains actual mode declaration and
value of output signal. Latched in Status
Latch, after receiving Read-Back Command
with STATUS Bit = 0.
Control Unit – Controls read/write operation
and decrementing of CE.
CR M, CR L – Input data registers. When
new count is written to counter, the count is
written in the CR and later transferred to CE.
OL L, OL M – Output data registers. Latched
when the suitable Counter Latch Command is
sent to the D8254.
Control Word - The Control Word Register is
selected by the Read/Write Logic when
ADDR(1:0) = 11. If the CPU then does a write
operation to the D8254, the data is stored in
the Control Word Register and is interpreted
as a Control Word used to define the opera-
tion of the Counters.
PERFORMANCE
The following table gives a survey about the
Core area and performance in the LATTICE®
devices after Place & Route (all key features
have been included):
Device Speed
grade LUTs/PFUs Fmax
ispXPGA -5 560 / 173 68 MHz
ORCA 4 -3 484 / 116 39 MHz
ORCA 3 -7 441 / 105 20 MHz
Core performance in LATTICE® devices
All trademarks mentioned in this document http://www.DigitalCoreDesign.com
are trademarks of their respective owners. http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.
CONTACTS
For any modification or special request
please contact to Digital Core Design or local
distributors.
Headquarters:
Wroclawska 94
41-902 Bytom, POLAND
e-mail: i
i
in
n
nf
f
fo
o
o@
@
@d
d
dc
c
cd
d
d.
.
.p
p
pl
l
l
tel. : +48 32 282 82 66
fax : +48 32 282 74 37
Field Office:
Texas Research Park
14815 Omicron Dr. suite 100
San Antonio, TX 78245,USA
e-mail: i
i
in
n
nf
f
fo
o
oU
U
US
S
S@
@
@d
d
dc
c
cd
d
d.
.
.p
p
pl
l
l
tel. : +1 210 422 8268
fax : +1 210 679 7511
Distributors:
MTC - Micro Tech Components GmbH
AM Reitweg 15
89407 Dillingen, GERMANY
e-mail : M
M
MT
T
TC
C
Ci
i
in
n
nf
f
fo
o
o@
@
@m
m
mt
t
tc
c
c.
.
.d
d
de
e
e
tel. : +49 9071 7945-0
fax : +49 9071 7945-20
Territory: Germany, Austria, Switzerland