Senin, 01 Desember 2008

Komputer dan Arsitektur

Melihat perkembangan digital dan arsitektur di kampus sekarang sepertinya menyenangkan, jauh lebih baik kondisinya dibanding 5-7 tahun yang lalu ketika visi komputer dan arsitektur ditentang habis-habisan oleh dosen-dosen senior yang tidak/kurang mengerti tentang komputer sebagai media, alat dan asisten desain. Komputer sebagai alat bantu gambar adalah kuno (Computer Aided Drawing), hal ini dulu berbenturan dengan sikap pengajar senior. Bagaimana dengan perkembangannya? komputer itu adalah asisten perancang (CAD: Computer Aided Design).

Yang lucunya staf pengajar seperti gegap gempita dengan program komputrisasi dalam pengajaran, pengadaan komputer tiba-tiba menjadi mudah dan murah untuk keperluan lab, visi-visi IT tiba-tiba keluar begitu saja, padahal semua visi tersebut sudah tertulis 7 tahun yang lalu oleh 7 orang yang sekarang hanya bersisa 1 orang karena berstatus pengajar tetap.

Kampus negeri yang menjadi swasta memang menjadi mahal. Semoga semua kondisi tersebut diimbangi perkembangan mahasiswanya dan tak lupa staf pengajarnya.

AMD Turion 64 X2

Turion 64 X2 is AMD's 64-bit dual-core mobile CPU, intended to compete with Intel's Core and Core 2 CPUs. The Turion 64 X2 was launched on May 17, 2006, after several delays. These processors use Socket S1, and feature DDR2 memory. They also include AMD Virtualization Technology and more power-saving features.

AMD first produced the Turion 64 X2 on IBM's 90 nm Silicon on insulator (SOI) process (cores with the Taylor codename). As of May 2007, they have switched to a 65 nm Silicon-Germanium stressed process[citation needed], which was recently achieved through the combined effort of IBM and AMD, with 40% improvement over comparable 65 nm processes[citation needed]. The earlier 90 nm devices were codenamed Taylor and Trinidad, while the newer 65 nm cores have codename Tyler.

Cores

Taylor & Trinidad (90 nm SOI)

Turion64-X2 for Socket S1
Turion64-X2 for Socket S1
  • Dual AMD64 core
  • L1 cache: 64 + 64 KiB (data + instructions) per core
  • L2 cache: 256 KiB (Taylor) or 512 KiB (Trinidad) per core, fullspeed
  • Memory controller: dual channel DDR2-667 MHz X2 (using full-duplex hypertransport bus renders CPU-RAM bandwidth of 10.7 Gbytes/s --> twice the speed of Intel's Core 2 Duo Merom which is only capable of 5.3 Gbytes/s with its 667MHz FSB Half-Duplex Memory controller)[1]
  • MMX, Extended 3DNow!, SSE, SSE2, SSE3, AMD64, PowerNow!, NX bit, AMD-V
  • Socket S1, HyperTransport (800 MHz, 1600 MT/s, 10.7 GB/s CPU-RAM + 6.4 GB/s CPU-I/O transfer rate)[2]
  • Power consumption (TDP): 31, 33, 35 Watt max
  • First release: May 17, 2006
  • Clock rate: 1600, 1800, 2000 MHz
    • 31W TDP:
      • TL-50: 1600 MHz (256 KiB L2-Cache per core)
      • TL-52: 1600 MHz (512 KiB L2-Cache per core)
    • 33W TDP:
      • TL-56: 1800 MHz (512 KiB L2-Cache per core)
    • 35W TDP:
      • TL-60: 2000 MHz (512 KiB L2-Cache per core)
      • TL-64: 2200 MHz (512 KiB L2-Cache per core

Tyler (65 nm SOI)

  • Dual AMD64 core
  • L1 cache: 64 + 64 KiB (data + instructions) per core
  • L2 cache: 512 KiB per core, fullspeed
  • Memory controller: dual channel DDR2-800 MHz (12.8 GBytes/s full-duplex CPU/RAM bandwidth)
  • 100 MHz granularity (Dynamic P-state Transitions)
  • MMX, Extended 3DNow!, SSE, SSE2, SSE3, AMD64, PowerNow!, NX Bit, AMD-V
  • Socket S1, HyperTransport (1600 MHz)
  • Power consumption (TDP): 31, 33, 35 Watt max
  • First release: 2007
  • Clock rate: 1800, 1900, 2000, 2200, 2300 MHz
    • 31W TDP:
      • TL-56 1800 MHz (512 KiB L2-Cache per core)
      • TL-58 1900 MHz (512 KiB L2-Cache per core)
      • TL-60 2000 MHz (512 KiB L2-Cache per core)
    • 35W TDP:
      • TL-64 2200 MHz (512 KiB L2-Cache per core)
      • TL-66 2300 MHz (512 KiB L2-Cache per core)

Organisasi dan Arsitektur Komputer 2 Tekonologi Prosesor

Kilas Balik
• Arsitektur von Neumann
– Jadi acuan baku sistem komputer modern.
– Instruksi & data dicampur dalam memori yang sama,
dengan keuntungan:
• Efficient use of memory --- you have 1 large block that can
be used any way you want instead of 2 smaller blocks.
• Computers can handle instructions as easily as data ---
since instructions and data are stored together, moving blocks
of instructions (i.e. programs) around becomes simple.
• Ease of loading programs into memory --- just read the
instructions in as data from disk or other long-term storage and
then execute the newly-read information.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 3
Kilas Balik
• Arsitektur von Neumann
– Selain menguntungkan juga merugikan, karena:
• Data can overwrite instructions --- without special
hardware precautions (called memory protection), an incorrect
write to memory could overwrite some instructions. Since Von
Neumann systems don't distinguish between instructions and
data, the computer would attempt to execute the data as
instructions, usually with an undesired result.
• Limited bandwidth --- storing instructions and data together
means they both follow the same path to get to the processor.
This Von Neumann Bottleneck means that the processor has to
trade off between executing a large number of instructions per
second and reading in a large amount of data in the same
time.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 4
Kilas Balik
• Kinerja vs Desain Prosesor
– Performance komputer ditentukan oleh
• Instruction count.
• Clock cycle time.
• Clock cycles per instruction.
– Processor design (datapath & control)
akan ditentukan oleh
• Clock cycle time.
• Clock cycles per instruction.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 5
Proses Instruksi
• Siklus Dasar
– Execute Cycle, kategori
• CPU – Memory : Data ditransfer dari M ke CPU atau
sebaliknya. {IR [adres] <=> MAR }
• CPU - I/O : Data ditransfer dari modul I/O atau
sebaliknya. {MAR => Memory => MBR }
• Data Processing : CPU mengerjakan operasi
aritmatika / logika pada data via ALU. {MBR =>
ACC }
• Control.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 6
Proses Instruksi
• Siklus Dasar
– Ilustrasi operasi ADD
• IR [adres] => MAR
• MAR => Memory => MBR
• MBR + ACC => ALU
• ALU => ACC
– Interrupt Cycle ~ mekanisme di mana suatu
modul I/O dsb., dapat menghentikan kendali
runtutan operasi normal CPU.
– Interupsi dilakukan oleh program, timer, I/O, &
hardware failure.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 7
Desain Prosesor
• Analisa instruction set untuk menghasilkan datapath
sesuai kebutuhan.
– Arti setiap instruksi diuraikan dari register transfers.
– Datapath harus mencakup elemen storage untuk registerregister
ISA.
– Datapath juga harus menunjang setiap register transfer.
• Pilih sekumpulan datapath components & tetapkan
metodologi clocking.
• Implementasi datapath yang dibutuhkan.
• Analisa implementasi setiap instruksi untuk
menentukan setting of control points yang akan
mempengaruhi register transfer.
• Implementasi control logic.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 8
Desain Prosesor
Eksekusi instruksi lw $1,0($2) :
– CU sets the multiplexor to drive the PC onto the address bus.
– M responds by placing 8c410000 (hexa) on the data bus from
where it is latched into the IR.
– CU decodes the instruction, at the same time it instructs the
ALU.
– Output from the ALU is latched into the MAR.
– M responds with the value sought, it is captured on the
internal data bus and latched into register 1 of the register
file.
– PC is now updated to point to the next instruction and the
cycle can start again.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 9
Desain Prosesor
• Format instruksi MIPS [PAT97]
– Tipe-R
– Tipe-I
– Tipe-J
• Keterangan
– Shamt: shift amount.
– Funct: pilih jenis operasi pada “op” field.
– Immediate: address offset atau immediate value.
– Target address: adres tujuan karena jump instruction.
op rs rt rd shamt funct
31 26 21 16 11 6 0
6 bits 5 bits 5 bits 5 bits 5 bits 6 bits
op rs rt immediate
31 26 21 16 0
6 bits 5 bits 5 bits 16 bits
op target address
31 26 0
6 bits 26 bits
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 10
Teknologi
• Tujuan Desainer Komputer
– Menciptakan sistem yang
• As fast as possible.
• As inexpensive as possible.
• as powerful as possible.
– Kinerja sistem tergantung pada
• Memory
• Processor
• Connection to the peripheral devices.
• Actual peripherals.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 11
Teknologi
• CISC http://physinfo.ulb.ac.be/divers_html
– Philosophy for designing chips that are easy to
program and which make efficient use of
memory.
– Each instruction in a CISC instruction set might
perform a series of operations inside the
processor. This reduces the number of
instructions required to implement a given
program, and allows the programmer to learn a
small but flexible set of instructions.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 12
Teknologi
• CISC, Filosofi-1: Microcode
– Microprogrammed system, main processor has some builtin
memory (typically ROM) which contains groups of
microcode instructions which correspond with each
machine-language instruction.
– Keuntungan Sistem Microprogrammed
• Since the microcode memory can be much faster than main
memory, an instruction set can be implemented in microcode
without losing much speed over a purely hard-wired
implementation.
• New chips are easier to implement and require fewer transistors
than implementing the same instruction set with dedicated logic.
• A microprogrammed design can be modified to handle entirely
new instruction sets quickly.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 13
Teknologi
• CISC, Filisofi-2: Build "rich" instruction
sets.
– Designers could build more functionality into each
instruction.
– Cut down on the total number of instructions
required to implement a program, and therefore
made more efficient use of a slow main memory.
– Assembly-language programs life simpler.
– Designers were enhancing their instruction sets
such as: string manipulation operations, special
looping constructs, and special addressing modes
for indexing through tables in memory.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 14
Teknologi
• CISC, Filosofi-3: Build high-level
instruction sets.
– Once designers started building programmerfriendly
instruction sets, the logical next step was
to build instruction sets which map directly from
high-level languages.
– Not only does this simplify the compiler writer's
task, but it also allows compilers to emit fewer
instructions per line of source code.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 15
Teknologi
• Karakteristik instruction sets CISC
– A 2-operand format, where instructions have a source and a
destination. For example, the add instruction "add #5, D0" would add
the number 5 to the contents of register D0 and place the result in
register D0.
– Register to register, register to memory, and memory to register
commands.
– Multiple addressing modes for memory, including specialized modes
for indexing through arrays.
– Variable length instructions where the length often varies according to
the addressing mode.
– Instructions which require multiple clock cycles to execute. If an
instruction requires additional information before it can run (for
example, if the processor needs to read in two memory locations
before operating on them), collecting the extra information will
require extra clock cycles. As a result, some CISC instructions will
take longer than others to execute.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 16
Teknologi
• Arsitektur CISC
– Complex instruction-decoding logic, driven by the need for a single
instruction to support multiple addressing modes.
– A small number of general purpose registers. This is the direct result
of having instructions which can operate directly on memory and the
limited amount of chip space not dedicated to instruction decoding,
execution, and microcode storage.
– Several special purpose registers. Many CISC designs set aside special
registers for the stack pointer, interrupt handling, and so on. This can
simplify the hardware design somewhat, at the expense of making
the instruction set more complex.
– A Condition code register which is set as a side-effect of most
instructions. This register reflects whether the result of the last
operation is less than, equal to, or greater than zero, and records if
certain error conditions occur.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 17
Teknologi
• Kelemahan CISC
– Earlier generations of a processor family generally were contained as
a subset in every new version --- so instruction set & chip hardware
become more complex with each generation of computers.
– So that as many instructions as possible could be stored in memory
with the least possible wasted space, individual instructions could be
of almost any length---this means that different instructions will take
different amounts of clock time to execute, slowing down the overall
performance of the machine.
– Many specialized instructions aren't used frequently enough to justify
their existence --- approximately 20% of the available instructions are
used in a typical program.
– CISC instructions typically set the condition codes as a side effect of
the instruction. Not only does setting the condition codes take time,
but programmers have to remember to examine the condition code
bits before a subsequent instruction changes them.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 18
Teknologi
• RISC (Reduce Instruction Set Computer),
muncul karena:
– Semiconductor technology began to reduce the
difference in speed between main memory and
processor chips.
– As memory speed increased, and high-level
languages displaced assembly language, the
major reasons for CISC began to disappear,
and computer designers began to look at ways
computer performance could be optimized
beyond just making faster hardware.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 19
Teknologi
• Karakteristik RISC
– Simple instruction set.
• In a RISC machine, the instruction set contains simple,
basic instructions, from which more complex
instructions can be composed.
– Same length instructions.
• Each instruction is the same length, so that it may be
fetched in a single operation.
– 1 machine-cycle instructions.
• Most instructions complete in one machine cycle,
which allows the processor to handle several
instructions at the same time. This pipelining is a key
technique used to speed up RISC machines.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 20
Teknologi
• Desain RISC
– Teknik Kunci: Pipelining is a design technique
where the computer's hardware processes more
than one instruction at a time, and doesn't wait
for one instruction to complete before starting
the next.
– Four stages in CISC machine (fetch, decode,
execute, and write) are also exist in a RISC
machine, but the stages are executed in parallel.
As soon as one stage completes, it passes on the
result to the next stage and then begins working
on another instruction.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 21
Teknologi
• Performance issues in pipelined systems
– Memory speed issues are commonly solved using caches.
– Instruction Latency:
• Highly encoded instructions---such as those used on CISC machines--
-that require a ulating and testing thed of cal to decode
• Variable-length instructions which require multiple references to
memory to fetch in the entire instruction.
• Instructions which access main memory (instead of registers), since
main memory can be slow
• Complex instructions which require multiple clocks for execution
(many floating-point operations, for example.)
• Instructions which need to read and write the same register. For
example "ADD 5 to register 3" had to read register 3, add 5 to that value,
then write 5 back to the same register (which may still be "busy" from
the earlier read operation, causing the processor to stall until the register
becomes available.)
• Dependence on single-point resources such as a condition code
register. If one instruction sets the conditions in the condition code
register and the following instruction tries to read those bits, the second
instruction may have to stall until the first instruction's write completes.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 22
Teknologi
• Performance issues in pipelined systems
– Since each instruction takes some amount of
time to store its result, and several instructions
are being handled at the same time, later
instructions may have to wait for the results of
earlier instructions to be stored.
– However, a simple rearrangement of the
instructions in a program (called
Instruction Scheduling) can remove these
performance limitations from RISC programs.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 23
Teknologi
• Keuntungan RISC
– Speed. Since a simplified instruction set allows for a pipelined,
superscalar design RISC processors often achieve 2 to 4 times the
performance of CISC processors using comparable semiconductor
technology and the same clock rates.
– Simpler hardware. Because the instruction set of a RISC
processor is so simple, it uses up much less chip space; extra
functions, such as memory management units or floating point
arithmetic units, can also be placed on the same chip. Smaller
chips allow a semconductor manufacturer to place more parts on
a single silicon wafer, which can lower the per-chip cost
dramatically.
– Shorter design cycle. Since RISC processors are simpler than
corresponding CISC processors, they can be designed more
quickly, and can take advantage of other technological
developments sooner than corresponding CISC designs, leading to
greater leaps in performance between generations.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 24
Pipeline
• Teknik implementasi pada CPU untuk menaikkan
kinerja.
• Mirip proses perakitan di pabrik.
• Idea dasar pipeline adalah:
– Sementarainstruksi pertama dieksekusi.
– Instruksi kedua dapat di-fetch.
– Dikenal dengan instruction overlap.
• Model
– Simple three-stage pipeline.
– Extended pipeline.
– Superscalar.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 25
Pipeline
Dekomposisi Pengolahan Instruksi
– Instruction Fetch
Fetch the instruction from memory.
– Decode and Operand Fetch, decode instruction and
fetch operands from the register file.
– Execute the instruction in the ALU.
– WriteBack, write the result back in to a register.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 26
Pipeline
• Hambatan Desain
– Overhead tiap tahap pipeline, pada pemindahan data antar
buffer dan saat persiapan & pengiriman fungsi-fungsi operasi.
– Akibat banyak tahapan maka jumlah kendali logika naik, untuk
menangani ketergantungan memori & register serta
optimalisasi.
• Penanganan branching
– Multiple Streams
– Prefetch Branch Target
– Loop Buffer
– Branch Prediction
– Delayed Branch
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 27
Pipeline
• Apa superscalar ?
– Instruksi-instruksi umum (arithmetic, load/store,
conditional branch) may be initiated & executed
independently.
– Dapat diterapkan pada RISC & CISC secara praktis
biasanya RISC.
• Mengapa superscalar ?
– Kebanyakan operasi pada satuan scalar.
– Dapat dibuktikan dengan implementasi
superscalar.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 28
Pipeline
• Apa Superpipelined ?
– Banyak tahapan pipeline memerlukan kurang dari
setengah clock cycle.
– Kecepatan ganda internal clock menghasilkan 2 tasks per
external clock cycle.
– Superscalar yang memungkinkan parallel fetch execute.
• Limitasi superscalar
– Instruction level parallelism & compiler based optimisation.
– Teknis Hardware.
– Dibatasi oleh: True data dependency, Procedural
dependency, Resource conflicts, Output dependency,
Antidependency.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 29
Pipeline
• True data dependency
– ADD r1, r2 (r1 := r1+r2;)
– MOVE r3,r1 (r3 := r1;)
– Dapat fetch & decode instruksi pertama & kedua secara
paralel.
– Tidak dapat mengeksekusi instruksi kedua sebelum yang
pertama selesai.
• Procedural dependency
– Tidak dapat mengeksekusi instructions after a branch in parallel
with instructions before a branch.
– Juga, jika panjang instruksi tidak pasti maka harus di-decode
dulu agar tahu berapa jumlah fetch diperlukan.
– Hal ini untuk melindungi simultaneous fetches.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 30
Pipeline
• Resource conflicts
– Dua atau lebih instruksi perlu akses ke resource yang sama
pada saat yang sama, misal 2 instruksi aritmatika.
– Dapat menduplikasi resources.
• Isu Desain
– Instruction level parallelism:
• Instruksi yang berurutan independent.
• Eksekusi dapat overlapped.
• Gunakan data & procedural dependency.
– Machine Parallelism:
• Dapat mengandalkan instruction level parallelism.
• Gunakan sejumlah parallel pipelines.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 31
Pipeline
• Instruction issue policy
– Order in which instructions are fetched.
– Order in which instructions are executed.
– Order in which instructions change registers and
memory.
• In-order issue in-order completion
– Berikan instruksi sesuai keperluan.
– Tidak efisien.
– Dapat fetch >1 instruksi.
– Instruksi-instruksi harus dihambat jika mungkin.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 32
Pipeline
• In-order issue out of-order completion
– Output dependency:
• R3:= R3 + R5; (I1)
• R4:= R3 + 1; (I2)
• R3:= R5 + 1; (I3)
– I2 tergantung pada hasil I1
• => data dependency.
– Jika I3 selesai sebelum I1, hasil dari I1 akan salah
• => output (read-write) dependency.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 33
Pipeline
• Out-of-order issue out-of-order completion
– Decouple decode pipeline dari eksekusi pipeline.
– Dapat melanjutkan fetch & decode sampai
pipeline lengkap.
– Jika unit fungsional siap maka suatu instruksi
dapat dieksekusi.
– Karena instruksi-instruksi telah di-decode, maka
prosesor dapat diperhatikan kinerjanya.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 34
Pipeline
• Machine parallelism
– Duplikasi Resources.
– Out of order issue.
– Renaming.
– Tidak ada gunanya duplikasi fungsi tanpa register renaming.
– Perlu jendela instruksi yang lebar (> 8).
• RISC delayed branch
– Kalkulasi hasil branch sebelum unusable instructions pre-fetched.
– Selalu segera eksekusi single instruction setelah branch.
– Biarkan pipeline selesai sambil ambil new instruction stream.
– Kelemahan superscalar: banyak instruksi mengeksekusi in delay
slot dan masalah-masalah instruction dependence.
– Revert to branch prediction.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 35
Pipeline
• Implementasi Superscalar
– Simultaneously fetch multiple instructions.
– Logic to determine true dependencies involving
register values.
– Mechanisms to communicate these values.
– Mechanisms to initiate multiple instructions in
parallel.
– Resources for parallel execution of multiple
instructions.
– Mechanisms for committing process state in
correct order.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 36
Pipeline
• Registers are built from fast multi-ported
memory cells:
– Fast: a register must be able to drive its data
onto an internal bus in a single clock cycle.
– Multi-ported because a register must be able to
supply its data to either the A or the B input of
the ALU and accept a value to be stored from
the internal data bus.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 37
Prosesor Modern - Pentium
• Pentium
– Ingat 80486 - CISC,
– Pentium – berkomponen superscalar.
– Dua unit eksekusi integer terpisah.
– Pentium Pro – Full blown superscalar.
– Model-model mendatang akan refine &
enhance desain superscalar.
IF-ITB/Santika WP/Maret08
IF2291 – Tekonologi Prosesor
Page 38
Prosesor Modern - Pentium
• Operasi
– Fetch instructions form memory in order of static program
– Translate instruction into one or more fixed length RISC
instructions (micro-operations)
– Execute micro-ops on superscalar pipeline, micro-ops may
be executed out of order
– Commit results of micro-ops to register set in original
program flow order
– Outer CISC shell with inner RISC core
– Inner RISC core pipeline at least 20 stages: Some microops
require multiple execution stages (Longer pipeline),
c.f. five stage pipeline on x86 up to Pentium

Pendahuluan Arsitektur Komputer

Pendahuluan
Setiap hal yang dikerjakan CPU dibagi-bagi menjadi beberapa langkah yang sederhana dan berurutan. Osilator clock membangkitkan clock CPU yang digunakan dalam langkah (step) kerja CPU dalam urutan perkerjaannya. Karena clock CPU ini sangat cepat untuk ukuran manusia, sehingga yang terlihat bahwa CPU bekerja secara langsung dan cepat.

Mikrokontroler 8-bit dari Motorola M68HC05 dan M68HC11 memiliki organisasi khusus yan disebut dengan arsitektur Von Neumann. Dalam arsitektur ini, CPU dan rangkaian memori di-interkoneksi-kan dengan bus alamat dan bus data. Bus alamat digunakan untuk menentukan lokasi memori yang mana yang akan diakses, dan bus data digunakan untuk mengirim informasi baik dari CPU ke lokasi memori dan sebaliknya.

Dalam arsitektur implementasi Motorola ini terdapat beberapa memori spesial yang disebut dengan register CPU yang terletak di dalam CPU itu sendiri. Register ini mirip dengan memori yang dapat menyimpan informasi. Tetapi register ini terjalur langsung di dalam CPU dan bukan bagian dari memori konvensional mikrokontroler.

CPU menganggap semua lokasi memori sebagai satu kesatuan walaupun di dalamnya terdapat instruksi program, data variabel, maupun kontrol input-output (I/O). Teknik semacam ini yang disebut dengan memory-mapped I/O. Artinya, semua piranti input-output dari sistem mikrokontroler memiliki alamat tersendiri yang ikut dipetakan dalam peta memori, sehingga dianggap sebagai bagian dari memori itu sendiri.

Di dalam CPU juga terdapat komponen ALU atau Arithmatic Logic Unit yang digunakan untuk melakukan kalkulasi aritmatika dan logika yang didefinisikan oleh instruksi. Berbagai macam variasi operasi aritmatika biner dikerjakan dalam ALU ini. Hampir semua operasi aritmatika biner didasarkan pada operasi tambah. Pengurangan dikerjakan sebagai proses tambah dengan salah satu data dikomplemenkan. Perkalian dikerjakan sebagai urutan beberapa proses tambah dan operasi shift dalam ALU. Blok diagram dari CPU M68HC05 ditampilkan dalam gambar 4.1 di bawah ini.

gb41.gif (2133 bytes)

Register-register CPU
CPU yang berbeda memiliki set register yang berbeda pula. Perbedaan utama terletak pada jumlah dan ukuran dari register itu sendiri. Dalam gambar 4.1 diperlihatkan register-register CPU yang terdapat dalam mikrokontroler keluarga M68HC05.

gb42.gif (2430 bytes)

Register A berukuran 8 bit, juga dikenal sebagai akumulator karena register ini digunakan untuk menyimpan hasil dari operasi aritmatika dan manipulasi data. Register ini juga dapat langsung diakses untuk operasi non-aritmatika. Akumulator digunakan dalam proses eksekusi dari program saat isi dari beberapa lokasi memori yang digunakan di-load ke akumulator. Demikian juga instruksi penyimpanan akan menyebabkan isi dari akumulator disimpan dalam memori yang telah ditentukan.
Register X adalah index register yang berukuran 8 bit. Kegunaan utama dari index register ini adalah untuk menunjukkan suatu area memori di mana CPU akan mengambil atau menuliskan suatu informasi. Kadang-kadang index register juga disebut dengan pointer register.

PC atau program counter digunakan CPU untuk menata urutan alamat instruksi yang akan dikerjakan. Saat CPU reset atau baru dihidupkan, PC ini dimuati dengan alamat yang telah ditentukan dalam reset vector. Lokasi reset vector ini berisi alamat dari instruksi pertama yang akan dikerjakan oleh CPU. Saat suatu instruksi dikerjakan, CPU akan menambah isi PC sehingga akan menunjuk ke alamat informasi berikutnya yang akan dibutuhkan CPU. Jumlah bit dari PC sama persis dengan jumlah jalur bus alamat. Isi dari register ini dinyatakan dalam empat digit heksadesimal di mana enam bit teratas selalu nol karena hanya 10 bit jalur bus alamat.

CCR atau condition code register adalah register dengan ukuran 8 bit, yang menyimpan indikator status dari hasil operasi CPU sebelumnya. Terdapat tiga bit teratas tidak digunakan dan selalu sama dengan logika satu. Instruksi percabangan menggunakan bit-bit status dalam register ini untuk mengerjakan suatu keputusan percabangan.

Isi dari CCR ini adalah sebuah interrupt mask dan empat indikator status seperti pada gambar 4.1. Kelima flag tersebut adalah H atau half cary, N atau negative, Z atau zero, dan C atau carry/borrow.
Flag H (half carry) digunakan untuk operasi aritmatika BCD (Binary Coded Decimal) dan dipengaruhi oleh kerja instruksi ADD dan ADC. Bit H ini akan set jika ada carry yang timbul dari digit heksadesimal 0-3 (low order) dan digit desimal 4-7 (high order).

Bit I (interrupt mask) bukanlah status flag tetapi merupakan bit yang akan men-nonaktif-kan semua sumber interrupt yang maskable saat bit ini diset. Interrupt baru akan aktif jika bit ini nol. Jika ada interrupt eksternal yang terjadi saat bit I diset, maka interrupt tersebut akan di-latch dan akan diproses saat bit I dinolkan. Karena itu, interrupt yang terjadi tidak akan hilang. Setelah interrupt ditangani, instruksi RTI (return from interrupt) akan menyebabkan register ini dikembalikan ke nilai semula. Umumnya, bit I ini akan menjadi nol setelah instruksi RTI dilaksanakan.

Flag N (negative) akan diset jika hasil dari operasi aritmatika, logika, maupun manipulasi data yang terakhir adalah negatif. Nilai negatif dalam two's complement ditandai jika bit MSB adalah satu.
Flag Z (zero) diset jika hasil dari operasi aritmatika, logika, maupun manipulasi data terakhir adalah nol. Instruksi perbandingan (compare) akan mengurangi suatu harga dari suatu lokasi memori yang akan dites. Jika nilainya sama, maka bit Z ini akan diset.

Flag C (carry/borrow) digunakan untuk menandai apakah ada carry dari hasil operasi tambah atau ada borrow darioperasi pengurangan. Instruksi shift dan rotate juga dapat memakai bit C ini.
SP atau stack pointer digunakan sebagai pointer ke lokasi yang tersedia berikutnya dalam tumpukan stack dalam uruatn LIFO (last-in first-out). Stack ini dapat dianalogikan sebagai tumpukan kartu. Setiap kartu menyimpan satu byte (8 bit) informasi. Dalam suatu saat, CPU dapat menaruh satu kartu di atas tumpukan kartu tersebut maupun mengambil satu kartu dari tumpukan. Kartu di dalam tumpukan tidak dapat diambil kecuali jika kartu di atasnya sudah diambil sebelumnya. Stack mirip dengan tumpukan kartu ini hanya saja dalam fisiknya, stack mempunyai arah tumpukan ke bawah bukan ke atas seperti pada tumpukan kartu.

SP akan menunjuk pada alamat stack yang akan tersedia berikutnya. Jika CPU menaruh informasi dalam stack, maka data tersebut akan dituliskan dalam memori yang ditunjukkan oleh nilai SP saat itu, dan kemudian nilai SP akan dikurangi satu sehingga SP akan menunjukkan ke lokasi memori berikutnya yang kosong untuk digunakan sebagai penyimpan berikutnya. Jika CPU mengambil data dari stack, SP akan ditambah satu sehingga menunjukkan ke lokasi stack yang terakhir, dan kemudian data diambil dan dibaca oleh CPU. Saat CPU pertama kali dihidupkan atau setelah instruksi Reset Stack Pointer (RSP), maka SP akan menunjukkan memori tertentu dalam RAM.

Reset
Reset digunakan untuk memaksa sistem mikrokontroler untuk menuju alamat tertentu. Sistem periperal dan sejumlah bit kontrol dan status juga dipaksa untuk menuju ke state awal sebagai hasil dari proses reset. Aksi-aksi berikut ini yang terjadi akibat proses reset dari mikrokontroler:
1. Semua register data direction (DDR) diset nol (input)
2. Nilai SP dipaksa menjadi $00FF
3. Bit I dalam CCR diset
4. Latch interrupt eksternal dinolkan
5. Latch STOP dinolkan
6. Latch WAIT dinolkan

Kondisi-kondisi berikut ini yang akan menyebabkan mikrokontroler M68HC05 menjadi reset:
1. Sinyal input low pada kaki RESET
2. Reset karena pertama kali dihidupkan
3. Timer watchdog COP (computer operating properly) sudah habis
4. Usaha untuk menjalankan perintah dari suatu alamat yang tidak diperbolehkan

Arsitektur komputer

Dalam bidang teknik komputer, arsitektur komputer adalah konsep perencanaan dan struktur pengoperasian dasar dari suatu sistem komputer. Arsitektur komputer ini merupakan rencana cetak-biru dan deskripsi fungsional dari kebutuhan bagian perangkat keras yang didesain (kecepatan proses dan sistem interkoneksinya). Dalam hal ini, implementasi perencanaan dari masing–masing bagian akan lebih difokuskan terutama, mengenai bagaimana CPU akan bekerja, dan mengenai cara pengaksesan data dan alamat dari dan ke memori cache, RAM, ROM, cakram keras, dll). Beberapa contoh dari arsitektur komputer ini adalah arsitektur von Neumann, CISC, RISC, blue Gene, dll.

Arsitektur komputer juga dapat didefinisikan dan dikategorikan sebagai ilmu dan sekaligus seni mengenai cara interkoneksi komponen-komponen perangkat keras untuk dapat menciptakan sebuah komputer yang memenuhi kebutuhan fungsional, kinerja, dan target biayanya.

Arsitektur komputer ini paling tidak mengandung 3 sub-kategori: