PROGRAMMABLE LOGIC DEVICES Hardware make softer, software make harder Perkembangan Teknologi Logic Device Definisi PLD Konsep Dasar PLD Jenis-jenis PLD : PAL, PLA, GAL Memprogram dan men-develop pogram PLD Jenis PLD yang lain : FPLA, FPGA, CPLD Mengenal VHDL programmable logic devices 1
Perkembangan Teknologi Logic Devices Source: Dataquest Logic Standard Logic ASIC Programmable Logic Devices (PLDs) Gate Arrays Cell-Based ICs Full Custom ICs SPLDs (PALs) CPLDs FPGAs Acronyms SPLD = Simple Programmable Logic Device PAL = Programmable Array of Logic CPLD = Comple PLD FPGA = Field Programmable Gate Array ASIC = Application Specific Integrated Circuit programmable logic devices 2
Definisi PLD sebuah IC yang terdiri dari banyak gate / gerbang logika (terdiri dari gerbang AND, OR, NOT, register dan flip-flop), yang saling diinterkoneksikan di dalam IC tersebut. Programmable untuk membuat sebuah fungsi pada PLD tersebut, seorang disainer harus membuat program yang nantinya akan menyebabkan terjadinya proses fuse blowing pada interkoneksi gerbang, flip-flop maupun register, sehingga didapatkan pola rangkaian seperti yang diinginkan. programmable logic devices 3
Konsep Dasar A B A A B B AND array AB AB AB Product lines AB Fuse 1 4 OR array Input lines programmable logic devices 4 Sum of Product Output
Arsitektur PROM untuk PLD D C B A OR array (programmable) Contoh : AM27S13 -PROM dengan konfigurasi 5124 -Ada 512 address -Dengan 9 jalur address input -Ada 4 data output Fuse 0 AND array tersedia O 3 O 2 O 1 O 0 (hard wired) programmable logic devices 5 OUTPUT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 2 1
Fuse blown untuk mendapatkan output sesuai fungsi yang diinginkan D C B A O 3 = AB + CD O 2 = ABC O 1 = ABCD + ABCD O 0 = A + BD + CD Tabel Kebenaran untuk output O 3 D C B A O 3 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 Fuse 0 programmable logic devices blown O 6 3 O 2 O 1 O 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 2 1
Programmable Array Logic (PAL) D C B A OR array (hard wired) Arsitektur mirip dengan PROM, di bagian AND array adalah programmable, sedangkan di bagian OR array adalah hard wired Kelebihan dibandingkan dengan PROM, hanya fungsi AND yang diinginkan saja yang diprogram, dan output masing-masing AND disambungkan ke array OR Output OR merupakan fungsi jumlahan dari fungsi-fungsi AND yang diinginkan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 2 1 0 AND array O 3 O 2 O 1 O 0 (programmable) programmable logic devices OUTPUT7
PAL diprogram sesuai fungsi yang diinginkan D C B A Setiap OR maksimum hanya dapat menjumlahkan 4 buah minterm (dengan konfigurasi di samping). Jika sebuah OR hanya terisi kurang dari 4 minterm, maka minterm / AND array yang tidak digunakan diberi nilai 0 O 3 = AB + CD + 0 + 0 = AB + CD O 2 = ABC + 0 + 0 + 0 = ABC O 1 = ABCD + ABCD O 0 = A + BD + CD + 0 = A + BD + CD 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 2 1 0 AB CD 0 0 ABC 0 0 0 ABCD ABCD 0 0 A BD CD 0 programmable logic devices O 3 O 2 O 1 O 0 8
Field Programmable Logic Array (FPLA) Lebih kompleks dari PAL. Juga terdiri dari array programmable input AND dan array output OR. Mempunyai fleksibilitas untuk memprogram input OR Comple Programmable Logic Devices (CPLD) Merupakan PLD dalam kapasitas lebih besar. Terdiri dari beberapa PLD (multiple PLD) Struktur CPLD programmable logic devices 9
Field Programmable Gate Array (FPGA) Dikonfigurasi oleh End User Tidak memerlukan proses Fabrikasi Tersedia solusi yang mendukung chip customized VLSI Mampu menimplementasikan logic circuit, instant manufacturring, very-low cost prototype Pemrograman yang singkat untuk fungsi dan kemampuan yang setara dengan ASIC Struktur FPGA programmable logic devices 10
Struktur Dasar FPGA CLB CLB Slew Rate Control Passive Pull-Up, Pull-Down Vcc Switch Matri D Q Output Buffer Pad CLB CLB Q D Delay Input Buffer Programmable Interconnect I/O Blocks (IOBs) C1 C2 C3 C4 H1 DIN S/R EC G4 G3 G2 G1 G Func. Gen. DIN F' G' H' S/R Control SD D Q EC F4 F3 F2 F1 F Func. Gen. H Func. Gen. G' H' DIN F' G' H' 1 S/R Control RD SD D Q Y EC K H' F' 1 RD X Configurable Logic Blocks (CLBs) programmable logic devices 11
Memprogram PLD START A Develop circuit logic equation Run program development software Send fuse map and test data to programmer Program the PLD Works? Y Test the PLD in its actual circuit N Check design equations A Input logic equation Test the PLD Works? N Troubleshoot Software generate fuse map and test data Y DONE Flow Chart Mendisain, Memprogram dan mengetes PLD programmable logic devices 12
Beberapa peralatan yang diperlukan untuk mendisain dan membangun rangkaian menggunakan PLD : Personal Computer (PC) PLD Development Software Programming fiture Software untuk men-drive programming fiture Programmable Logic Device PLD Development Software Programming Software ZIF = Zero-insertion Force PC Programming Fiture Serial Cable ZIF Socket programmable logic devices 13
Programmable Logic - Design Flow 1 Design Entry dengan cara schematic, ABEL, VHDL, dan/atau Verilog. 2 Implementation yaitu Placement & Routing dan bitstream generation. Juga, analyze timing, view layout,. 3 Download meng-upload bitstream ke Hardware (FPGA chip) XC4000 XC4000 XC4000 programmable logic devices 14
Digambarkan dalam blok diagram : programmable logic devices 15
Flowchart siklus developing PLD Design Create JEDEC file Create source file Program PLD Compile In-circuit test Edit source file Y Errors? N Works? Identify design flaw N Simulate Y DONE Y Problems? Troubleshoot N programmable logic devices 16
Verilog HDL / VHDL Verilog HDL / VHDL adalah Bahasa Pendeskripsi Perangkat Keras / Hardware Description Language (HDL). Hardware Description Language adalah bahasa yang dapat digunakan untuk mendeskripsikan sebuah sistim digital, misal, sebuah komputer atau komponen dari komputer programmable logic devices 17
Apakah Verilog HDL / VHDL? Verilog adalah salah satu HDL yang digunakan oleh disainer hardware dalam industri maupun sekolah. HDL yang lain adalah VHDL (Very High-speed Integrated Circuit HDL) VHDL dibuat dengan standart IEEE pada tahun 1987, sedangkan Verilog pada tahun 1995. Verilog sangat menyerupai C, dan para insinyur elektronika dan komputer sudah familiar dengan bahasa C. VHDL menyerupai EDA (Electronic Digital Assembler). programmable logic devices 18
Struktur Pemrograman VHDL Entity dan Architecture Modeling: Behavior, Structure dan data Flow programmable logic devices 19
Ada tiga cara untuk mendiskripsikan Rangkaian 1. Structural Didesain berdasarkan perkomponen dan merangkai komponen tersebut 2. Dataflow (RTL) Didesain berdasarkan alur register data 3. Behavioural Didesain berdasarkan Algorithma programmable logic devices 20
Entity Declaration Spesifikasi eksternal dari rangkaian Architecture Body Fungsi sesungguhnya dari rangkaian Disain deskripsi minimum VHDL terdiri dari : Paling sedikit satu entity dan satu Architecture Body Architecture Body Entity Declaration programmable logic devices 21
Entity Konstruksi Entity berfungsi memodelkan interface eksternal Eternal Interface d0 d1 d2 d3 en clk REG_4 Internal Functionality q0 q1 q2 q3 programmable logic devices 22
Entity name Port name Port entity reg4 is port (do,d1,d2,d3,en,clk : in bit; qo,q1,q3,q4: out bit;); end entity reg4; Port mode port VHDL membentuk model data input/output. ENTITY entity-name IS [PORT(interface-signal-declaration);] END [ENTITY] [entity-name]; programmable logic devices 23
Rangkaian 1 (8-bit Comparator) A[8] B[8] 8-bit Comparator EQ Deklarasi Entity : ENTITY compare IS PORT(a, b: IN bit_vector(0 TO 7); eq: OUT bit); END compare; programmable logic devices 24
Architecture Body Fungsi sesungguhnya dari circuit ARCHITECTURE arch-name OF entity-name IS [declarations] BEGIN architecture body END [ARCHITECTURE] [arch-name]; programmable logic devices 25
Architecture body dari rangkaian 1 adalah : ARCHITECTURE compare1 OF compare IS BEGIN eq <= 1 WHEN (a=b) ELSE 0 ; END compare1; programmable logic devices 26
HDL total dari rangkaian 1 adalah : ENTITY compare IS PORT(a, b: IN bit_vector(0 TO 7); eq: OUT bit); END compare; ARCHITECTURE compare1 OF compare IS BEGIN eq <= 1 WHEN (a=b) ELSE 0 ; END compare1; programmable logic devices 27
Rangkaian 2 (Full Adder) y c in sum ENTITY fulladder IS PORT(, y, cin: IN bit; cout, sum: OUT bit); END fulladder; c out ARCHITECTURE concurrent OF fulladder IS BEGIN sum <= XOR y XOR cin; cout <= ( AND y) OR ( AND cin) OR (y AND cin); END concurrent; programmable logic devices 28
Behavioral Description LIBRARY ieee; USE ieee.std_logic_1164.all ENTITY eqcomp4 IS PORT( a, b: IN std_logic_vector(3 DOWNTO 0); equals: OUT std_logic); END eqcomp4; ARCHITECTURE behavioral OF eqcomp4 IS BEGIN comp: PROCESS (a, b) BEGIN IF a = b then equals <= 1 ; ELSE equals <= 0 ; END IF; END PROCESS comp; END behavioral; programmable logic devices 29
Dataflow(RTL) Description LIBRARY ieee; USE ieee.std_logic_1164.all ENTITY eqcomp4 IS PORT( a, b: IN std_logic_vector(3 DOWNTO 0); equals: OUT std_logic); END eqcomp4; ARCHITETURE dataflow OF eqcomp4 IS BEGIN equals <= 1 WHEN (a=b) ELSE 0 ; END dataflow; programmable logic devices 30
Dataflow(RTL) Description LIBRARY ieee; USE ieee.std_logic_1164.all ENTITY eqcomp4 IS PORT( a, b: IN std_logic_vector(3 DOWNTO 0); equals: OUT std_logic); END eqcomp4; ARCHITETURE bool OF eqcomp4 IS BEGIN equals <= NOT(a(0) XOR b(0)) AND NOT(a(1) XOR b(1)) AND NOT(a(2) XOR b(2)) AND NOT(a(3) XOR b(3)) ; END bool; programmable logic devices 31