Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Logisim Datapath 1. Using the supplied ASM code for the datapath, load the code of prog1.txt into the instruction memory unit, set the tick frequency

Logisim Datapath

image text in transcribed

image text in transcribed

1. Using the supplied ASM code for the datapath, load the code of prog1.txt into the instruction memory unit, set the tick frequency at 8 Hz and enable the tick simulation. While the program is executing, observe the contents of the data memory. Run the program to its final instruction which is the instruction branching to itself (endless loop). Disable the tick simulation to stop the clock. Record the contents of the data memory in the table below Address 0x0 0x1 0x3 0x8 DATA v2.0 raw 2011000a 20100001 20120000 3c011001 34320000 22100001 20080001 21080001 01086820 020d682a 11a00001 10000008 02004820 12b0001 1160fff 6 1120fff5 01284822 0120582a 1160fffc 1000fff3 ae500000 22520004 2231 ffff 12200001 1000ffec 1000ffff 2. Do not clear the memory. Load the contents of prog2.txt into the instruction memory unit and reset the PC to zero. Start the clock and observe the data memory and its activity. Record the final contents of the data memory when the program reaches its end point. Address 0x0 DATA 0x2 v2.0 raw 20120000 2013000a 20100000 0213402a 11000014 2211ffff 0220402a 11000001 1000000e 02314820 01294820 02495020 d4b0000 8d4c0004 016c402a 11000007 000b4020 000c5820 00086020 ad4b0000 ad4c0004 2231ffff 1000ffef 22100001 1000ffea 1000ffff 3. Write an ASM program (or add the necessary machine code to what you have already) to list in descending order the first 5 prime numbers past 75 and then find their sum and put the result in the data memory location right after the last listed prime number stored in memory. Show the final data memory of the output and the necessary added lines to the code given above in the table below Address 0x0 00x20x30x40x50x6 0x7 0x80x9xA DATA Added code: 1. Using the supplied ASM code for the datapath, load the code of prog1.txt into the instruction memory unit, set the tick frequency at 8 Hz and enable the tick simulation. While the program is executing, observe the contents of the data memory. Run the program to its final instruction which is the instruction branching to itself (endless loop). Disable the tick simulation to stop the clock. Record the contents of the data memory in the table below Address 0x0 0x1 0x3 0x8 DATA v2.0 raw 2011000a 20100001 20120000 3c011001 34320000 22100001 20080001 21080001 01086820 020d682a 11a00001 10000008 02004820 12b0001 1160fff 6 1120fff5 01284822 0120582a 1160fffc 1000fff3 ae500000 22520004 2231 ffff 12200001 1000ffec 1000ffff 2. Do not clear the memory. Load the contents of prog2.txt into the instruction memory unit and reset the PC to zero. Start the clock and observe the data memory and its activity. Record the final contents of the data memory when the program reaches its end point. Address 0x0 DATA 0x2 v2.0 raw 20120000 2013000a 20100000 0213402a 11000014 2211ffff 0220402a 11000001 1000000e 02314820 01294820 02495020 d4b0000 8d4c0004 016c402a 11000007 000b4020 000c5820 00086020 ad4b0000 ad4c0004 2231ffff 1000ffef 22100001 1000ffea 1000ffff 3. Write an ASM program (or add the necessary machine code to what you have already) to list in descending order the first 5 prime numbers past 75 and then find their sum and put the result in the data memory location right after the last listed prime number stored in memory. Show the final data memory of the output and the necessary added lines to the code given above in the table below Address 0x0 00x20x30x40x50x6 0x7 0x80x9xA DATA Added code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions