Skip to content

Commit

Permalink
Pipeline Final
Browse files Browse the repository at this point in the history
Fix ASr, 1's Complement Not, fix cout ldResult
  • Loading branch information
namgoyal committed Nov 6, 2016
1 parent 9f76544 commit f9086a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,3 @@ The output contains instruction by instruction work done in each cycle in all st
Developed by
NAMAN GOYAL, 2015CSB1021
EESHAAN SHARMA, 2015CSB1011



7 changes: 4 additions & 3 deletions src/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,11 @@ void Core::execute() {
unsigned int count = temp_B;
while(count){
if (temp_aluResult>>31 == 1){
temp_aluResult>>1;
temp_aluResult = temp_aluResult>>1;
temp_aluResult = temp_aluResult | 0x80000000;
}
else{
temp_aluResult>>1;
temp_aluResult = temp_aluResult>>1;
}

count--;
Expand All @@ -773,6 +773,7 @@ void Core::execute() {
temp_aluResult = temp_A | temp_B;
}

// NOT implemented using 1's Complement
if (temp_isNot){
cout<<"NOT operation"<<endl;
temp_aluResult = ~temp_B;
Expand Down Expand Up @@ -957,7 +958,7 @@ void Core::write_back() {

if (temp_isLd){
temp_result = temp_ldResult;
cout<<"Writing data "<<dec<<temp_result<<" (temp_ldResult)";
cout<<"Writing data "<<dec<<temp_result<<" (ldResult)";
}
else if (temp_isCall){
temp_result = temp_PC + 4;
Expand Down

0 comments on commit f9086a2

Please sign in to comment.