CSCI 6234 Section 11 Project 2 Spring 2021 Lancaster 1 This is project 2 for the spring semester. Be sure to save the projects that you submitted for project 1. You will need them for a subsequent problem assignment in a few weeks. This assignment is to complete the design of the simulator, and to implement and test it for a small set of instructions (this minimizing the complexity of the control unit). Perform the following steps for the simulation project. 1. Complete the design of the class diagrams and provide sequence or communications diagrams where appropriate. Think about a sequence diagram for each of the 5 stages. Provide the class diagrams in a brief design document with descriptions. 40% 2. Test each object component that you developed as you did the memory singleton. Show the design and test results for each. You can simply print register file, pc, alu and other data contents in test list format. 40% 3. Implement the control to execute the instructions in Figure 1 using the program in Figure 2 which is read in from a file. You can move the values of array to after the program. 20% Figure 1 edumips frame showing code and hexadecimal values The code that generated this edumips panel is provided below in Figure 2. You do not have to worry about an assembler, you can just use the hex codes and choose a location for the array just beyond the code. The objective is that you be able to hard code this program and generate the results in the registers that you see in Figure 3. As the program runs it should print out only the PC and register contents as it runs. In the form: PC = 00000000 R0 = 00000000 in rows. Note here we use only R0 through R6, so you only need print out those values. CSCI 6234 Section 11 Project 2 Spring 2021 Lancaster 2 DADDI R4,R0,array ;R4 STARTS AT Array R0 is always 0 LD R3,count(R0) ;R3 has count DADD R5,R0,R0 ;R5 (SUM) LOOP: LD R6,0(R4) ;GET THE WORD DADDI R3,R3,-1 DADDI R4,R4,8 ;increment by 8 DADD R5,R5,R6 ;ADD IT BNE R3,R0,LOOP ;JUMP BACK IF NOT EQUAL array: .word 8 ;beginning of array .word 15 ; .word is 64 bits .word 32 .word 27 .word 13 .word 10 .word 7 count: .word 7 Figure 2. The simulator input. Figure 3 Register Contents This project is due by the last day of class.
欢迎咨询51作业君