Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

16
1 Introduction to Programmable Logic Devices PLDs 1. Programmable Logic devices Logic Device Families The main differences in programmable devices are between: mask-programmable and field-programmable erasable and non-erasable The mask-programmable types are programmed when they are manufactured whereas the user sets up the field-programmable device with some form of programmer. Mask-programmable devices are expensive in low production runs but are relatively cheap for large production runs, which is opposite for the field-programmable devices. An erasable device allows the stored set-up to be changed whereas the non-erasable type is permanent.

Transcript of Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

Page 1: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

1

Introduction to Programmable Logic Devices PLDs

1. Programmable Logic devices

Logic Device Families

The main differences in programmable devices are between: • mask-programmable and field-programmable • erasable and non-erasable The mask-programmable types are programmed when they are manufactured whereas the user sets up the field-programmable device with some form of programmer. Mask-programmable devices are expensive in low production runs but are relatively cheap for large production runs, which is opposite for the field-programmable devices. An erasable device allows the stored set-up to be changed whereas the non-erasable type is permanent.

Page 2: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

2

• First type of user-programmable chip • Device has a fixed, fully decoded AND plane and a programmable OR plane • One-time programmable • A logic circuit can be implemented by using the PROM’s address lines as the circuit’s

inputs , and the circuit’s outputs are then defined by the stored bits . • Any truth table function can be implemented in this way . • Two basic versions of PROM :

1) Mask-Programmable : can be programmed Only by the manufacturer . Mask-programmable chip has less delay because connections within the device can be hardwired during manufacture .

2) Field-Programmable : can be programmed by the end-user .Field-programmable chips are less expensive , and can be programmed immediately. The Field Programmable PROM developed into two types, the Erasable Programmable Read-Only Memory (EPROM) and the Electrically Erasable Programmable Read-Only Memory (EEPROM). The EEPROM has the advantage of being erasable and reprogrammable many times.

inputaddress

Address decodinglike in a ROM

Programmablepart

outputword

Fig. 1-1 : PROM structure

PROM Example:

f=x^y ^z x y z fn . . .f1 f0

0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1

D e c o d e r

NOT USED

0 1 1 0 1 0 0 1

XYZ

fn

Page 3: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

3

(Programmable Logic Array)

A PLA consists of two levels of logic gates: a programmable, “wired” AND-plane

followed by a programmable, “wired” OR-plane. A PLA's structure allows any of its inputs (or their complements) to be AND-ed together in the AND plane; each AND plane output can thus correspond to any product term of the inputs. Similarly, users can configure each OR plane output to produce the logical sum of any AND plane output. With this structure, PLAs are well-suited for implementing logic functions in sum-of-products form. They are also quite versatile, since both the AND and OR terms can have many inputs (product literature often calls this feature "wide AND and OR gates")

ProgrammableOR

Array

Programmableconnection

inputaddress

Programmable

ANDArray

outputword

Fig. 1-2: PLA structure

In a PLA, the number of AND functions is independent of the number of inputs, and the number of OR functions is independent of both the number of inputs and the number of AND functions. Also, SPLDs need not have AND input arrays feeding OR output arrays; some devices have two NAND arrays, others have two NOR arrays, and some have a NAND array driving a NOR array.

(Programmable Array Logic)

It consists of Programmable AND-Plane followed by a fixed OR-Plane .The number of products in an SOP form will be limited to a fixed number (usually 4-10 product

Page 4: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

4

terms). The number of variables in each product term limited by number of input pins (>=10 inputs) .The number of independent functions limited by number of output pins.

Programmableconnection

ProgrammableANDArray

outputword

InputAddress

Fixedconnection

FixedOR

Array

Missing connectionscompared to a PLA

Fig. 1-3: PAL structure

• also known as:

– EPLD (Erasable Programmable Logic Device) – PEEL (Programmable Electrically Erasable Logic) – EEPLD (Electrically-Erasable Programmable Logic Device) – MAX (Multiple Array matriX, Altera)

• CPLDs consist of multiple PAL-like logic blocks interconnected with a programmable switch matrix .

• Typically, each logic block contains 4 to 16 macrocells depending on the vendor and the architecture.

• A macrocell on most modern CPLDs contains a sum-of-products combinatorial logic function and an optional flip-flop. The combinatorial logic function typically supports four to 16 product terms with wide fan-in. In other words, a macrocell function can have many inputs, but the complexity of the logic function is limited. Contrast this

PLAs are more flexible than PALs, but PALs operate faster, because hard-wired connections take less time to switch than their programmable equivalents. Due to the fact that they are fast and cheap to manufacture, PALs are the most common of all the SPLDs.

Page 5: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

5

structure to an FPGA logic block where complexity is unlimited, but the lookup table has only four inputs.

Fig 1-4. The CPLD (or EPLD) architecture uses a few large, PAL-like blocks with I/O fixed inside of each

block. CPLDs are based on one of three process technologies

• EPROM, • EEPROM, or • FLASH.

EPROM-based CPLDs are usually one-time programmable (OTP) unless they come in a UV-erasable windowed package. EEPROM and FLASH processes are erasable technologies. However, not all EEPROM- and FLASH-based devices are programmable while soldered on a board. In-system programmability (ISP) requires special on-chip programming logic, and not all CPLDs come with it, even when built with EEPROM and FLASH technologies. You can erase and program those lacking that circuitry in a device programmer.

CPLDs are generally best for control- oriented designs due in part to their fast pin-to-pin performance. The wide fan-in of their macrocells makes them well-suited to complex, high-performance state machines . At the high end (in terms of numbers of gates), a lot of overlap with FPGAs exists in potential applications. Traditionally, CPLDs have been chosen over FPGAs whenever high-performance logic is required. Because of its less flexible internal architecture, the delay through a CPLD (measured in nanoseconds) is more predictable and usually shorter .

Page 6: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

6

A typical CMOS Sea-Of-Gates structure consisting of adjacent P- and N-channel transistors is shown in Figure 7.

• Mask-Programmable Gate Array (MPGA) was developed to handled larger logic circuits.

• A common MPGA consists of rows of transistors that can be interconnected to implement desired logic circuits. User sepcified connects are available both within the rows and between the rows. This enabled implementation of basic logic gates and the ability to interconnect the gates.

• As the metal layers are defined at the manufacturer, significant time and cost are incurred in producing the run. In 1985, Xilinx Inc. introduced the FPGA (Field Programmable Gate Array). The interconnects between all the elements were designed to be user programmable

Fig. 1-7: Sea of Gates (SOG) MPGA Architecture

P- Channel

n- Channel

Vcc

GND

Page 7: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

7

• Like MPGA, an FPGA consists of an array of uncommitted elements that can be

interconnected in general way . • Like a PAL, the interconnections between elements are user-programmable . • FPGAs are approximately 10 times less dense \ and 3 times slower than MPGAs . • Consist of an array of logic blocks, surrounded by programmable I/O blocks, and

connected with programmable interconnect .

Fig. 1-8 : The FPGA

It consists of a two-dimensional array of logic blocks that can be connected by general interconnection resources . The interconnect comprises segments of wire , where the segments may be of various length . Present in the interconnect are the programmable switches that serve to connect the logic blocks to the wire segments , or one wire segment to another .

The structure and content of a logic block is called its architecture. Logic block architecture can be designed in many different ways . There are two primary classes of FPGA architectures:

First, ”coarse-grained” architectures consist of fairly large logic blocks, often containing two or more lookup tables and two or more flip-flops. In these architectures, a 4-input lookup table (think of it as a 16 x 1 ROM) implements the actual logic .

Page 8: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

8

The other architecture is called ”Fine-grained”. These devices hold a large number of relatively simple logic blocks. Each block usually contains a flip-flop and either a 2-input logic function or a 4:1 multiplexer.

fff

Look Up Tables ♦ Combinatorial Logic is stored in 16x1

SRAM Look Up Tables (LUTs) in a CLB ♦ Example: ♦ Capacity is limited by number of inputs,

not complexity ♦ Each function generator can be used as

4 input logic (LUT) or as high speed sync.dual port RAM

Generally, FPGAs have many more registers and I/O than CPLDs and typically use less power. FPGAs are usually best for datapath-oriented design but don’t have the fast pin-to-pin performance associated with CPLDs

4:1 Multiplexer ♦ Each logical function can be implemented by a Multiplexer .

f=x.y+z x y z f 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1

f

x 0 y

1 0

0 z 0

Page 9: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

9

CPLDs FPGAs

Architecture Large, wide fan-in blocks of

AND-OR logic Array of small logic blocks surrounded by I/O

Applications Bus interfaces Complex state machines Fast memory interfaces Wide decoders PAL-device integration

Logic consolidation Board integration Replace obsolete devices Simple state machines Complex controllers/interfaces

Key Attributes Fast pin-to-pin performance Predictable timing Easy to use

Very high density Lots of I/Os and flip-flops Generally lower power SRAM devices are reprogrammable

Gate Capacity 300-6,000 gates 800-100,000 gates Design Timing Fixed, PAL-like

Very fast pin-to-pin performance

Application dependent Very high shift frequencies

Number of I/Os

30-200 50-400

Number of Flip-flops

30-200 100-5,500

Process Technology

EPROM EEPROM FLASH

SRAM Anti-fuse EEPROM

In-System Programmable

Some EEPROM- and FLASH-based devices

SRAM-based devices and some EEPROM-based devices

One-Time Programmable (OTP)

EPROM devices in plastic packages. Some EEPROM- and FLASH-based devices

All anti-fuse-based devices

Performance Predictable timing Up to 200MHz today

Application dependent Up to 100 MHz today

Power Consumption

0.5-2.0W static 0.5-4.0W dynamic

Very low static Dynamic consumption is application dependent, 0.1-2W typical

comparing CPLDs & FPGAs

Page 10: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

10

1. Programming Technology

In the Static RAM FPGA, programmable connections are made using pass-

transistors, transmission gates, or multiplexers that are controlled by SRAM cells. routing wire routing routing to logic cell wire wire input a) pass-transistor b) transmission gate c) multiplexer

In the case of pass-transistor approach RAM cell controls whether pass-gates are on or off. When off, the pass-gate presents a very high resistance between the two wires to which it is attached. When the pass gate is turned on, it forms a relatively low resistance connection between the two wires. The multiplexer would typically be used to optionally connect one of the several wires to a single input of a logic block .

An anti-fuse resides in a high-impedance state; and can be programmed into low impedance or "fused" state . The Anti-fuse FPGA vendor, Actel, uses a poly-diffusion antifuse and the high current density causes a large power dissipation in a small area, which melts a thin insulating dielectric between poly-silicon and diffusion electrodes and forms a thin, permanent, and resistive silicon link of about 20nm in diameter. Actel calls it's antifuse a programmable low-impedance circuit element or PLICE.

Actel Antifuse

RAM cell

Contact cut to polysilicon

metal 1

RAM cell

metal 2

RAM cell

RAM cell

Polysilicon oxide

Contact cut to diffution

MUX

Page 11: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

11

This method is the same as used in the EPROM memories.

EPROM transistors are used in FPGAs in a different manner than are static RAM cells or anti-fuses . They are used as “pull down” devices for logic block input . One wire , called the “word line” is connected to the select gate of the EPROM transistore . As long as the transistor has not been programmed into the OFF state, the word line can cause the “bit line”, which is connected to a logic block input to be pulled to logic zero. Since a pull-up resistor is present on the bit line, this scheme allows the EPROM transistors realize “wired-AND” logic function. CPLDs (and many SPLDs), use EPROM or EEPROM technology to implement wired-AND plane.

EPROM Application

Page 12: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

Perangkat Logika Terprogram

Perbedaan utama dalam perangkat bisa-diprogram di antaranya adalah:

mask-programmable dan field-programmable

bisa-dihapus dan tidak bisa-dihapus

Tipe mask-programmable diprogram saat mereka dibuat di pabrik di mana pengguna mengatur

perangkat field-programmable dengan beberapa macam pemrogram.

Perangkat mask-programmable bernilai mahal dalam produksi rendah tetapi bernilai murah

dalam produksi besar secara relatif yang berlawanan dengan perangkat field-programmable.

Sebuah perangkat yang dapat dihapus membolehkan pengaturan tersimpan untuk diubah,

sedangkan tipe yang tidak dapat dihapus pengaturannya tersimpan secara permanen.

PROM (Programmable Read-Only Memory/Memori Baca-Saja Bisa-Diprogram)

Tipe pertama dari chip bisa-diprogram pengguna.

Perangkat ini memiliki sebuah pengurai sandi bidang AND secara penuh dan ditetapkan dan

sebuah bidang OR bisa-diprogram.

Bisa-diprogram sekali-waktu.

Sebuah sirkuit logika dapat diimplementasikan dengan menggunakan baris alamat PROM

sebagai masukan sirkuit, dan keluaran sirkuit kemudian didefinisikan oleh bit tersimpan.

Dua versi dasar dari PROM:

o Mask-programmable: hanya dapat diprogram oleh pabrik, memiliki lebih sedikit

penundaan karena koneksi dalam perangkat disambungkan dengan kabel selama

pemabrikan.

o Field-programmable: dapat diprogram oleh pengguna terakhir, agak lebih mahal, dapat

diprogram sesegera mungkin, dikembangkan menjadi dua tipe, EPROM (Erasable

Programmable Read-Only Memory/Memori Baca-Saja Bisa-Diprogram Bisa-Dihapus) dan

EEPROM (Electrically Erasable Programmable Read-Only Memory/Memori Baca-Saja

Bisa-Diprogram Bisa-Dihapus secara Listrik). EEPROM memiliki keuntungan bisa-dihapus

dan bisa-diprogram ulang beberapa kali.

SPLD (Simple Programmable Logic Device/Perangkat Logika Bisa-Diprogram Simpel)

Page 13: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

PLA (Programmable Logic Array/Larik Logika Bisa-Diprogram)

Sebuah PLA berisi dua tingkat gerbang logika: sebuah plane AND berkabel bisa-diprogram diikuti

sebuah plane OR berkabel bisa-diprogram. Struktur PLA membolehkan masukan apapun (atau

komplemennya) untuk menjadi AND-ed bersama di Lane AND; setiap keluaran plane AND dapat saling

bercocokan dengan syarat produk masukan apapun. Dengan cara yang, sama pengguna dapat

mengatur setiap keluaran plane OR untuk memproduksi penjumlahan logis dari setiap keluaran plane

AND. Dengan struktur ini, PLA sangat baik dan cocok untuk mengimplementasikan fungsi logika dalam

bentuk jumlah produk. PLA juga benar-benar serba guna, sejak syarat AND dan OR dapat memiliki

banyak masukan (literatur produk kadang menyebut fitur ini sebagai “gerbang AND dan OR lebar”).

PAL (Programmable Array Logic/Logika Larik Bisa-Diprogram)

PAL berisi plane AND bisa-diprogram diikuti dengan plane OR yang tetap. Angka produk dalam

bentuk SOP akan terbatas untuk angka tetap (biasanya 4-10 syarat produk). Angka bervariasi

tergantung masing-masing syarat produk yang dibatasi oleh jumlah pin masukan (>=10 masukan) dan

jumlah fungsi independen yang dibatasi oleh jumlah pin keluaran.

CPLD (Complex Programmable Logic Device/Perangkat Logika Bisa-Diprogram Kompleks)

Juga dikenal sebagai:

o EPLD (Erasable Programmable Logic Device/Perangkat Logika Bisa-Diprogram Bisa-

Dihapus)

o PEEL (Programmable Electrically Erasable Logic/Logika Bisa-Dihapus secara Elektrik Bisa-

Diprogram)

o EEPLD (Electrically-Erasable Programmable Logic Device/Perangkat Logika Bisa-

Diprogram Bisa Dihapus secara Elektrik)

o MAX (Multiple Array Matrix/Perkalian Matriks Larik)

CPLD berisi blok logika seperti perkalian PAL yang saling terhubung dengan matriks pengubah

bisa-diprogram.

Secara tipikal, tiap blok logika mengandung 4 hingga 16 makrosel bergantung penerbit dan

arsiteknya.

Sebuah makrosel dalam CPLD modern kebanyakan mengandung jumlah produk fungsi logika

kombinatorial dan flip-flop opsional. Fungsi logika kombinatorial secara tipikal mendukung 4

hingga 16 syarat produk dengan kipas lebar. Dengan kata lain, fungsi sebuah makrosel dapat

memiliki banyak masukan, tetapi kompleksitas fungsi logika terbatas. Berbeda dengan blok

Page 14: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

logika FPGA yang kompleksitasnya tidak terbatas, tetapi tabel lookup-nya hanya memiliki empat

masukan.

CPLD dibuat berdasarkan salah satu dari tiga proses teknologi

EPROM,

EEPROM, atau

FLASH.

CPLD berdasarkan EPROM biasanya merupakan one-time programmable (OTP/dapat diprogram

sekali waktu) kecuali mereka dibuat sepaket dalam sebuah UV dapat dihapus berjendela.

Proses EEPROM dan FLASH merupakan teknologi dapat dihapus. Bagaimanapun juga, tidak

semua perangkat berdasarkan EEPROM dan FLASH dapat diprogram jika mereka dimaterikan di atas

papan. In-system programmability (ISP/programmabilitas dalam sistem) membutuhkan logika

pemrogram on-chip khusus dan tidak semua CPLD dilengkapi dengan itu, walaupun dilengkapi dengan

teknologi EEPROM dan FLASH. Anda dapat menghapus dan memprogram untaian kekurangan

tersebut dalam sebuah perangkat pemrogram.

Mask-Programmable Gate Array (MPGA/Larik Gerbang Bisa-Diprogram “Tertutup”)

MPGA dikembangkan untuk digunakan pada sirkuit logika yang lebih besar.

MPGA yang umum terdiri atas baris-baris transistor yang dapat saling terhubung untuk

mengimplementasikan sirkuit logika yang diinginkan. Koneksi yang disebutkan pengguna

tersedia di keduanya, di dalam baris ataupun di antara baris. Hal ini akan mengaktifkan

implementasi gerbang logika dasar dan kemampuan untuk menghubungkan gerbang.

Saat lapisan metal dibuat di pabrik, waktu dan biaya yang signifikan dibutuhkan untuk

memproduksinya. Di tahun 1985, Xilinx Inc. memperkenalkan FPGA (Field Programmable Gate

Array/Larik Gerbang Bisa-Diprogram “Terbuka”). Penghubungan antar semua elemen didesain

agar dapat diprogram pengguna.

Field-Programmable Gate Array (FPGA/Larik Gerbang Bisa-Diprogram “Terbuka”)

Seperti MPGA, sebuah FPGA terdiri dari sebuah larik elemen tak terikat yang dapat saling

terhubung dalam arah yang umum.

Seperti sebuah PAL, interkoneksi antar elemen dapat diprogram pengguna.

FPGA tidak lebih padat sekitar 10 kali dan lebih lambat 3 kali daripada MPGA.

Page 15: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

Terdiri dari sebuah larik blok logika, dikelilingi oleh blok masukan/keluaran yang dapat

diprogram, dan terhubung dengan interkoneksi yang dapat diprogram.

Ini terdiri atas larik blok logika dua dimensi yang dapat saling terhubung dengan sumber yang

umum. Interkoneksi terdiri dari segmen kabel, di mana panjang segmen ini mungkin bervariasi. Ada di

dalam interkoneksi merupakan pengubah yang dapat diprogram yang menyediakan koneksi blok

logika dengan segmen kabel atau satu segmen kabel ke yang lainnya.

Blok Logika

Struktur dan muatan blok logika disebut arsitektur. Arsitektur blok logika dapat didesain dalam

banyak cara yang berbeda.

Terdapat dua kelas primer dari arsitektur FPGA:

Pertama, arsitektur “coarse-grained” terdiri atas blok logika besar secara adil, walaupun

mengandung dua atau lebih tabel lookup dan dua atau lebih flip-flops. Dalam arsitektur ini,

sebuah tabel lookup 4 masukan mengimplementasikan logika aktual.

Arsitektur lainnya disebut “fine-grained”. Perangkat ini memberikan sejumlah besar blok logika

simpel secara relatif. Tiap blok biasanya terdiri atas sebuah flip-flop dan salah satu dari fungsi

logika 2 masukan atau pengali 4:1.

Teknologi Pemrograman

Teknologi RAM Statis

Dalam RAM statis FPGA, koneksi yang dapat diprogram dibuat menggunakan pass-transistors,

gerbang transmisi, atau pengali yang dikontrol oleh sel SRAM.

Pass-transistor mendekati kontrol sel RAM di saat gerbang pass hidup ataupun mati. Saat mati,

gerbang pass menghadirkan sebuah resistan sangat tinggi di antara dua kabel dan tempat di mana

kabel itu terpasang. Saat gerbang pass diaktifkan, itu membentuk koneksi resisten relatif rendah di

antara dua kabel. Pengali akan digunakan secara tipikal untuk menghubungkan satu dari beberapa

kabel ke masukan tunggal blok logika secara opsional.

Teknologi Anti. Sekering

Page 16: Perangkat Logika Dapat Diprogram dan Teknologi Pemrograman

Sebuah anti sekering terletak di dalam keadaan yang berimpedansi tinggi; dan dapat diprogram

ke dalam keadaan berimpedansi rendah.

Penerbit FPGA anti sekering, Actel, menggunakan poly-diffusion anti sekering dan kepadatan

arus listrik tinggi menyebabkan menghilangnya daya yang besar di area yang kecil, yang melelehkan

dielektrik bersekat tipis di antara poly-silicon dan elektrode penyebar dan membentuk sebuah tautan

silikon yang tipis, permanen, dan memberi hambatan dengan diameter sekitar 20 nm. Actel menyebut

anti sekering tersebut sebagai programmable low-impedance circuit element atau PLICE (elemen

sirkuit impedansi rendah dapat diprogram).

Teknologi EPROM/EEPROM

Metode ini sama dengan yang digunakan pada memori EPROM.

Transistor EPROM digunakan pada FPGA dengan cara yang berbeda daripada sel RAM statis

atau anti sekering. Mereka digunakan untuk menarik perangkat untuk masukan blok logika. Satu

kabel, disebut “garis kata” terhubung dengan gerbang yang dipilih dari transistor EPROM. Sepanjang

transistor tidak diprogram dalam keadaan OFF, garis kata dapat menyebabkan “garis bit”, yang

terhubung dengan masuk blok logika untuk ditarik menjadi nol logika. Sejak penarikan resistor terjadi

di garis bit, skema ini membolehkan transistor EPROM merealisasikan fungsi logika “AND berkabel”.

CPLD (dan banyak SPLD) menggunakan teknologi EPROM atau EEPROM untuk mengimplementasikan

plane AND berkabel.