summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/controller.cc17
-rw-r--r--src/sim/dum.cc17
-rw-r--r--src/sim/ex.cc17
-rw-r--r--src/sim/id.cc19
-rw-r--r--src/sim/if.cc19
-rw-r--r--src/sim/instr.cc17
-rw-r--r--src/sim/instrDTO.cc17
-rw-r--r--src/sim/mm.cc17
-rw-r--r--src/sim/stage.cc19
-rw-r--r--src/sim/wb.cc17
10 files changed, 173 insertions, 3 deletions
diff --git a/src/sim/controller.cc b/src/sim/controller.cc
index db6106c..59fbbb7 100644
--- a/src/sim/controller.cc
+++ b/src/sim/controller.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "controller.h"
#include "ex.h"
#include "response.h"
diff --git a/src/sim/dum.cc b/src/sim/dum.cc
index ab4eaa4..744c110 100644
--- a/src/sim/dum.cc
+++ b/src/sim/dum.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "dum.h"
#include "accessor.h"
#include "instrDTO.h"
diff --git a/src/sim/ex.cc b/src/sim/ex.cc
index 62e39c1..f098917 100644
--- a/src/sim/ex.cc
+++ b/src/sim/ex.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "ex.h"
#include "accessor.h"
#include "instrDTO.h"
diff --git a/src/sim/id.cc b/src/sim/id.cc
index d10d695..3753f83 100644
--- a/src/sim/id.cc
+++ b/src/sim/id.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "id.h"
#include "accessor.h"
#include "instr.h"
@@ -204,7 +221,7 @@ std::vector<int> ID::stage_info()
{
std::vector<int> info;
if (this->curr_instr) {
- info.push_back(this->curr_instr->get_pc());
+ info.push_back(this->curr_instr->is_squashed());
info.push_back(this->curr_instr->get_instr_bits());
}
return info;
diff --git a/src/sim/if.cc b/src/sim/if.cc
index 6494912..e8e7272 100644
--- a/src/sim/if.cc
+++ b/src/sim/if.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "if.h"
#include "accessor.h"
#include "instrDTO.h"
@@ -26,7 +43,7 @@ InstrDTO *IF::advance(Response p)
std::vector<int> IF::stage_info() {
std::vector<int> info;
if(this->curr_instr){
- info.push_back(this->curr_instr->get_pc());
+ info.push_back(this->curr_instr->is_squashed());
info.push_back(this->curr_instr->get_instr_bits());
}
return info;
diff --git a/src/sim/instr.cc b/src/sim/instr.cc
index 8bbd0b5..c8d1039 100644
--- a/src/sim/instr.cc
+++ b/src/sim/instr.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "instr.h"
#include <functional>
#include <map>
diff --git a/src/sim/instrDTO.cc b/src/sim/instrDTO.cc
index fb6c82b..00b6d5f 100644
--- a/src/sim/instrDTO.cc
+++ b/src/sim/instrDTO.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "instrDTO.h"
#include "accessor.h"
diff --git a/src/sim/mm.cc b/src/sim/mm.cc
index a02ca83..e1057d5 100644
--- a/src/sim/mm.cc
+++ b/src/sim/mm.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "mm.h"
#include "accessor.h"
#include "instrDTO.h"
diff --git a/src/sim/stage.cc b/src/sim/stage.cc
index d65ca87..35c6936 100644
--- a/src/sim/stage.cc
+++ b/src/sim/stage.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "stage.h"
#include <array>
#include <deque>
@@ -59,7 +76,7 @@ std::vector<int> Stage::stage_info()
std::vector<int> info;
if (this->curr_instr) {
info.push_back(this->curr_instr->get_mnemonic());
- info.push_back(this->curr_instr->get_pc());
+ info.push_back(this->curr_instr->is_squashed());
info.push_back(this->curr_instr->get_s1());
info.push_back(this->curr_instr->get_s2());
info.push_back(this->curr_instr->get_s3());
diff --git a/src/sim/wb.cc b/src/sim/wb.cc
index c62468c..fbbdd4c 100644
--- a/src/sim/wb.cc
+++ b/src/sim/wb.cc
@@ -1,3 +1,20 @@
+// Simulator for the RISC-V[ECTOR] mini-ISA
+// Copyright (C) 2025 Siddarth Suresh
+// Copyright (C) 2025 bdunahu
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
#include "wb.h"
#include "accessor.h"
#include "instrDTO.h"