0% found this document useful (0 votes)
40 views26 pages

4.empat (Encoder Decoder)

This document discusses an introduction to FPGA programming using Xilinx. It covers digital systems review, combinational circuits like decoders, encoders, multiplexers and demultiplexers, sequential circuits like counters, and conditional programming approaches. Examples of decoder, encoder and priority encoder circuits are presented in VHDL. Four conditional programming techniques are introduced: concurrent signal assignment, selected signal assignment, IF statements, and case statements. Students are given an assignment to implement a comparator circuit from the previous week using one of these four techniques in VHDL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views26 pages

4.empat (Encoder Decoder)

This document discusses an introduction to FPGA programming using Xilinx. It covers digital systems review, combinational circuits like decoders, encoders, multiplexers and demultiplexers, sequential circuits like counters, and conditional programming approaches. Examples of decoder, encoder and priority encoder circuits are presented in VHDL. Four conditional programming techniques are introduced: concurrent signal assignment, selected signal assignment, IF statements, and case statements. Students are given an assignment to implement a comparator circuit from the previous week using one of these four techniques in VHDL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

FILKOM | UB

CCE61206

Pemrograman FPGA
Agenda

• Introduction
• Review Sistem Digital
• FPGA design dengan Xilinx
• Rangkaian kombinasional
• Rangkaian Decoder, Encoder, Multiplekser, Demux
• Rangkaian sekuensial (counter)
• -----------------------------------UTS-------------------------------------
• Desain project dan presentasi
• -----------------------------------UAS-------------------------------------

Slide 2
12 September
2021
Review tugas sebelumnya
- Kasus > tabel kebenaran > K-maps > persamaan logika > koding

Pendekatan baru dengan penggunaan Conditional programming


- Kasus > tabel kebenaran > koding

Untuk mempermudah penjelasan, akan digunakan beberapa rangkaian


kombinasional populer sebagai contoh (encoder, decoder, multiplexer,
demux)

Slide 3
12 September
2021
DECODER

Slide 4
12 September
2021
Decoder
A decoder has
▪ N inputs
▪ 2N outputs

Slide 5
12 September
2021
Decoder

Slide 6
12 September
2021
Decoder 3 to 8 in VHDL

Slide 7
12 September
2021
Simplified into …

MSB MSB

Slide 8
12 September
2021
ENCODER

Slide 9
12 September
2021
Encoder
An encoder has
− 2N inputs
− N outputs
⚫ An encoder outputs the binary value of the selected (or active) input.
⚫ An encoder performs the inverse operation of a decoder.

Slide 10
12 September
2021
⚫ Issues
− What if more than one input is active?
− What if no inputs are active?

Priority Encoders
⚫ If more than one input is active, the higher-order input has priority over the lower-order input.
− The higher value is encoded on the output

⚫ A valid indicator, d, is included to indicate whether or not the output is valid.


− Output is invalid when no inputs are active
d=0

Slide 11
− Output is valid when at least one input is active
d=1

12 September
2021
Slide 12
12 September
2021
Priority Encoder 4 to 2 in VHDL

Slide 13
12 September
2021
4 cara conditional programming

CONCURRENT ASSIGNMENT STATEMENTS


1. Conditional signal assignment
2. Selected signal assignment

ROUTING CIRCUIT WITH IF AND CASE STATEMENTS (sequential method)


3. IF statements
4. Case statements

Slide 14
12 September
2021
CONCURRENT ASSIGNMENT STATEMENTS
1. Conditional signal assignment
2. Selected signal assignment

Slide 15
12 September
2021
1. Conditional signal assignment statement

Contoh:

Slide 16
12 September
2021
1. Conditional signal assignment statement

Slide 17
12 September
2021
2. Selected signal assignment statement

Contoh:

Slide 18
12 September
2021
2. Selected signal assignment statement

Slide 19
12 September
2021
ROUTING CIRCUIT WITH IF AND CASE STATEMENTS (sequential method)
3. IF statements
4. Case statements

Slide 20
12 September
2021
3. If statement

Slide 21
Concurrent method Sequential method
12 September
2021
Slide 22
12 September
2021
4. Case statement

Slide 23
Concurrent method Sequential method
12 September
2021
4. Case statement

Slide 24
12 September
2021
4 cara conditional programming

Slide 25
12 September
2021
Tugas Kelompok minggu 4
Buat program VHDL untuk kasus minggu lalu (komparator) dg kriteria:
1. Memilih salah satu dari 4 cara conditional programming
2. Jadikan input switch menjadi vektor (bus) yakni bilangan_A (2 bit)
dan bilangan_B (2 bit)
3. Atur plan Ahead dg site bebas, silakan pilih sesuai alamat site gambar
di bawah ini
4. Lakukan simulasi dan bandingkan dengan gambar timing diagram
hasil simulasi dengan tugas kelompok minggu lalu

Slide 26
12 September
2021

You might also like