This handout teaches students the need for clear, concise instructions when programming a task for a microprocessor or "robot." Working individually, students write a set of step-by-step instructions for making peanut butter and jelly sandwiches. Students then try to make sandwiches following each other's instructions. Or, a student or the teacher tries following one set of instructions in front of the entire class.
As you explain the Fetch/Decode/Execute/Memory Handling instruction cycle, give each person the appropriate nametag. Now, say that you are going to have them simulate processing an instruction. With proper prompting, have the Fetcher fetch an instruction, the blank card. Declare one computer cycle. Since the Fetcher is done, the Fetcher passes it on to the Decoder. The Decoder decodes the blank card... and the process continues.
Now, ask the students to talk about what happened. Lead them with asking how active everyone was? Specifically ask the Fetcher what he/she was doing the entire time. Then ask if there's any reason why the Fetcher couldn't fetch another instruction after fetching the other one. Do it, but after the Decoder is done with the first, ask what to do with the instruction that the Fetcher is holding. The students are likely to suggest the Decoder takes the new instruction in the next cycle. Eventually, you get the pipeline full like you want.
At this point, congratulate the students on discovering the concept of pipelining, one of the major design principles in computer architecture. Explain that what they did is used in most if not all modern processors.
No comments:
Post a Comment