summaryrefslogtreecommitdiff
path: root/src/accelwattch
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2025-02-18 10:29:07 -0500
committerGitHub <[email protected]>2025-02-18 15:29:07 +0000
commit287fe0aa17ec1ac5bdd595ca6e89aa97464bcac7 (patch)
treecf52817b95b99f61cf494af5536e32bf6d2889e3 /src/accelwattch
parent7934dfea8a6f44f592866414189970ef9ff994d6 (diff)
A bunch of maintenance fixes, the largest of which is getting the PTX simulation to work with CUDA 12. (#95)
* Fixing the formatter to always use a consistent format and running it on the codebase * Update linux-so-version.txt * Update Makefile * A couple of unnecessary files that are lingering around * Support CUDA 12 * Getting the PTX simulations to work with CUDA 12. The issue is that ptxas added more information (number of barriers and compile time). We have to parse these or lexx/yacc fail. * Update ptxinfo.l debug MACRO was ineffective * Update gpgpusim_check.cmake Update to make the CUDA version print a warning, not an error and updating the print to be more reflective of what the actual problem is.
Diffstat (limited to 'src/accelwattch')
-rw-r--r--src/accelwattch/XML_Parse.h6
-rw-r--r--src/accelwattch/core.cc45
-rw-r--r--src/accelwattch/iocontrollers.h4
-rw-r--r--src/accelwattch/logic.cc2
-rw-r--r--src/accelwattch/memoryctrl.h4
-rw-r--r--src/accelwattch/processor.cc18
-rw-r--r--src/accelwattch/xmlParser.cc10
-rw-r--r--src/accelwattch/xmlParser.h2
8 files changed, 45 insertions, 46 deletions
diff --git a/src/accelwattch/XML_Parse.h b/src/accelwattch/XML_Parse.h
index 176b82f..7017c90 100644
--- a/src/accelwattch/XML_Parse.h
+++ b/src/accelwattch/XML_Parse.h
@@ -40,9 +40,9 @@
#ifndef XML_PARSE_H_
#define XML_PARSE_H_
-//#ifdef WIN32
-//#define _CRT_SECURE_NO_DEPRECATE
-//#endif
+// #ifdef WIN32
+// #define _CRT_SECURE_NO_DEPRECATE
+// #endif
#include <stdio.h>
#include <string.h>
diff --git a/src/accelwattch/core.cc b/src/accelwattch/core.cc
index cbaefc7..fe11e05 100644
--- a/src/accelwattch/core.cc
+++ b/src/accelwattch/core.cc
@@ -47,38 +47,39 @@
#include "const.h"
#include "io.h"
#include "parameter.h"
-//#include "globalvar.h"
-// double exClockRate;
+// #include "globalvar.h"
+// double exClockRate;
//*********************
-// Operand collector (OC) modelling (Syed Gilani)
+// Operand collector (OC) modelling (Syed Gilani)
//*********************
-// The OCs are modelled similar to the GPGPU-Sim v3.x documentation and
-// nVIDIA patents.
-// the OC need the following GPGPU-Sim config options:
+// The OCs are modelled similar to the GPGPU-Sim v3.x documentation and
+// nVIDIA patents.
+// the OC need the following GPGPU-Sim config options:
//-gpgpu_num_reg_banks 8 # Number of register banks (default
//= 8) -gpgpu_reg_bank_use_warp_id 0 # Use warp ID in mapping
-// registers to banks (default = off) -gpgpu_operand_collector_num_units_sp 6 #
-// number of collector units (default = 4)
-// -gpgpu_operand_collector_num_units_sfu 8 # number of collector units (default
-// = 4) -gpgpu_operand_collector_num_units_mem 2 # number of
-// collector units (default = 2) -gpgpu_operand_collector_num_units_gen 0 #
-// number of collector units (default = 0)
+// registers to banks (default = off) -gpgpu_operand_collector_num_units_sp 6 #
+// number of collector units (default = 4)
+// -gpgpu_operand_collector_num_units_sfu 8 # number of collector units
+// (default = 4) -gpgpu_operand_collector_num_units_mem 2 #
+// number of collector units (default = 2)
+// -gpgpu_operand_collector_num_units_gen 0 # number of collector units
+// (default = 0)
//-gpgpu_operand_collector_num_in_ports_sp 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_in_ports_sfu 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_in_ports_mem 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_in_ports_gen 0 # number of
-// collector unit in ports (default = 0)
+// collector unit in ports (default = 0)
//-gpgpu_operand_collector_num_out_ports_sp 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_out_ports_sfu 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_out_ports_mem 1 # number of
-// collector unit in ports (default = 1)
+// collector unit in ports (default = 1)
//-gpgpu_operand_collector_num_out_ports_gen 0 # number of
-// collector unit in ports (default = 0)
+// collector unit in ports (default = 0)
// The total number of collector units and their input ports, and the number of
// register file banks determine the crossbar size.
@@ -1837,7 +1838,7 @@ MemManU::MemManU(ParseXML* XML_interface, int ithCore_,
area.set_area(area.get_area() + dtlb->local_result.area);
// output_data_csv(dtlb.tlb.local_result);
}
-//#define FERMI
+// #define FERMI
RegFU::RegFU(ParseXML* XML_interface, int ithCore_,
InputParameter* interface_ip_, const CoreDynParam& dyn_p_,
@@ -2194,7 +2195,7 @@ EXECU::EXECU(ParseXML* XML_interface, int ithCore_,
bypass.area.set_area(bypass.area.get_area()
+fpTagBypass->area.get_area());
}*/
- } /* if (coredynp.core_ty==Inorder) */
+ } /* if (coredynp.core_ty==Inorder) */
else { // OOO
if (coredynp.scheu_ty == PhysicalRegFile) {
/* For physical register based OOO,
diff --git a/src/accelwattch/iocontrollers.h b/src/accelwattch/iocontrollers.h
index 9d6c48a..22df1fb 100644
--- a/src/accelwattch/iocontrollers.h
+++ b/src/accelwattch/iocontrollers.h
@@ -35,9 +35,9 @@
#include "XML_Parse.h"
#include "cacti/parameter.h"
-//#include "io.h"
+// #include "io.h"
#include "array.h"
-//#include "Undifferentiated_Core_Area.h"
+// #include "Undifferentiated_Core_Area.h"
#include <vector>
#include "basic_components.h"
diff --git a/src/accelwattch/logic.cc b/src/accelwattch/logic.cc
index 7f40189..3d3a1a4 100644
--- a/src/accelwattch/logic.cc
+++ b/src/accelwattch/logic.cc
@@ -656,7 +656,7 @@ FunctionalUnit::FunctionalUnit(ParseXML *XML_interface, int ithCore_,
}
per_access_energy *= 0.5; // According to ARM data embedded processor has
// much lower per acc energy
- } /* if (XML->sys.Embedded) */
+ } /* if (XML->sys.Embedded) */
else {
if (fu_type == FPU) {
num_fu = coredynp.num_fpus;
diff --git a/src/accelwattch/memoryctrl.h b/src/accelwattch/memoryctrl.h
index 4ac55fc..f065c0a 100644
--- a/src/accelwattch/memoryctrl.h
+++ b/src/accelwattch/memoryctrl.h
@@ -41,9 +41,9 @@
#include "XML_Parse.h"
#include "cacti/parameter.h"
-//#include "io.h"
+// #include "io.h"
#include "array.h"
-//#include "Undifferentiated_Core_Area.h"
+// #include "Undifferentiated_Core_Area.h"
#include <vector>
#include "basic_components.h"
diff --git a/src/accelwattch/processor.cc b/src/accelwattch/processor.cc
index d5c7cdd..a86b96d 100644
--- a/src/accelwattch/processor.cc
+++ b/src/accelwattch/processor.cc
@@ -664,24 +664,22 @@ void Processor::displayDeviceType(int device_type_, uint32_t indent) {
switch (device_type_) {
case 0:
- cout << indent_str << "Device Type= "
- << "ITRS high performance device type" << endl;
+ cout << indent_str
+ << "Device Type= " << "ITRS high performance device type" << endl;
break;
case 1:
- cout << indent_str << "Device Type= "
- << "ITRS low standby power device type" << endl;
+ cout << indent_str
+ << "Device Type= " << "ITRS low standby power device type" << endl;
break;
case 2:
- cout << indent_str << "Device Type= "
- << "ITRS low operating power device type" << endl;
+ cout << indent_str
+ << "Device Type= " << "ITRS low operating power device type" << endl;
break;
case 3:
- cout << indent_str << "Device Type= "
- << "LP-DRAM device type" << endl;
+ cout << indent_str << "Device Type= " << "LP-DRAM device type" << endl;
break;
case 4:
- cout << indent_str << "Device Type= "
- << "COMM-DRAM device type" << endl;
+ cout << indent_str << "Device Type= " << "COMM-DRAM device type" << endl;
break;
default: {
cout << indent_str << "Unknown Device Type" << endl;
diff --git a/src/accelwattch/xmlParser.cc b/src/accelwattch/xmlParser.cc
index 780d2ad..9f01ebe 100644
--- a/src/accelwattch/xmlParser.cc
+++ b/src/accelwattch/xmlParser.cc
@@ -85,10 +85,10 @@
#endif
#include "xmlParser.h"
#ifdef _XMLWINDOWS
-//#ifdef _DEBUG
-//#define _CRTDBG_MAP_ALLOC
-//#include <crtdbg.h>
-//#endif
+// #ifdef _DEBUG
+// #define _CRTDBG_MAP_ALLOC
+// #include <crtdbg.h>
+// #endif
#define WIN32_LEAN_AND_MEAN
#include <Windows.h> // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files
// to have "MessageBoxA" to display error messages for openFilHelper
@@ -3241,7 +3241,7 @@ XMLSTR XMLParserBase64Tool::encode(unsigned char *inbuf, unsigned int inlen,
*(curr++) = base64EncodeTable[j >> 18];
*(curr++) = base64EncodeTable[(j >> 12) & 0x3f];
*(curr++) = base64EncodeTable[(j >> 6) & 0x3f];
- *(curr++) = base64EncodeTable[(j)&0x3f];
+ *(curr++) = base64EncodeTable[(j) & 0x3f];
if (formatted) {
if (!k) {
*(curr++) = _CXML('\n');
diff --git a/src/accelwattch/xmlParser.h b/src/accelwattch/xmlParser.h
index 71a1f57..b5c0779 100644
--- a/src/accelwattch/xmlParser.h
+++ b/src/accelwattch/xmlParser.h
@@ -163,7 +163,7 @@
// uncomment the next line if you want no support for wchar_t* (no need for the
// <wchar.h> or <tchar.h> libraries anymore to compile)
-//#define XML_NO_WIDE_CHAR
+// #define XML_NO_WIDE_CHAR
#ifdef XML_NO_WIDE_CHAR
#undef _XMLWINDOWS