Docsity

Multicore Processor - Computer Design and Prototyping - Lab | ECE 43700, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
Lab 10,11,12 Multi-core processor
Spring 2009
Over these three labs you will build a Multi-core processor. Labs 10 and 11 are intermediate labs and will only
be tested to ensure progress. Lab 12 is when you must demonstrate the completed design. You should remove
MMIO from your design for these labs.
The following are to be completed throughout the course of labs 10 through 12.
1. A block diagram of your multi-core memory hierarchy.(Dcache x2 + coherence controller) A state diagram
and block diagram of your updated Dcache. A state diagram and block diagram of your coherence controller.
All diagrams must be in explicit detail and in electronic format for any points. No hand drawn photo-
copied/scanned diagrams will be accepted.
NOTE
Any evaluation turned in without block diagram(s) of the design will receive a grade of
0.
2. Parallelize the merge sort algorithm in MIPS assembly and verify it functions correctly.
3. Connect two pipelines and two L1 cache (I+D) hierarchies to your coherence controller. Verify functionality
in source.
4. Synthesize your multi-core processor. Verify the synthesized version of your multi-core is functional.
5. Verify your design works in hardware.
1 Background
The multi-core processor will start a new project. You will want to create a project4 directory in the ece437
directory. You will need to setup this directory correctly. Re-read the lab1 handout if you need a reminder on how
to run dirset.
In these labs you will design a multi-core processor, using components you designed in previous labs. You will
make a dual-core processor by taking your pipeline design and cache hierarchy, replicating them, and connecting
them to a coherence controller.
Your threading model will be very simple. Each processor will start at a predetermined address and start
executing the thread located at that address. The lecture notes will serve as a excellent reference for using locking
primitives and programming models. Be sure to use these when writing your sort algorithm.
pf3
pf4

Partial preview of the text

Download Multicore Processor - Computer Design and Prototyping - Lab | ECE 43700 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

Lab 10,11,12 Multi-core processor

Spring 2009

Over these three labs you will build a Multi-core processor. Labs 10 and 11 are intermediate labs and will only be tested to ensure progress. Lab 12 is when you must demonstrate the completed design. You should remove MMIO from your design for these labs. The following are to be completed throughout the course of labs 10 through 12.

  1. A block diagram of your multi-core memory hierarchy.(Dcache x2 + coherence controller) A state diagram and block diagram of your updated Dcache. A state diagram and block diagram of your coherence controller. All diagrams must be in explicit detail and in electronic format for any points. No hand drawn photo- copied/scanned diagrams will be accepted.

NOTE

Any evaluation turned in without block diagram(s) of the design will receive a grade of

  1. Parallelize the merge sort algorithm in MIPS assembly and verify it functions correctly.

  2. Connect two pipelines and two L1 cache (I+D) hierarchies to your coherence controller. Verify functionality in source.

  3. Synthesize your multi-core processor. Verify the synthesized version of your multi-core is functional.

  4. Verify your design works in hardware.

1 Background

The multi-core processor will start a new project. You will want to create a project4 directory in the ece directory. You will need to setup this directory correctly. Re-read the lab1 handout if you need a reminder on how to run dirset. In these labs you will design a multi-core processor, using components you designed in previous labs. You will make a dual-core processor by taking your pipeline design and cache hierarchy, replicating them, and connecting them to a coherence controller. Your threading model will be very simple. Each processor will start at a predetermined address and start executing the thread located at that address. The lecture notes will serve as a excellent reference for using locking primitives and programming models. Be sure to use these when writing your sort algorithm.

NOTE

Remember the top of the address space is 0x7ffc, and both processors must maintain their own separate stack.

2 Software

You are to write a parallel version of merge sort as discussed in lecture. They values may be divided up among the processors, and sorted. The merge must use locks or flags to correctly merge the data. The data will be provided so everyone has the same amount of information to sort. To simulate a dual-core design use the simulator program that you have used in lab3 to simulate your assembly files. The command to run the simulator in dual-core mode is as follows.

sim -m

3 Multi-core Design

In Figure 1 is a diagram of the basic dual-core design. The key part is the memory hierarchy. This hierarchy must be able to share data between the two processor’s Dcaches, as well as main memory. The component that controls the flow of information between the Dcaches and main memory is the coherence controller. This component will check the memory accesses made by each processor’s Dcache and determine where the data is and what action needs to occur to get the requested piece of data.

3.1 Coherence Controller

Your coherence controller will implement the MSI coherence protocol discussed in lecture. Your Dcache already keeps track of state with the valid and dirty bits. If a block is valid and dirty it is in modified state. If a block is valid and not dirty, it is in shared state. Finally, if a block is not valid, it is in the invalid state. Again, we are assuming you do not overwrite program code, or else you will need to add the Icache to the mix. Every time the processor reads or writes to the Dcache it must send the action, address, and data to the coher- ence controller. This controller will arbitrate which transaction to complete. It will then check the other processor’s Dcache to determine what action needs to occur. Refer to the MSI state diagram in the lecture notes for transac- tions. The coherence controller will take a memory access request, check if the data is in the other processor’s cache. If it is, it will signal the Dcache to take the appropriate action. If it is not in the other processor’s cache it will retrieve the value from main memory and have the requesting Dcache take the appropriate action. You will find it useful to arbitrate based on a priority. This priority can be processor ID, or in our case you pick one processor (call this P0) and if any simultaneous access requests are received by the coherence controller it will pick the processor with the highest priority (lowest pid) to win (in our case P0), then the transaction of the next requesting processor will process.

3.2 Snooping

Snooping is what the coherence controller will do to determine what is in a Dcache. The coherence controller is looking for tag data and state when it snoops. In some cases it will need the actual data in the data ram. This snooping will tie up the Dcache data ram(it is assumed your tags are stored in the data ram), which means the processor does not get to use the Dcache while the coherence controller is snooping around. You will need to modify the Dcache to allow the coherence controller access to the data ram. When the co- herence controller is accessing the cache data ram the processor can not use the cache, thus it must generate a memwait on any professor read/write (lw/sw) accesses until it is done snooping.

3.3 Memory Arbitrator

This is the priority mux that decided which stage gets to access main memory that was used in the pipeline. It is modified slightly so that the coherence controller gets top priority. Then the first processor (P0) Icache followed by the second processor (P1) Icache. This order may be subject to change.

3.4 Program Counters

The two processors must start at different addresses. The first processor will start at address 0x0000 and the second processor will start at address 0x0200. These addresses are subject to change. The best way to do this is have a mux with both starting addresses and have a constant bit to set the PC to either 0x0000 or 0x0200 when you assert nreset.

4 Turning In

Again, to make sure your Makefile works, type the following from your project4 directory:

˜/ece437/project4> make clean ˜/ece437/project4> make lab

Lastly, from your project4 directory, type:

˜/ece437/project4> submit -p lab