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

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

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

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

EG1hao
网课代修代上,cs代写代考
C++代做
您的位置: 主页 > 编程案例 > C++代做 >
代做C++/C:Computer Organization代写 CPU simulator代写 C language代写 - C++代做
发布时间:2021-07-25 22:52:25浏览次数:
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.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 addressingThe branch offset in MIPS, and hence in MiniCPU, is relative to the next instruction, i.e. (PC+4). For example,3.Resources3.1Files provided Please 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.asc Computer Organization代写These 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.3.2 MIPS 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.cFirstly, 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. Computer Organization代写

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。