escape manual

background image

ESCAPE

v1.1

Man

ual

P

eter

V

erplaetse

Departmen

t

of

Electronics

and

Information

Systems

Univ

ersit

y

of

Ghen

t,

Belgium

peter.verp

lae

tse

@e

lis

.ru

g.a

c.

be

1

In

tro

duction

ESCAPE

is

an

easy-to-use,

highly

in

teractiv

e

p ortable

PC-based

sim

ulation

en

vironmen

t

aimed

at

the

supp ort

of

computer

arc

hitecture

education.

The

en

vironmen

t

can

sim

ulate

b oth

a

microprogramm

ed

arc

hitecture

and

a

pip elined

arc

hitecture

with

simple

pip eline.

Both

arc

hitectures

are

custom-made,

with

a

certain

amoun

t

of

con gurabilit

y

.

Other

to ols,

suc

h

as

a

memory

monitor,

assem

bler/disassem

bler

and

analysis

to ols,

suc

h

as

on-the- y

generation

of

pip eline

activit

y

and

usage

diagrams,

are

in

tegrated

with

the

en

vironmen

t.

2

Running

ESCAPE

The

required

executables

can

b e

do

wnloaded

from

http://www.elis.r

ug.ac

.be/p

vrpla

et/~d

ownl

oad.h

tml.

Some

windo

ws

migh

t

lo ok

corrupt

when

using

large

or

custom

size

fon

ts

{

w

e

recommend

to

use

small

fon

ts.

2.1

Windo

ws

3.x

Use

the

16-bit

v

ersion

of

ESCAPE

if

y

ou

are

using

a

Windo

ws

3.x

op erating

system.

The

16-bit

v

ersion

is

not

100%

stand-alone.

When

no

other

Borland

soft

w

are

is

installed

on

y

our

system,

a

few

les

from

the

Borland

Run

time

Library

ma

y

b e

required

for

the

program

to

run

prop erly

.

If

y

ou

get

the

follo

wing

error

message

after

launc

hing

escap e16.exe:

An

error

o ccurred

while

attempting

to

initialize

the

Borland

Database

Engine

(error

$2108)

y

ou

need

to

place

the

follo

wing

les

in

the

same

directory

as

escape16.exe:

Idapi01.dll

Ild01.dll

These

les

can

b e

do

wnloaded

from

http://www.elis.

rug.a

c.be/

~pvrp

laet/

down

load.

html

as

w

ell.

2.2

Windo

ws

98/95/NT

Use

the

32-bit

v

ersion

of

ESCAPE

when

using

a

32-bit

op erating

system

suc

h

as

Windo

ws

98,

Windo

ws

95

or

Windo

ws

NT.

3

Arc

hitectural

details

The

instruction

set

arc

hitecture

is

inspired

b

y

Hennessy

and

P

atterson's

DLX.

The

three

distinguished

t

yp es

of

instructions

(I-t

yp e,

R-t

yp e

and

J-t

yp e)

are

sho

wn

in

gure

1.

Con

trary

to

the

DLX

arc

hitecture

the

size

of

1

background image

Opcode

Opcode

Opcode

r

1

r

1

r

2

r

2

r

3

r

4

Immediate 1

Immediate 2

n

o

n

o

n

o

n

r

n

r

n

r

n

r

n

r

n

r

n

i1

n

i2

I-type instruction:

R-type instruction:

J-type instruction:

Figure

1:

instruction

enco ding.

the

bit elds

is

not

xed,

but

dep ends

on

the

maxim

um

n

um

b er

of

instructions

and

the

size

of

the

register

le.

All

instructions

ha

v

e

a

32-bit

enco ding,

hence

the

length

of

the

immedia

te

elds

(n

i1

and

n

i2

)

can

b e

deriv

ed

from

the

bit eld

sizes

of

the

op co de

and

formals

(n

o

and

n

r

):

n

i1

=

32

n

o

2n

r

n

i2

=

32

n

o

R-t

yp e

instructions

can

ha

v

e

up

to

6

formals

(assuming

n

r

is

suÆcien

tly

small).

This

can

b e

useful

for

imple-

men

ting

more

adv

anced

op erations

in

the

microprogramm

ed

arc

hitecture,

a

p opular

homew

ork

assignmen

t.

3.1

Microprogrammed

arc

hitecture

The

arc

hitecture

consists

of

a

con

trol

unit

and

a

datapath,

as

can

b e

seen

in

gure

2.

The

datapath

consists

of

a

register

le,

t

w

o

read

registers

(A,

B)

and

a

write

register

(C),

a

memory

in

terface

with

address

(MAR),

data

(MDR)

and

instruction

(IR)

registers,

a

program

coun

ter

(PC),

a

n

um

b er

of

extra

registers

(t

ypically

IAR

and

a

few

temp orary

registers)

and

an

ALU.

The

di eren

t

parts

are

connected

b

y

t

w

o

input

buses

(S1

and

S2)

and

a

result

bus.

The

ALU

can

p erform

a

n

um

b er

of

basic

op erations

in

a

single

cycle,

as

sho

wn

in

table

1.

A

built-in

comparator

do es

zero

and

sign

detection

on

the

result.

Op eration

Result

Note

ADD

S1

+

S2

add

SUB

S1

S2

subtract

RSUB

S2

S1

rev

erse

subtract

MUL

S1



S2

m

ultiply

DIV

S1



S2

divide

AND

S1

&

S2

bit

wise

and

OR

S1

j

S2

bit

wise

or

X

OR

S1

^

S2

bit

wise

exclusiv

e

or

SLL

S1

<<

S2

shift

left

SRL

S1

>>

S2

shift

righ

t

SRA

S1

>>

a

S2

shift

righ

t

arithmetic

S1

S1

pass

S1

S2

S2

pass

S2

S2S1

S2

[15

:

0]

<<

16

+

S1[15

:

0]

for

LIH

instruction

T

able

1:

basic

ALU

op erations.

The

memory

in

terface

can

load

and

store

b

ytes,

halv

es

(16

bit)

or

w

ords

(32

bit),

with

adjustable

access

time.

Both

instructions

and

data

are

stored

in

the

same

memory

(v

on

Neumann

arc

hitecture).

The

con

trol

unit

is

microprogramm

ed.

The

micro co de

address

is

k

ept

in

a

sp ecial

register

(uAR).

During

eac

h

cycle

uAR

is

either

incremen

ted

or

replaced

with

a

new

v

alue

(i.e.

a

jump

to

a

new

microinstruction).

T

ypical

2

background image

TMPn

PC

TMP1

µ

AR

A

C

B

MAR
MDR

IR

Register

file

Micro-

code

Jump

tables

ALU

Address

Data

in

Data

out

+

S1 S2

Result

1

Control Unit

Datapath

Processor

Memory

Sign

extend

Figure

2:

microprogramm

ed

arc

hitecture.

3

background image

jump

conditions

are:

memory

busy

,

ALU

output

zero,

ALU

output

negativ

e

and

in

terrupt

p ending.

The

jump

address

is

either

stored

in

the

micro co de,

or

read

from

a

jump

table

(indexed

b

y

the

op co de

eld

in

IR).

The

latter

is

useful

for

instruction

deco ding.

The

n

um

b er

of

jump

tables

is

adjustable

from

1

to

4.

3.2

Pip

elined

arc

hitecture

Both

the

con

trol

unit

and

the

datapath

are

pip elined

in

to

the

v

e

traditional

stages:

IF

(instruction

fetc

h),

ID

(instruction

deco de),

EX

(execute

and

e ectiv

e

address

calculation),

MEM

(memory)

and

WB

(write

bac

k),

as

can

b e

seen

in

gure

3:

Because

there

are

at

least

three

cycles

b et

w

een

reading

the

register

le

and

write

bac

k,

PC

PC1

MAR

SMDR

RES1

LMDR

RES2

COND

IR

A

B

Register

file

ALU

+

Address
Data

in

Data

out

Address

Data

out

Sign

extend

?

IR1

IR2

IR3

ST1

ST2

ST3

4

Data memory

Instruction

memory

Control Unit

Datapath

IF

ID

EX

MEM

WB

Figure

3:

pip elined

arc

hitecture.

a

forw

arding

mec

hanism

is

implemen

ted

to

prev

en

t

the

pip e

from

unnecessary

stalling.

The

register

le

is

read

in

the

ID

stage,

but

written

during

the

WB

stage.

W

rite

through

is

explicit

b

y

the

use

of

m

ultiplexers.

The

EX

stage

consists

of

an

ALU

and

a

comparator.

The

ALU

can

p erform

the

same

op erations

as

the

one

for

the

microprogramm

ed

arc

hitecture.

During

the

execution

of

a

branc

h

the

comparator

ev

aluates

the

branc

h

condition

while

the

ALU

calculates

the

e ectiv

e

address.

Dep ending

on

the

settings

of

the

sim

ulator

the

t

w

o

instructions

follo

wing

the

branc

h

can

b e

executed

(i.e.,

a

double

dela

y

slot),

n

ulli ed

(no

dela

y

slot),

or

only

the

instruction

in

the

IF

stage

is

n

ulli ed

(single

dela

y

slot).

There

are

t

w

o

separate

memory

in

terfaces:

one

for

instructions

and

one

for

data

(Harv

ard

arc

hitecture).

The

instruction

memory

access

time

is

xed

(single

cycle

access);

the

data

memory

access

time

is

adjustable

from

1

to

9

clo c

k

cycles.

Access

to

the

data

memory

o ccurs

during

the

MEM

stage.

4

F

orm

o

v

erview

The

application

consists

of

sev

eral

forms

or

windo

ws.

The

most

imp ortan

t

forms

are:



Main

F

orm



Con guration

F

orm

4

background image



Microprogrammed

Arc

hitecture

F

orm



Micro co de

and

Jump

T

ables

F

orm



Pip elined

Arc

hitecture

F

orm



Pip eline

F

unctionalit

y

F

orm



Pip eline

Diagrams



Instruction

Memory

F

orm



Data

Memory

F

orm



Breakp oin

ts

F

orm

The

forms

will

b e

discussed

in

more

detail

in

the

follo

wing

sections.

Most

forms

ha

v

e

men

u's.

By

clic

king

on

the

righ

t

mouse

button,

a

p op-up

men

u

app ears

from

whic

h

most

men

u

items

can

b e

selected

as

w

ell.

5

Main

F

orm

After

launc

hing

the

sim

ulation

en

vironmen

t

the

main

form

app ears.

On

the

righ

t

side

of

the

form

are

three

buttons.

By

clic

king

on

these

buttons

y

ou

can

launc

h

the

sim

ulator

for

the

microprogramm

ed

or

the

pip elined

arc

hitecture,

or

con gure

b oth

arc

hitectures.

Clic

k

on

the

close

icon

of

the

windo

w

to

exit

the

application.

If

the

curren

t

con guration

has

c

hanged

but

has

not

b een

sa

v

ed

y

et,

the

user

is

ask

ed

to

sa

v

e

the

con guration

rst.

6

Con guration

F

orm

The

con guration

form

can

b e

used

to

con gure

b oth

arc

hitectures.

The

con guration

is

stored

with

'.ecf'

extension.

When

starting

the

en

vironmen

t,

the

application

rst

lo oks

for

'escape.ecf'.

If

this

le

is

not

found,

it

searc

hes

for

an

y

'*.ecf'

le.

When

suc

h

a

le

is

found,

it

is

loaded

as

the

default

con guration.

If

no

les

matc

h,

no

default

con guration

is

loaded.

The

con guration

form

consists

of

4

pages:

general

options,

instruction

enco ding

and

t

w

o

arc

hitecture

sp eci c

forms.

Y

ou

can

switc

h

from

one

page

to

another

b

y

clic

king

on

the

tabs

on

the

b ottom

of

the

form.

6.1

General

options

ALU

Op erations

MUL

T

and

DIV

op erations

can

b e

disabled,

since

it

is

not

realistic

for

those

op erations

to

b e

executed

in

a

single

cycle.

Comparator

Op erations

A

minim

al

or

complete

set

of

comparator

op erations

can

b e

selected.

The

minim

al

set

consists

of

only

t

w

o

op erations:

equal

and

less

than.

The

complete

set

consists

of

all

6

op erations

(equal,

not

equal,

less

than,

greater

than,

less

than

or

equal

and

greater

than

or

equal).

Sign

Extend

Sign

extension

can

b e

done

to

b

ytes,

halv

es

or

w

ords,

or

to

w

ords

only

.

Memory

Op erations

Memory

op erations

can

b e

done

with

b

yte,

half

and

w

ord

resolution,

or

w

ord

only

resolution.

Memory

Size

The

data

memory

size

can

b e

set

from

64

to

32768

b

ytes.

The

co de

memory

size

(pip elined

arc

hitecture)

or

default

co de

range

(microprogramm

ed

arc

hitecture)

can

b e

set

from

64

to

32768

as

w

ell.

5

background image

6.2

Instruction

enco

ding

The

numb

er

of

op

c

o

des

can

b e

set

from

16

to

256.

The

numb

er

of

r

e

gisters

in

the

register

le

is

con gurable

from

4

to

256.

Changing

these

t

w

o

n

um

b ers

in uences

the

size

of

the

immediates

and

the

n

um

b er

of

formals

that

can

b e

used

for

R-t

yp e

instructions.

F

or

eac

h

instruction

one

m

ust

sp ecify:

The

Op co de

Alphan

umeric

c

haracters

without

spaces.

The

Instruction

T

yp e

R-,

I-

or

J-t

yp e.

The

Mnemonic

Represen

tatio

n

The

textual

represen

tation

of

the

op erands.

The

formals

r1-r6

will

b e

replaced

b

y

actuals

(with

capital

R).

Use

'i'

or

'j'

to

represen

t

immediates.

Note

that

b oth

'i'

and

'j'

can

b e

used

for

b oth

I-t

yp e

and

J-t

yp e

instructions:

with

'i'

the

imm

ediate

is

represen

ted

as

an

absolute

in

teger;

with

'j'

the

imm

ediate

is

in

terpreted

as

a

PC-relativ

e

address

(relativ

e

to

the

address

of

the

next

instruction)

and

lab els

are

used

when

p ossible.

6.3

Microprogrammed

arc

hitecture

Micro co de

Memory

The

micro co de

size

can

b e

set

from

2

to

1024

lines.

The

width

of

the

constan

t

eld

is

con gurable

from

0

to

32

bits.

Register

File

Op erations

Sp ecify

whic

h

formals

should

b e

read

in

registers

A

and

B

during

an

RR

op eration.

Chec

kmark

the

additional

op erations

that

can

b e

p erformed

(RAF:

read

formal

in

to

A,

RBF:

read

formal

in

to

B,

RAA:

read

actual

in

to

A,

RBA:

read

actual

in

to

B,

WF:

write

formal,

W

A:

write

actual).

Jump

T

ables

Set

the

n

um

b er

of

tables

from

1

to

4

Extra

Registers

En

ter

the

names

of

the

extra

organizational

registers.

6.4

Pip

elined

arc

hitecture

Register

File

Reading

Since

instruction

deco ding

is

on

the

critical

path

and

register

le

accesses

are

slo

w

as

w

ell,

it

is

not

realistic

when

the

formals

to

b e

read

during

the

ID

stage

dep end

on

the

instruction

that

gets

deco ded

at

the

same

time.

When

register

le

reading

is

set

to

Instruction

Indep

endent,

register

A

(B)

is

alw

a

ys

loaded

with

formal

1

(2).

Stall

Con

trol

Stalling

of

the

di eren

t

stages

is

con

trolled

indep enden

tly

.

This

ma

y

app ear

strange

to

those

who

are

used

to

alw

a

ys

ha

ving

the

pip e

stalling

upstream.

Therefore,

stall

con

trol

can

b e

set

to

Unc

onditional

ly

Stal

l

Upstr

e

am

to

ac

hiev

e

the

latter.

Since

instruction

deco ding

is

on

the

critical

path

and

register

le

accesses

are

slo

w

as

w

ell,

it

is

not

realistic

when

the

formals

to

b e

read

during

the

ID

stage

dep end

on

the

instruction

that

gets

deco ded

at

the

same

time.

When

register

le

reading

is

set

to

Instruction

Indep

endent,

register

A

(B)

is

alw

a

ys

loaded

with

formal

1

(2).

6.5

Men

u

items

File!New

File

Discard

all

settings.

File!Op en

File

Read

settings

from

a

le.

File!Sa

v

e

File

W

rite

the

curren

t

settings

to

a

le.

The

user

is

prompted

for

a

le

name

when

no

name

has

b een

sp eci ed.

File!Sa

v

e

File

As

Similar

to

the

previous

men

u,

but

the

user

is

alw

a

ys

prompted

for

a

le

name.

6

background image

File!Hide

F

orm

Hides

the

con guration

form

and

displa

ys

the

main

form

again.

The

same

can

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

Help!Ab out

Sho

ws

the

ab out

b o

x.

7

Microprogrammed

Arc

hitecture

F

orm

The

microprogramm

ed

arc

hitecture

form

sho

ws

most

organizational

elemen

ts

of

this

arc

hitecture.

If

not

all

registers

in

the

register

le

are

visible,

clic

k

on

the

register

le

to

sho

w

a

blinking

cursor.

Use

the

cursor

k

eys

to

w

alk

through

the

registers.

The

p osition

of

the

m

ultiplexers

and

the

bus

sources

are

visualized

b

y

thic

k

blac

k

lines.

Registers

that

ha

v

e

a

gra

y

bac

kground

are

disabled

(and

will

k

eep

their

con

ten

t

during

the

next

clo c

k

cycle).

Registers

with

a

white

bac

kground

will

b e

up date

during

the

next

cycle.

By

clic

king

on

the

wires

that

in

terconnect

the

di eren

t

elemen

ts

a

p op-up

b o

x

app ears

that

sho

ws

the

driv

er

and

curren

t

v

alue

of

that

wire.

On

the

righ

t

of

the

form

are

a

few

buttons

and

b o

xes

to

con

trol

the

sim

ulation.

A

clic

k

on

the

Reset

button

results

in

initialization

of

the

arc

hitecture.

Clic

k

on

the

Clo c

k

button

to

sim

ulate

one

or

m

ultiple

clo c

k

cycles.

A

clic

k

on

the

Rewind

button

will

rewind

the

clo c

k.

Note

that

the

clo c

k

can

not

b e

rewinded

for

more

than

1024

cycles.

If

the

m

ultipl

e

cycles

b o

x

is

c

hec

kmark

ed,

the

n

um

b er

of

cycles

sp eci ed

in

the

Cycles

b o

x

will

b e

sim

ulated

or

rewinded.

Y

ou

can

also

en

ter

a

new

v

alue

in

the

Time

b o

x

to

sim

ulate

or

rewind

clo c

k

cycles.

When

sim

ulating

more

than

one

cycle,

the

sim

ulation

will

b e

in

terrupted

when

a

breakp oin

t

condition

is

met

or

when

a

memory

access

violation

o ccurs.

7.1

Men

u

items

File!New

Pro

ject

Clear

the

memory

and

discard

all

settings

File!Op en

Pro

ject

Load

the

settings

from

a

le.

This

will

automatically

load

data

and

instruction

memory

mo dules,

and

micro co de.

Since

co de

and

data

memory

are

ph

ysically

the

same

(v

on

Neumann

arc

hitec-

ture),

part

of

the

data

memory

is

o

v

erwritten

with

the

co de

memory

.

This

allo

ws

the

user

to

man

ually

edit

the

instruction

memory

les.

File!Sa

v

e

Pro

ject

Sa

v

es

the

settings

to

a

le.

The

instruction

and

data

memory

mo dules,

and

the

micro co de

will

b e

sa

v

ed

as

w

ell.

File!Sa

v

e

Pro

ject

As

Similar

to

the

previous

men

u,

but

the

user

is

prompted

for

a

pro

ject

le

name.

File!Set

T

race

File

Before

trace

le

generation

can

b e

enabled

(see

the

Options

Generate

T

race

File

item),

a

trace

le

m

ust

b e

set

rst.

W

arning:

this

will

erase

the

selected

trace

le.

File!Exit

Exits

the

sim

ulator

and

sho

ws

the

main

form

again.

The

user

is

prompted

to

sa

v

e

the

pro

ject

if

necessary

.

View!Instruction

Memory

Sho

ws

the

instruction

view

of

the

main

memory

.

View!Data

Memory

Selecting

this

item

sho

ws

the

data

view

of

the

main

memory

.

View!Micro co de

By

clic

king

on

this

item

the

micro co de

and

jump

tables

form

is

displa

y

ed.

View!Breakp oin

ts

Clic

k

on

this

item

to

displa

y

the

breakp oin

ts

form.

Options!Gen

erate

T

race

File

After

setting

a

trace

le

(with

File!Set

T

race

File)

this

men

u

item

b e-

comes

enabled.

Clic

k

on

it

to

generate

a

trace

le

while

sim

ulating.

Eac

h

time

the

PC

register

is

c

hanged,

a

new

line

is

added

to

the

trace

le.

This

ma

y

not

w

ork

prop erly

with

self-mo difying

co de.

By

clic

king

on

the

Options!Gen

erat

e

T

race

File

item

again,

the

c

hec

kmark

is

remo

v

ed

and

trace

le

generation

is

disabled.

7

background image

Options!Enabl

e

Rewind

T

o

sp eed

up

sim

ulation

the

rewind

option

can

b e

disabled.

It

can

b e

enabled

at

an

y

time

{

the

Rewind

button

will

b e

enabled

as

so on

as

y

ou

sim

ulate

more

clo c

k

cycles.

Options!Memory

Access

Time

Select

this

item

to

set

the

memory

access

time

to

a

v

alue

from

1

to

9

cycles.

The

default

v

alue

is

4

cycles.

Help!Ab out

Sho

ws

the

ab out

b o

x.

8

Micro

co

de

and

Jump

T

ables

F

orm

This

form

can

b e

used

to

de ne

the

functionalit

y

of

the

microprogramm

ed

arc

hitectures.

The

form

consists

of

2

pages:

a

Micro co de

page

and

a

Jump

T

ables

page.

Y

ou

can

switc

h

from

one

page

to

another

b

y

clic

king

on

the

tabs

on

the

b ottom

of

the

form,

or

b

y

clic

king

on

one

of

the

View

men

u

items.

8.1

Micro

co

de

The

micro co de

is

represen

ted

as

a

table.

Eac

h

ro

w

of

the

table

corresp onds

to

a

microinstruction.

Eac

h

ro

w

in

this

table

has

to

b e

seen

as

a

set

of

parallel

instructions

at

the

micro co de

lev

el,

and

consists

of

the

follo

wing

items:

uAR

This

is

the

micro co de

address.

Lab el

Since

the

micro co de

address

can

c

hange

when

inserting

or

deleting

ro

ws,

lab els

are

used

to

sp ecify

jump

addresses

in

the

micro co de.

En

ter

a

lab el

(alphan

umeric

sequence

without

whitespace)

here

to

iden

tify

the

microinstruction.

ALU

The

functionalit

y

of

the

ALU

when

executing

this

micro co de

instruction.

P

ossible

v

alues

are:

(empt

y

{

no

op eration),

ADD,

SUB,

RSUB,

AND,

OR,

X

OR,

SLL,

SRL,

SRA,

S1,

S2,

S2S1

and

MUL

and

DIV

when

they

are

enabled

on

the

con guration

form.

S1

The

source

of

bus

S1.

P

ossible

v

alues

are:

(empt

y

{

no

source),

A,

Const,

PC,

MAR,

MDR,

IR

and

the

extra

organizational

registers

added

on

the

con guration

form.

All

sources

are

organizational

registers,

with

the

exception

of

Const,

whic

h

is

a

n

um

b er

co ded

in

the

microinstruction,

and

IR,

whic

h

is

really

a

sign

extended

v

ersion

of

the

immediate

co ded

in

the

curren

t

macroinstruction.

S2

The

source

of

bus

S2.

P

ossible

v

alues

are:

(empt

y

{

no

source),

B,

Const,

PC,

MAR,

MDR,

IR

and

the

extra

organizational

registers

added

on

the

con guration

form.

Dest

The

destination

of

the

ALU.

P

ossible

v

alues

are:

(empt

y

{

no

destination),

C,

PC,

MAR,

MDR

and

the

extra

organizational

registers

added

on

the

con guration

form.

ExtIR

The

size

to

whic

h

the

immediate

co ded

in

the

macroinstruction

should

b e

extended.

Dep ending

on

the

con guration,

the

p ossible

v

alues

are:

(empt

y),

Byte,

W

ord

and

Half,

or

(empt

y)

or

W

ord.

When

(empt

y)

is

selected,

no

extension

o ccurs,

and

the

output

of

the

Sign

Extender

is

v

oid.

Const

The

constan

t

co ded

in

the

microinstruction.

The

n

um

b er

of

bits

can

b e

set

on

the

con guration

form.

En

ter

the

v

alue

in

decimal

(signed

or

unsigned),

or

in

hexadecimal.

In

the

latter

case

the

n

um

b er

m

ust

b e

preceded

with

"0x".

JCond

This

eld

determines

whic

h

microinstruction

will

b e

executed

next.

The

p ossible

v

alues

are

sho

wn

in

table

2.

Adr

The

lab el

of

the

microinstruction

to

b e

executed

next

when

the

jump

condition

ev

aluates

to

true.

1

these

v

alues

are

only

a

v

ailable

when

the

complete

set

is

selected

for

the

comparator

on

the

con guration

form.

8

background image

V

alue

Result

(empt

y)

uAR

:=

uAR+1

T

rue

uAR

:=

Adr

(Adr

is

co ded

in

the

microinstruction)

EQ

uAR

:=

Adr

when

Result(ALU)

=

0

NE

1

uAR

:=

Adr

when

Result(ALU)

<>

0

L

T

uAR

:=

Adr

when

Result(ALU)

<

0

GT

1

uAR

:=

Adr

when

Result(ALU)

>

0

LE

1

uAR

:=

Adr

when

Result(ALU)

<=

0

GE

1

uAR

:=

Adr

when

Result(ALU)

>=

0

MBusy

uAR

:=

Adr

when

the

memory

is

busy

Jump

n

uAR

:=

Address(Jump

T

able

n)

T

able

2:

jump

conditions.

Mem

The

functionalit

y

of

the

memory

in

terface.

Dep ending

on

the

settings

on

the

con guration

form,

the

p ossible

v

alues

are:

(empt

y

{

no

op eration),

R

W

and

WW

or

(empt

y),

RB,

RH,

R

W,

WB,

WH,

WW.

The

rst

c

haracter

indicates

read

(R)

or

write

(W),

the

second

c

haracter

indicates

the

width

of

the

memory

access:

b

yte

(B),

half

(H)

or

w

ord

(W).

MAdr

The

source

of

the

memory

address

for

read

or

write

op erations.

Either

(empt

y

{

defaults

to

MAR),

MAR

or

PC.

MDest

The

destination

register

for

memory

write

op erations.

P

ossible

v

alues

are:

(empt

y

{

defaults

to

IR),

MDR

or

IR.

Regs

The

functionalit

y

of

the

register

le.

The

p ossible

v

alues

dep end

on

the

settings

on

the

con guration

form

and

are

explained

in

table

3:

V

alue

F

unction

RR

Read

formals

in

to

registers

A

and

B

RAF

n

Read

formal

n

in

to

register

A

RBF

n

Read

formal

n

in

to

register

B

WF

n

W

rite

formal

n

in

to

register

C

RAA

n

Read

actual

n

in

to

register

A

RBA

n

Read

actual

n

in

to

register

B

W

A

n

W

rite

actual

n

in

to

register

C

T

able

3:

register

le

functionalit

y

.

There

are

t

w

o

mo des

for

editing

the

micro co de:

edit

mo de

and

drop do

wn

mo de.

In

the

edit

mo de

all

elds

ha

v

e

to

b e

en

tered

b

y

k

eyb oard.

In

the

drop do

wn

mo de,

a

drop do

wn

b o

x

app ears

as

so on

as

y

ou

clic

k

on

a

eld

with

limited

set

of

p ossible

v

alues

(i.e.

ALU,

S1,

S2,

Dest,

ExtIR,

JCond,

Mem,

MAdr,

MDest

and

Regs).

The

drop do

wn

mo de

can

b e

enabled

or

disabled

from

the

Edit

men

u,

and

is

enabled

b

y

default.

Next

to

the

default

o

v

erwrite

mo de,

there

exists

also

an

insert

mo de.

T

oggle

from

one

to

another

with

the

Insert

k

ey

.

In

insert

mo de

an

empt

y

ro

w

is

inserted

whenev

er

the

user

hits

the

En

ter

k

ey,

and

when

pasting

the

ro

ws

are

inserted

instead

of

b eing

o

v

erwritten.

8.2

Jump

T

ables

The

jump

tables

form

is

a

table

with

the

op co des

in

the

rst

column

and

destinations

elds

for

the

jump

tables

in

other

columns.

When

the

JCond

eld

of

the

curren

t

microinstruction

has

a

v

alue

of

Jump

n

,

the

next

microinstruction

to

b e

executed

is

determined

b

y

the

ro

w

in

jump

table

n

indexed

b

y

the

op co de

p ortion

of

IR.

9

background image

8.3

Men

u

items

File!New

File

Discard

all

data.

File!Op en

File

Read

micro co de

and

jump

tables

from

a

le.

Since

all

les

are

ASCI I,

they

can

b e

edited

with

a

simple

editor

(suc

h

as

Notepad).

Because

lab els

are

used

for

jumps,

the

micro co de

address

do es

not

ha

v

e

to

b e

up dated

man

ually:

after

loading

the

micro co de

the

addresses

are

ren

um

b ered

automatically

.

File!Sa

v

e

File

W

rite

the

data

to

a

le.

The

user

is

prompted

for

a

le

name

when

no

name

has

b een

sp eci ed.

File!Sa

v

e

File

As

Similar

to

the

previous

men

u,

but

the

user

is

alw

a

ys

prompted

for

a

le

name.

File!Hide

F

orm

Hides

the

micro co de

form,

whic

h

can

also

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

Note

that

the

form

still

exists,

therefore

the

user

is

not

y

et

prompted

to

sa

v

e

an

y

data

that

ma

y

ha

v

e

b een

mo di ed.

Edit!Cut

Only

enabled

when

editing

the

micro co de

page.

After

selecting

one

or

more

ro

ws,

select

this

men

u

item

to

cut

the

ro

ws

to

the

clipb oard.

Edit!Cop

y

Only

enabled

when

editing

the

micro co de

page.

Select

this

men

u

item

to

cop

y

ro

ws

to

the

clipb oard.

Edit!P

aste

Only

enabled

when

editing

the

micro co de

page.

Inserts

or

o

v

erwrites

the

ro

ws

cut

or

copied

to

the

clipb oard.

Edit!Delete

Only

enabled

when

editing

the

micro co de

page.

Deletes

the

selected

ro

ws.

Edit!Select

All

Only

enabled

when

editing

the

micro co de

page.

Selects

all

ro

ws.

Edit!Cop

y

Op co des

Only

enabled

when

editing

the

jump

tables

page.

After

selecting

a

certain

jump

table

eld

and

selecting

this

men

u

item,

all

elds

of

the

jump

table

are

lled

with

the

op co de

names

as

lab els.

This

can

b e

useful

when

using

a

jump

table

for

the

deco ding

of

instructions.

Edit!Fill

Only

enabled

when

editing

the

jump

tables

page.

First

the

user

is

prompted

for

a

v

alue,

then

all

the

selected

elds

are

lled

with

this

v

alue.

Edit!Drop do

wn

Mo de

T

oggles

b et

w

een

drop do

wn

and

edit

mo de.

View!Micro co de

Sho

w

the

micro co de

page.

View!Jump

T

ables

Sho

w

the

jump

tables

page.

View!Base

Set

the

base

for

viewing

the

Const

eld

to

either

Unsigned

Hexadecimal,

Unsigned

Decimal

or

Signed

Decimal.

Assem

ble!Assem

b

le

Since

lab els

are

used

for

jumps,

an

assem

bly

routine

is

required

to

lo okup

all

the

micro co de

addresses

the

lab els

refer

to.

The

assem

ble

routine

is

automatically

in

v

ok

ed

when

loading

or

sa

ving

the

micro co de,

and

b efore

sim

ulating,

therefore

it

is

nev

er

necessary

to

assem

ble

man

ually

.

It

can

ho

w

ev

er

b e

useful

to

c

hec

k

for

errors

while

writing

micro co de.

Help!Ab out

Sho

ws

the

ab out

b o

x.

9

Pip

elined

Arc

hitecture

F

orm

The

pip elined

arc

hitecture

form

is

v

ery

similar

in

use

to

the

microprogramm

ed

arc

hitecture

form.

The

register

le

can

b e

scrolled

with

the

cursor

k

eys,

the

m

ultiplexer

p ositions

are

visualized

b

y

thic

k

blac

k

lines

and

registers

with

a

gra

y

bac

kground

are

disabled.

P

op-up

b o

xes

to

sho

w

the

driv

er

and

curren

t

v

alue

of

wires

are

also

a

v

ailable

here.

The

in

terface

(Clo c

k,

Reset

and

Rewind

buttons,

etc.)

is

also

similar.

10

background image

9.1

Men

u

items

Most

men

u

items

are

iden

tical

to

those

of

the

microprogramm

ed

arc

hitecture

form.

The

View!Micro co de

item

is

replaced

b

y

View!Pip elin

e

F

unctionali

t

y,

and

a

few

additional

men

u

items

exist.

<BR><BR>

View!Pip elin

e

F

unctionali

t

y

Clic

king

on

this

item

the

pip eline

functionalit

y

form

is

displa

y

ed.

View!Enable

Pip eline

Diagrams

Clic

k

on

this

item

to

enable

the

pip eline

diagrams.

This

will

slo

w

do

wn

the

sim

ulation

a

little.

View!Pip elin

e

Activit

y

Diagram

Displa

ys

the

pip eline

activit

y

diagram.

View!Pip elin

e

Usage

Diagram

Displa

ys

the

pip eline

usage

diagram.

Options!Enabl

e

F

orw

arding

Chec

kmark

to

enable

forw

arding.

When

forw

arding

is

disabled,

explicit

write-

through

of

the

register

le

is

still

enabled,

and

stalls

of

the

EX-stage

will

o ccur

instead

of

forw

arding.

F

orw

arding

is

enabled

b

y

default.

Options!Del

a

y

ed

Branc

hing

Use

this

men

u

item

to

set

the

dela

y

slot

size

to

either

No

Dela

y

Slot,

Single

Dela

y

Slot

or

Double

Dela

y

Slot.

Options!Data

Memory

Access

Time

The

default

data

memory

access

time

is

3

clo c

k

cycles,

but

can

b e

set

from

1

to

9

cycles.

10

Pip

eline

F

unctionalit

y

F

orm

This

form

is

the

coun

terpart

of

the

micro co de

and

jump

tables

form

for

the

pip elined

arc

hitecture.

The

pip eline

functionalit

y

is

represen

ted

in

tabular

form

as

w

ell.

F

or

eac

h

op co de

a

n

um

b er

of

items

m

ust

b e

sp eci ed:

A

F

ormal

The

formal

to

b e

read

in

register

A

during

the

ID

stage.

P

ossible

v

alues

are:

(empt

y

{

no

register

is

read),

1,

2

and

3.

When

register

le

reading

is

set

to

instruction

indep enden

t

on

the

con guration

form,

register

A

is

alw

a

ys

loaded

with

formal

1.

B

F

ormal

The

formal

to

b e

read

in

register

B.

When

register

le

reading

is

set

to

instruction

indep enden

t,

register

B

is

alw

a

ys

loaded

with

formal

2.

C

F

ormal

The

formal

to

b e

written

during

the

WB

stage.

P

ossible

v

alues

are:

(empt

y

{

no

write-bac

k

o ccurs),

1,

2

and

3.

S1

The

source

for

the

rst

ALU

op erand.

The

p ossible

v

alues

are:

(empt

y

{

defaults

to

A),

A

or

PC1.

S2

The

source

for

the

second

ALU

op erand.

The

p ossible

v

alues

are:

(empt

y

{

defaults

to

B),

B

or

IR.

IR

Extend

The

size

to

whic

h

the

immediate

co ded

in

the

macroinstruction

should

b e

extended.

Dep ending

on

the

con guration,

the

p ossible

v

alues

are:

(empt

y),

Byte,

W

ord

and

Half,

or

(empt

y)

or

W

ord.

When

(empt

y)

is

selected,

no

extension

o ccurs,

and

the

output

of

the

Sign

Extender

is

v

oid.

ALU

The

functionalit

y

of

the

ALU.

P

ossible

v

alues

are:

(empt

y

{

no

op eration),

ADD,

SUB,

RSUB,

AND,

OR,

X

OR,

SLL,

SRL,

SRA,

S1,

S2,

S2S1

and

MUL

and

DIV

when

they

are

enabled

on

the

con guration

form.

Comp

The

functionalit

y

of

the

comparator.

The

meaning

of

the

p ossible

v

alues

is

explained

in

table

4.

2

these

v

alues

are

only

a

v

ailable

when

the

complete

set

is

selected

for

the

comparator

on

the

con guration

form.

11

background image

V

alue

Result

(empt

y)

0

T

rue

1

EQ

1

when

register

A

=

0

NE

2

1

when

register

A

<>

0

L

T

1

when

register

A

<

0

GT

2

1

when

register

A

>

0

LE

2

1

when

register

A

<=

0

GE

2

1

when

register

A

>=

0

T

able

4:

jump

conditions.

Mem

The

functionalit

y

of

the

data

memory

in

terface.

Dep ending

on

the

settings

on

the

con guration

form,

the

p ossible

v

alues

are:

(empt

y

{

no

op eration),

R

W

and

WW

or

(empt

y),

RB,

RH,

R

W,

WB,

WH,

WW.

The

rst

c

haracter

indicates

read

(R)

or

write

(W),

the

second

c

haracter

indicates

the

width

of

the

memory

access:

b

yte

(B),

half

(H)

or

w

ord

(W).

Similar

to

the

micro co de

page

there

is

also

a

drop do

wn

and

edit

mo de.

10.1

Men

u

items

File!New

File

Discard

all

data.

File!Op en

File

Read

pip eline

functionalit

y

data

from

a

le.

File!Sa

v

e

File

W

rite

the

data

to

a

le.

The

user

is

prompted

for

a

le

name

when

no

name

has

b een

sp eci ed.

File!Sa

v

e

File

As

Similar

to

the

previous

men

u,

but

the

user

is

alw

a

ys

prompted

for

a

le

name.

File!Hide

F

orm

Hides

the

pip eline

functionalit

y

form,

whic

h

can

also

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

Note

that

the

form

still

exists,

therefore

the

user

is

not

y

et

prompted

to

sa

v

e

an

y

data

that

ma

y

ha

v

e

b een

mo di ed.

Edit!Fill

First

the

user

is

prompted

for

a

v

alue,

then

all

the

selected

elds

are

lled

with

this

v

alue.

Edit!Drop do

wn

Mo de

T

oggles

b et

w

een

drop do

wn

and

edit

mo de.

Help!Ab out

Sho

ws

the

ab out

b o

x.

11

Pip

eline

Diagrams

There

are

t

w

o

di eren

t

pip eline

diagrams:

the

pip eline

activit

y

diagram

and

the

pip eline

usage

diagram.

A

pip eline

activity

diagram

plots

for

eac

h

instruction

the

curren

t

pip eline

stage

v

ersus

time.

A

pip eline

usage

diagram

plots

for

eac

h

pip eline

stage

the

curren

t

instruction

(if

an

y)

v

ersus

time.

Eac

h

stage

in

the

usage

diagram

is

displa

y

ed

as

a

colored

b o

x.

The

color

is

asso ciated

with

the

stage.

Eac

h

instruction

in

the

activit

y

diagram

is

displa

y

ed

as

a

colored

b o

x

as

w

ell.

In

this

case

the

color

is

asso ciated

with

an

instruction

that

has

en

tered

the

IF

stage

and

is

k

ept

for

this

instruction

throughout

the

pip eline.

When

a

stage

is

stalled,

it

o ccurs

in

the

pip eline

diagrams

as

a

b o

x

with

a

crossmark

ed

bac

kground.

11.1

Men

u

Items

View!Hide

F

orm

Hides

the

pip eline

diagram

form,

whic

h

can

also

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

12

background image

12

Instruction

Memory

F

orm

The

instruction

memory

form

displa

ys

the

instruction

memory

(pip elined

arc

hitecture)

or

the

co de

p ortion

of

the

main

memory

(microprogramm

ed

arc

hitecture)

in

assem

bly

format.

The

rst

column

sho

ws

the

instruction

address

and

instruction

w

ord,

the

second

column

con

tains

the

optional

lab els,

and

the

instruction

in

assem

bly

format

is

sho

wn

in

the

third

column.

Only

the

latter

t

w

o

are

editable.

Similar

to

the

micro co de

page

there

is

also

an

insert

and

o

v

erwrite

mo de.

T

oggle

from

one

to

another

with

the

Insert

k

ey

.

In

insert

mo de

a

new

instruction

is

inserted

whenev

er

the

user

hits

the

En

ter

k

ey

,

and

when

pasting

the

instructions

are

inserted

instead

of

b eing

o

v

erwritten.

Since

instructions

can

b e

inserted

or

deleted,

part

of

the

instruction

memory

can

mo

v

e

up

or

do

wn.

T

o

prev

en

t

the

data

p ortion

of

the

main

memory

(microprogramm

ed

arc

hitecture)

to

b e

mo

v

ed

as

w

ell,

the

co de

range

of

the

main

memory

can

b e

set

with

the

View!Set

Co de

Range

men

u

item.

Immediate

jump

address

are

relativ

e

to

the

address

of

the

next

instruction,

but

a

lab el

or

the

absolute

jump

address

is

used

in

the

assem

bly

format.

When

en

tering

an

address

within

the

co de

range,

the

address

is

automatically

replaced

b

y

a

lab el.

12.1

Men

u

Items

File!New

File

Discard

all

co de.

File!Op en

File

Read

co de

from

a

le.

File!Sa

v

e

File

W

rite

the

co de

to

a

le.

The

user

is

prompted

for

a

le

name

when

no

name

has

b een

sp eci ed.

File!Sa

v

e

File

As

Similar

to

the

previous

men

u,

but

the

user

is

alw

a

ys

prompted

for

a

le

name.

File!Hide

F

orm

Hides

the

instruction

memory

form,

whic

h

can

also

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

Note

that

the

form

still

exists,

therefore

the

user

is

not

y

et

prompted

to

sa

v

e

an

y

co de

that

ma

y

ha

v

e

b een

mo di ed.

Edit!Cut

After

selecting

one

or

more

instructions,

select

this

men

u

item

to

cut

the

instructions

to

the

clipb oard.

Edit!Cop

y

Select

this

men

u

item

to

cop

y

instructions

to

the

clipb oard.

Edit!P

aste

Inserts

or

o

v

erwrites

the

instructions

cut

or

copied

to

the

clipb oard.

Edit!Delete

Deletes

the

selected

instructions.

Edit!Select

All

Selects

all

instructions

in

the

co de

range.

View!Set

Co de

Range

Allo

ws

y

ou

to

set

the

co de

range.

View!Base

Set

the

base

for

viewing

immediates

to

either

Unsigned

Hexadecimal,

Unsigned

Decimal

or

Signed

Decimal.

Help!Ab out

Sho

ws

the

ab out

b o

x.

13

Data

Memory

F

orm

The

data

memory

form

displa

ys

the

data

memory

(pip elined

arc

hitecture)

or

the

main

memory

(micropro-

grammed

arc

hitecture).

The

data

can

b e

displa

y

ed

in

groups

of

4

(w

ord),

2

(half

)

or

1

b

yte,

and

in

a

signed

or

unsigned

decimal,

or

unsigned

hexadecimal

base.

Change

the

memory

con

ten

t

b

y

editing

the

v

alues,

or

b

y

lling

a

selected

memory

region

with

a

xed

v

alue

or

random

v

alues.

13

background image

13.1

Men

u

Items

File!New

File

Discard

all

data.

File!Op en

File

Read

data

from

a

le.

File!Sa

v

e

File

W

rite

the

data

to

a

le.

The

user

is

prompted

for

a

le

name

when

no

name

has

b een

sp eci ed.

File!Sa

v

e

File

As

Similar

to

the

previous

men

u,

but

the

user

is

alw

a

ys

prompted

for

a

le

name.

File!Hide

F

orm

Hides

the

data

memory

form,

whic

h

can

also

b e

ac

hiev

ed

b

y

clic

king

on

the

windo

w

close

icon.

Note

that

the

form

still

exists,

therefore

the

user

is

not

y

et

prompted

to

sa

v

e

an

y

co de

that

ma

y

ha

v

e

b een

mo di ed.

Edit!Select

All

Selects

all

data.

Edit!Clear

Resets

the

con

ten

t

of

the

selected

memory

region

to

zero.

Edit!Random

Fills

the

selected

region

with

random

v

alues.

Edit!Fill

Prompts

for

a

v

alue,

then

the

selected

region

is

lled

with

this

v

alue.

View!Size

Set

the

size

for

data

grouping

to

b

ytes,

halv

es

or

w

ords.

View!Base

Set

the

base

to

either

Unsigned

Hexadecimal,

Unsigned

Decimal

or

Signed

Decimal.

Help!Ab out

Sho

ws

the

ab out

b o

x.

14

Breakp

oin

ts

F

orm

Breakp oin

ts

can

b e

set

for

organizational

or

register

le

registers.

T

o

set

a

breakp oin

t

y

ou

m

ust:

1.

select

an

organizational

register

or

en

ter

the

n

um

b er

of

the

register

le

register

2.

en

ter

the

breakp oin

t

v

alue

3.

c

hec

kmark

the

little

b o

x

to

the

left

of

the

register

name

or

n

um

b er.

Whenev

er

the

program

sim

ulates

m

ultiple

clo c

k

cycles

and

one

of

the

breakp oin

t

registers

matc

hes,

the

sim

ulation

is

stopp ed.

This

is

useful

for

measuring

the

p erformance

of

the

implem

en

tation,

or

simply

for

debugging

the

assem

bly

program

or

micro co de.

14.1

Men

u

Items

View!Base

Set

the

base

for

the

breakp oin

t

v

alues

to

either

Unsigned

Hexadecimal,

Unsigned

Decimal

or

Signed

Decimal.

View!Hide

F

orm

Hides

the

breakp oin

ts

memory

form.

Help!Ab out

Sho

ws

the

ab out

b o

x.

14


Wyszukiwarka

Podobne podstrony:
PANsound manual
als manual RZ5IUSXZX237ENPGWFIN Nieznany
hplj 5p 6p service manual vhnlwmi5rxab6ao6bivsrdhllvztpnnomgxi2ma vhnlwmi5rxab6ao6bivsrdhllvztpnnomg
BSAVA Manual of Rabbit Surgery Dentistry and Imaging
Okidata Okipage 14e Parts Manual
Bmw 01 94 Business Mid Radio Owners Manual
Manual Acer TravelMate 2430 US EN
manual mechanika 2 2 id 279133 Nieznany
4 Steyr Operation and Maintenance Manual 8th edition Feb 08
Oberheim Prommer Service Manual
cas test platform user manual
Kyocera FS 1010 Parts Manual
juki DDL 5550 DDL 8500 DDL 8700 manual
Forex Online Manual For Successful Trading
ManualHandlingStandingAssessment
Brother PT 2450 Parts Manual
Jabra CLIPPER Manual PL 10311 (1)

więcej podobnych podstron