Homework Fourth Chapter

Source: Internet
Author: User

4.48

Take the finger stage

Icode:ifun = m1[pc] = c:0

RA:RB <= M1[pc+1]

Valc <= M4[pc+2]

Valp <= PC + 6

Decoding phase

Valb <= R[RB]

Implementation phase

ValE <= Valb + valc

Setcc

Visit stage

Write Back Stage

R[RB] <= ValE

4.50

Take a finger

BOOL Need_regids =

Icode in {irrmovl, IOPL, IPUSHL, IPOPL,

IIRMOVL, IRMMOVL, IMRMOVL, IADDL

};

BOOL Need_valc =

Icode in {iirmovl, IRMMOVL, IMRMOVL, Ijxx, ICALL, IADDL

};

Decoding and writeback

int Srca = [

Icode in {irrmovl, IRMMOVL, IOPL, IPUSHL}: RA;

Icode in {Ipopl,iret}: RESP;

1:rnone; # Don ' t need register

];

int SrcB = [

Icode in {IOPL, IRMMOVL, IMRMOVL, iaddl}: RB;

Icode in {IPUSHL, IPOPL, ICALL, IRET}: RESP;

Icode in {ileave}: REBP;

1:rnone; # Don ' t need register

];

int dste = [

Icode in {IRRMOVL} && cnd:rb;

Icode in {iirmovl, IOPL, iaddl}: RB;

Icode in {IPUSHL, IPOPL, ICALL, IRET, ileave}: RESP;

1:rnone; # Don ' t write any register

];

int dstm = [

Icode in {imrmovl, Ipopl}:ra;

Icode in {ileave}: REBP;

1:rnone; # Don ' t write any register

];

Perform

int AluA = [

Icode in {IRRMOVL, IOPL}: ValA;

Icode in {iirmovl, IRMMOVL, IMRMOVL, iaddl}: Valc;

Icode in {ICALL, ipushl}:-4;

Icode in {IRET, IPOPL, Ileave}:4;

# Other instructions don ' t need ALU

];

int alub = [

Icode in {irmmovl, IMRMOVL, IOPL, ICALL,IPUSHL, IRET, IPOPL, Ileave, iaddl}: Valb;

Icode in {irrmovl, iirmovl}:0;

# Other instructions don ' t need ALU

];

BOOL SET_CC = Icode in {IOPL, iaddl};

Visit

int mem_addr = [

Icode in {irmmovl, IPUSHL, ICALL, IMRMOVL}: ValE;

Icode in {ipopl, IRET}: ValA;

Icode in {ileave}: valb;

# Other instructions don ' t need address

];

BOOL Mem_read = Icode in {imrmovl, IPOPL, IRET, ileave};

Homework Fourth Chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.