summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbd <bdunaisky@umass.edu>2025-04-21 20:00:58 +0000
committerGitHub <noreply@github.com>2025-04-21 20:00:58 +0000
commitd933a0405b7a7dff3cf05839ac99d120cafa4d75 (patch)
tree43238110a03ce678f1a68b0b4175ae023527b070 /src
parentcdc9d9c6195cf51e2d1ff10ff4f29797d3e51691 (diff)
parent7cad6f05ebed25557fe6a31bfdf6290c72506868 (diff)
Merge pull request #57 from bdunahu/bdunahu
Initialize all pipe objects at once, thread safety,
Diffstat (limited to 'src')
-rw-r--r--src/logger/logger.cc17
-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
-rw-r--r--src/utils/accessor.cc17
-rw-r--r--src/utils/response.cc17
13 files changed, 224 insertions, 3 deletions
diff --git a/src/logger/logger.cc b/src/logger/logger.cc
index b07e66f..a665dcd 100644
--- a/src/logger/logger.cc
+++ b/src/logger/logger.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 "logger.h"
#include <ctime>
#include <fstream>
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"
diff --git a/src/utils/accessor.cc b/src/utils/accessor.cc
index 99347ed..c49a2b2 100644
--- a/src/utils/accessor.cc
+++ b/src/utils/accessor.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 "accessor.h"
#include <iostream>
diff --git a/src/utils/response.cc b/src/utils/response.cc
index 3d6e439..d56419a 100644
--- a/src/utils/response.cc
+++ b/src/utils/response.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 "response.h"
#include <iostream>