Question: For Manos Computer design, we have the following flowchart for fetch and decode phases: Start SC AR P T1 IR MEAR] PC PC 1 T2

For Manos Computer design, we have the following flowchart for fetch and decode phases: Start SC AR P T1 IR MEAR] PC PC 1 T2 Decode opcode in IR (12-14 AR IR (0-11 I IR (15) Memory-reference E 0 Register or I /O) 1 D7 Register 0 Indirect) 1 E o (I/O) Direct T3 T3 T3 AR 4- M [AR] Nothing Execute Execute I/O Register instruction instruction Execute SC 0 SC 0 memory-reference instruction. SC 0 Figure: Flowchart for fetch & decode phases Please write the code to simulate the computer to do all works listed in the figure with the following instructions available:

Figure 2 Instructions need to be carried out in this project The Manos computer (16 bit system) contains Registers: AR, PC, DR, AC, IR, TR, E and Memory (4096*16). Suppose we only use the first 400 locations of the memory. You need to do the following things: Use random function to fill in the first 400 locations of the memory. Start with the first Hex number (0~E) After the first number is generated, If the first number is 7, the rest 3 Hex number should be randomly choose one of the 12 register reference instruction number If the first number is not 7, the rest 3 Hex number should be randomly generated number that bounded by the first 400 memory locations we are using in this project. Design you way to implement instructions listed in Figure 2. Fill in the Registers Value with your preference besides PC. Use random function to choose the starting PC value. (Bounded by the first 400 locations of memory) Execute consecutively 5 instructions starting with the PC value decided in (4). For each instruction, you need print out all registers in each clock cycle (just like what we did in the class and quiz). Repeat one more time of instruction (3 different value), (4) and (5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!