• Tidak ada hasil yang ditemukan

lecture 03 sequential logic

N/A
N/A
Protected

Academic year: 2017

Membagikan "lecture 03 sequential logic"

Copied!
17
0
0

Teks penuh

(1)

www.nand2tetris.org

(2)

Sequential VS combinational logic

!

"#

$ %

"

&

'

!

(

)"

%$

"

*

!

+

!

)"

%

"

%$

#

'

*

*

(#

,--)"

!$

"

%$

(3)

,--Lecture plan

!

"

"

*

"

- $*

/

0

0 1

(4)

The Clock

clock

signal

cycle

cycle

cycle

cycle

tick

tock

tick

tock

tick

tock

tick

tock

3

4

#

!

5

!

$ "

% # *

%

simulator

(5)

Flip-flop

*

$!

-

%#

%

"

,--1

*

* $*

#

"

!

sequential

chip

out

in

sequential

chip

out

in

clock

signal

=

(notation)

HW

simulator

demo

DFF

out

in

(6)

1-bit register (we call it “Bit”)

DFF

out(t) = in(t-1)

Basic building block

in

out

6 4

"

"

1

"

DFF

out(t) = out(t-1) ?

out(t) = in(t-1) ?

Won’t work

in

out

Bit

out

load

in

(7)

Bit register (cont.)

Bit

out

load

in

if load(t-1) then out(t)=in(t-1)

else out(t)=out(t-1)

Interface

DFF

M

U

X

load

in

out

Implementation

HW

simulator

demo

o

o

0

(8)

Multi-bit register

Bit

out

load

in

if load(t-1) then out(t)=in(t-1)

else out(t)=out(t-1)

1-bit register

o

0

8 %

"

o

0

o

7

. . .

Bit

w-bit register

out

load

in

w

w

if load(t-1) then out(t)=in(t-1)

else out(t)=out(t-1)

Bit

Bit

HW

simulator

(9)

Aside: Hardware Simulation

0

*

" .7

!

"

7"

!

"

"

# "

!

#

%

!

/

$

"

*

.,

*

9

2

"

1

*

: 3 **

"

HW

simulator

(10)

Random Access Memory (RAM)

o

0

o

7

load

(0 to n-1)

Direct Access Logic

register 0

register 1

register n-1

RAM n

.

.

.

register 2

in

out

(word)

(word)

address

HW

simulator

(11)

RAM interface

address

load

out

in

16 bits

log

2

n

bits

RAMn

(12)

Bit

Bit

Register

. . .

Bit

RAM anatomy

register

RAM 8

8

register

..

.

register

RAM8

RAM 64

8

..

.

RAM8

. . .

(13)

Counter

)

*

3

"

;

PC (counter)

w bits

out

in

w bits

inc

load reset

If reset(t-1) then out(t)=0

else if load(t-1) then out(t)=in(t-1)

else if inc(t-1) then out(t)=out(t-1)+1

else out(t)=out(t-1)

"

"

!

(14)

Recap: Sequential VS combinational logic

out =

some function of

(in)

Combinational chip

comb.

logic

in

out

out(t) =

some function of

(in(t-1), out(t-1))

Sequential chip

comb.

logic

in

gate(s)

DFF

comb.

logic

out

(15)

Time matters

Reg2

a

Reg1

b

out

sel

clock

signal

cycle

cycle

cycle

cycle

tick

tock

tick

tock

tick

tock

tick

tock

,

!$

!

# "

*

"

!

"

%

"

#

"

'

"

(

"

* "

<

# "

*

"

!

"

"

(16)

Perspective

"

"

)

"

"

0 1 '

( #

*

"

"

,0 1 '

( #

*

, !

=

"

+

"

-

$*

*

/

" "

&

#

*

(17)

End notes: some poetry about the limits of logic ...

)"

<

*

%"

"

"

*

38

"

0

3

"

%"

%

%

"

* %

%

> "

"

!

! *

3

!

" "

"

Referensi

Dokumen terkait

berasal dari Kendal mengatakan jika bersama teman, kerinduannya dengan keluarga dapat berkurang, kelima mahasiswa perantau tersebut memiliki jawaban sama tentang

Hasil dari penelitian ini adalah bahwa gaya kepemimpinan yang diterapkan pada Perusahaan kosmetik adalah gaya kepemimpinan transformasional, Gaya kepemimpinan yang

Menurut BSNP (2007: 9) dalam (http://ardanayudhistira.blogspot.co.id, 2012), penilaian merupakan serangkaian kegiatan untuk memperoleh, menganalisis, dan menafsirkan

Proses konversi energi dari satu energi menjadi energi lainnya untuk mesin- mesin panas selama transfer energi selalu ada transfer panas pada fluida kerja. Jadi tidak semua

a) Editing yaitu mengatur tampilan media sedemikian rupa sehingga terlihat menarik. b) Validasi dilakukan untuk mengetahui dan memastikan bahwa media pembelajaran yang

Media informasi yang berpengaruh dalam kehidupan anda sebagai. mahasiswa

Dari Campuran Sabut Kelapa dan Kayu Mahoni Dengan Berbagai Variasi.. Kadar Perekat

[r]