Showing posts with label Fock Soon Yee. Show all posts
Showing posts with label Fock Soon Yee. Show all posts

Sunday, 16 December 2012

5.4 Graphics Processing Units (GPU)


Graphics Processing Units (GPU)

Sejarah GPU

GPU merupakan :

     1.   Kad video yang terawal.

-         merupakan frame memori penampan dengan generasi alamat untuk output video

     2.   Pemprosesan grafik 3D

-         kos yang rendah
-         3D grafik kad hanya untuk process image sahaja. Sebagai contoh : PC dan game consoles

     3.   Unit moden pemprosesan grafik  sering diguna dengan luas dalam “single    instruction multiple data’’(SIMD), dan boleh loads dan simpan pada 128 or 256 bits pada suatu masa.

Ciri-ciri network

    1.   Dari segi performance :

-         latency per message
-         hasil daripada penghantaran data ialah link bandwidth, total network bandwidth dan bisection bandwidth.

    2.   Harga

    3.   Kuasa



Multicore Processor

Multicore processor mempunyai banyak “cores”.Cores ialah dalam bentuk chips. Tujuan multiple cores ialah ada beberapa process atau banyak kerja boleh dibuat dalam satu masa. Multi-core CPU ialah MIMD machine.Multi-core processor ialah satu processor yang berlainan berbanding dengan multiproccesor lain.

Multi-core processors is MIMD :

Cores yang berlainan akan melaksanakan threads yang berbeza(Multiple Instructions), dan akan berfungsi pada memori-memori yang tertentu (Multiple Data).

Multi-core ialah satu memory multiprocessor yang dikongsi dan semua “cores” akan berkongsi dengan memori yang sama.



Saturday, 15 December 2012

4.4 Pipelining


The processor

Pipelining

Analogi Pipelining

Kita boleh mengandaikan bahawa ia merupakan “pipelined laundry” iaitu pertindihan pelaksanaan.

MIPS pipeline

Dalam MIPS pipeline, terdapat lima peringkat dan mempunyai langkah-langkah yang tertentu dalam peringkat masing-masing, iaitu :

1.   IF : Mengambil arahan dari memori
2.  ID : Decode arahan dan mendaftar register
     3.  EX : Melaksanakan operasi atau mengira alamat   
     4.  MEM : Mengakses memori dan mendapat nilai
     5. WB : Menulis balik semua arahan dan simpan dalam register


Pipeline Speedup

  •      Jika semua peringkat adalah seimbang

      Sebagai contoh : semua dalam masa yang sama

Time between instructions pipelined = Time between instructions 

nonpipelined / Number of stages

  • Jika tidak seimbang, speedup akan berkurang

  •  Speedup menyebabkan berlakunya peningkatan pengeluaran.


     Pipeline Performance


     Bagi setiap process, tempoh masa adalah berlainan. Jika menggunakan pipeline, persembahan akan meningkat.


    Sebagai contoh :


Tambah 2,000,000 arahan, tambah 400 ps kepada jumlah masa pelaksanaan,

Jumlah Masa Pelaksanaan = 2,000,000 x 400 ps + 1400 ps

                                            = 800,001,400 ps

Nonpipelined jumlah masa pelaksanaan

= 2,000,000 x 1600 ps + 2400 ps

= 3,200,002,400 ps

Kecepatan = 3,200,002,400 ps /800,001,400 ps = 4
                                          



Friday, 14 December 2012

3.1 Arithmetic Operation

LANGUAGE OF COMPUTER


Arithmetic Operations

Contoh Arithmetic operation:



f = (a + b) –( c + d )



Penyelesaian (compile MIPS kod) :


Langkah Pertama  ------>  add t0, a, b

Langkah Kedua    ------>  add t1, c, d


Langkah Ketiga   ------>  sub f, t0, t1


Register Operands

Contoh register operand :


f =  ( a + b ) - ( c + d )

f,a,b,c,d dalam $s0, $s1, $s2, $s3, $s4


Penyelesaian ( compiled MIPS kod mengguna register) :


Langkah Pertama  ------>  add $t0, $s1, $s2

Langkah Kedua   ------> add $t1, $s3, $s4



Langkah Ketiga  ------>  add $s0, $t0, $t1



Memory operands

Contoh memory operand :


A[20] = h – A[8]

h = $s1,base address of A in $s2.


Penyelesaian ( compiled MIPS code) :



Langkah Pertama  ------>  lw $t0, 32($s2)


Langkah Kedua  ------>  sub $t1, $s1,$t0


   Langkah Ketiga   ------>  sw $t2, (80)$s2


Register VS. Memory

Pebandingan antara Register dan Memory

Register
Memory
Lebih cepat mengakses daripada memory.

Mengakses lebih perlahan daripada register.
Berada di dalam CPU.

Berada di luar CPU.
Tidak perlu loads dan stores.

Perlu loads dan stores.
Penyimpanan sementara dalam CPU untuk memegang data processor itu. 

Memegang arahan program dan data program itu.

Saturday, 20 October 2012

2.1 LOGIC GATES


Digital Logic

Logic Gates
  •             Logic circuits are represented by Boolean algebra using variables and operators. The function and variables have only one value, 0 and 1.
  •       The complement of a variable is shown by an apostrophe (X’) or a bar over the letter such as . Table below summarizes logic gates as the symbol of the functions in Boolean expressions. 




  •      Gate is the fundamental building block of all digital logic circuits.
  •      The basic gates used in digital logic are :

§   AND
§   OR
§   NOT
§   NAND
§   NOR
§   XOR

  •  Gates are the implementation of logical functions by the interconnection.
  •  A gate is an electronic circuit that produces an output signal that is a simple Boolean operation on  its input signals.
  •  Each gate is defined in three ways: graphic symbol, algebraic notation, and truth table.
  •    The symbology used here and throughout the appendix is the IEEE standard, IEEE Std 91.
  •  Note that the inversion (NOT) operation is indicated by a circle.
  •    Each gate shown in the above table has one or two inputs and one output.
  •    However, as indicated in table all of the gates except NOT can have more than two inputs.
  •  Thus, can be implemented with a single OR gate with three inputs.
  •    Gate delay is when one or more of the values at the input are changed, the correct output signal appears almost instantaneously, delayed only by the propagation time of signals through the gate.
  •    In some cases, a gate is implemented with two outputs, one output being the negation of the other output.
  •    Here we introduce a common term: we say that to assert a signal is to cause signal line to make a transition from its logically false (0) state to its logically true state.
  •    The true state is either a high or low voltage state, depending on the type of electronic circuitry.
  •    Design and fabrication are simpler if only one or two types of gates are used.
  •    Thus, it is important to identify functionally complete sets of gates.
  •    This means that any Boolean function can be implemented using only the gates in the set.






1.1 NUMBER SYSTEM


Number System

A number system is a basic symbol to represent a set of quantities.

Number System Base

System
Base
Possible Digits
Binary
2
0 1
Octal
8
0 1 2 3 4 5 6 7
Decimal
10
0 1 2 3 4 5 6 7 8 9
Hexadecimal
16
0 1 2 3 4 5 6 7 8 9 A B C D E F

Decimal Number

  •             Base of 10 .
  •      The value of the assigned weight is composed by 10 digits starting from 0 until 9.The positive and negative values are determined by their position weight structure . Let us see the example as below:


….105 104 103 102 101 100                 (Positive Value)
102 101 100 10-1 10-2 10-3….        (Negative Value)

Binary Number
  •    Base of 2.
  •         The number consists only two digit 0 and 1 only .The weight structure of binary number is:
  
Hexadecimal Number

  •     Base of 16.
  •      The composed number start from 0 until F .The number is suitable to present in fours bit number.



  • Number System Conversion

    Converting between binary and decimal number