EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
物理代写案例
您的位置: 主页 > 理科代写案例 > 物理代写案例 >
物理代写:Principle of Computer Organization代写 project代写 - 物理作业代写/物理代考
发布时间:2021-07-25 17:35:19浏览次数:
2.4Conditions that the MiniCPU should haltIf one of the following situations is encountered, the global flag Halt is set to 1, and hence the simulation halts. Principle of Computer Organization代写An illegal instruction is encountered. Instructions beyond the list of instructions in Figure 1 are illegal.Jumping to an address that is not word-aligned (being multiple of 4)The address of lw or sw is not word-alignedAccessing data or jump to address that is beyond the memory.2.5Format of the input machine code fileMiniCPU takes hexadecimal formatted machine codes, with filename xxx.asc, as input.  An example of .asc file is shown below. Code after “#” on any line is treated as comments.20010000    #addi $1, $0, 0200200c8    #addi $2, $0, 20010220003    #beq $1, $2, 300000020    #delay slot20210001    #addi $1, $1, 100000020    #no operationThe simulation ends when an illegal instruction, such as 0x00000000, is encountered.2.6Note on branch addressing  Principle of Computer Organization代写The branch offset in MIPS, and hence in MiniCPU, is relative to the next instruction, i.e. (PC+4). For example,3.Resources  Principle of Computer Organization代写3.1Files providedPlease download project.zip from ftp://ftp.must.edu.mo/, the following are files after unzip:minicpu.c minicpu.h component.c minicpuasm.pl    incommandtest01.asm test01.asc test02.asm test02.ascThese files contain the main program and the other supporting functions of the simulator. The code should be self-explanatory. You are required to fill in and modify the functions in component.c. You are not allowed to modify minicpu.c and minicpu.h. All your works should be placed in component.c only. You are not allowed to add new files. Otherwise, your program will not be marked. Principle of Computer Organization代写3.2MIPS assemblerA simple assembler minicpuasm.pl is provided for your convenience of testing your MinCPU. The command is:$minicpuasm.pl filename.asm filename.ascwhere filename.asm is your assembly code file and filename.asc is the output machine code file in hexadecimal format.4.Functions in component.c  Principle of Computer Organization代写Firstly, you are required to complete a function (ALU(…)) in component.c that simulates the operations of an ALU.void ALU(unsigned A, unsigned B, char ALUControl, unsigned *ALUresult, char *Zero){if(ALUControl==0x0)*ALUresult=A+B;         //add}ALU(…)Implement the operations on input parameters Aand B according to ALUControl.Output the result to ALUresult.Assign Zeroto 1 if the result is zero; otherwise, assign 0.The following table shows the operations of the ALU.

所有物理代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供物理代写、物理作业代写、物理代考等留学生物理作业代写、exam代考服务。