If there are common products in the OR plane, they are counted only once.
1) Look at /afs/cs.pitt.edu/usr0/melhem/public/html/447/manipulate.cc You will find some help in dealing with binary representations for Project 4.
2) Your implementation may be simpler if you pass instances of classes to the members that will do the actual work. That is if "MemRead()" will need to access the members of pc_unit and alu_unit, then just pass these as parameters to "MemRead()". See the code in /afs/cs.pitt.edu/usr0/melhem/public/html/447/classes.cc for an example.
3) In the class for Registers_unit{} given in the Project4 handout, please add a member void RegRead(). It is missing. (I made the correction in the version posted on the web).
4) I included a file prog.dat in the directory /afs/cs.pitt.edu/usr0/melhem/public/html/447/. Note that I removed the blanks from the input lines. This should simplify the conversion of each line into a 32 bit number. All what you need to do now to convert a line into an unsigned integer x is
5) Michael Cocharan (a student in the class) has provided a second assembly language program that may be used to test your simulator. For details see cprog.dat. Of course, you may want to write your own program.
1) Look at /afs/cs.pitt.edu/usr0/melhem/public/html/447/examples/prog3. You will find a program that will help you a lot in your assignment 2. I also modified the assignment sheet to point to this program. Get a new version of project2 from the web, or from /afs/cs.pitt.edu/usr0/melhem/public/html/447/assign2
Important Notes:
1. please copy your fourth project file into
cp /afs/cs.pitt.edu/usr0/meepani/public/447/submission_4
for example: if Mary_Doe is submitting and her source program name
is proj4 then she will type this command:
cp proj4
/afs/cs.pitt.edu/usr0/meepani/public/447/submission_4/mary_doe.cpp
2. People who are using PC C++ compilers make sure you compile and run your program in the unix c++ compiler before submitting.
-lg++ helps in linking your program. -l=include library)
Warning: Once you have copied the file to the submission directory,
you cannot read, write or delete the file. So, be sure to submit the
final version of the files to the directory. The time stamp of the
submitted files will be compared for the time it is due.