X hits on this document

Powerpoint document

Chapter 2: Custom single-purpose processors - page 13 / 29

81 views

0 shares

0 downloads

0 comments

13 / 29

13

Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis

Example: greatest common divisor

GCD

(a) black-box view

x_i

y_i

d_o

go_i

0: int  x, y;

1: while (1) {

2:   while (!go_i);

3:   x = x_i;

4:   y = y_i;

5:   while  (x != y)  {

6:       if  (x < y)    

7:          y = y - x;

         else             

8:          x = x - y;

      }

9:    d_o = x;

   }

 (b) desired functionality

y = y -x

7:

x = x - y

8:

6-J:

x!=y

5:

!(x!=y)

x<y

!(x<y)

6:

5-J:

1:

1

!1

x = x_i

3:

y = y_i

4:

2:

2-J:

!go_i

!(!go_i)

d_o = x

1-J:

9:

(c) state diagram

First create algorithm

Convert algorithm to “complex” state machine

Known as FSMD: finite-state machine with datapath

Can use templates to perform such conversion

Document info
Document views81
Page views81
Page last viewedWed Dec 07 20:39:19 UTC 2016
Pages29
Paragraphs1664
Words3162

Comments