From 3480d490a5c04ab141a2f8cc8fe4c93d200e9ee3 Mon Sep 17 00:00:00 2001 From: Ziang Date: Sat, 16 Nov 2019 18:22:07 -0500 Subject: [PATCH] Fixed a bug in output.cpp --- output.cpp | 2 +- reserv_station.h | 2 +- test.txt | 12 ------------ 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 test.txt diff --git a/output.cpp b/output.cpp index c935ec4..b0c5177 100644 --- a/output.cpp +++ b/output.cpp @@ -49,7 +49,7 @@ void* output_automat(void *args) cout<9999?"\t":"\t\t"); if (2*i + 1 < REG_NUM) { - reg->get("R"+to_string(2*i), m); + reg->get("R"+to_string(2*i+1), m); cout<9999?"\t":"\t\t"); } reg->get("F"+to_string(2*i), m); diff --git a/reserv_station.h b/reserv_station.h index 1d5ba73..fdf2dbb 100644 --- a/reserv_station.h +++ b/reserv_station.h @@ -22,7 +22,7 @@ class resStation bool Rj; //Indicates whether operand j is ready bool Rk; //Indicates whether operand k is ready bool sub; //If this is a subtraction instr, Vk will be additive inversed - public: + public: opCode code; //Operation code const valType type; //Operand type, integer or float point. (not very useful, may remove it in future) pthread_t handle; //The handle of thread running reserv_automat() diff --git a/test.txt b/test.txt deleted file mode 100644 index 19ca389..0000000 --- a/test.txt +++ /dev/null @@ -1,12 +0,0 @@ -# of rs Cycles in EX Cycles in Mem # of FUs -Integer adder 2 1 1 -FP adder 3 3 1 -FP multiplier 2 20 1 -Load/store unit 3 1 4 1 -ROB entries = 128 -CDB buffer entries = 1 -R1=10, R2=20, F2=30.1 -Mem[4]=1, Mem[8]=2, Mem[12]=3.4 -Add.d F1, F2, F3 -Ld F4, 8(R1) -Bne R2, R3, -3