CS F342 Computer Architecture BITS Pilani, Hyderabad Campus Assignment - 1 Due Date: On or Before 7 Nov 2013 (By 5:00 P.M)
CS F342 Computer Architecture BITS Pilani, Hyderabad Campus Assignment - 1 Due Date: On or Before 7 Nov 2013 (By 5:00 P.M)
5:00 p.m)
Problem Statement: Suppose G is a simple directed graph with m nodes, and suppose the nodes of G have been ordered and are called v1, v2, v3, ,vm. Then the adjacency matrix A=(aij) of the graph G is the m x m matrix defined as follows aij = 1 if there is an edge (vi,vj) else 0. Implement the following three functions in MIPS. 1. Function to build the adjacency matrix of a graph. In this function the user will be asked for all the edge information. The parameters of the function are the address of the adjacency matrix and the number of nodes n. 2. Function to compute the indegree of a node where indegree is defined as the number of edges coming in. The parameters passed to this function are the address of the adjacency matrix, id of the node whose indegree is to be calculated and the number of nodes n. 3. Function to compute the outdegree of a node where outdegree is defined as the number of edges going out. The parameters passed to this function are the address of the adjacency matrix, id of the node whose outdegree is to be calculated and the number of nodes n. Implement the main function to test the above three functions. Marks will be deducted if the saved registers are not saved and restored back by the called procedure.
Note: The code must be well commented and well indented. You have to submit a writeup explaining the algorithms used for problem. What to submit? 1) .asm file for the problem 2) The write up noted above How to submit? 1) Create a zip file with the name YOURROLL_CA_A1.zip containing the above files 2) Book a time slot with your concern lab section incharge and attend for demo & submission without fail during your slot on or before due date. 3) Submit at : B206 (Section1 students), C316 (Section2 students)