Started the Mobo() Class

This commit is contained in:
ganome 2025-01-28 20:59:13 -07:00
parent 65ae11560b
commit d31db70b79
Signed by untrusted user who does not match committer: Ganome
GPG Key ID: 944DE53336D81B83
3 changed files with 47 additions and 17 deletions

View File

@ -3,10 +3,11 @@
/* this function's Incoming arguments are a pointer to the CPU class
"CPU *pCPU" and the new mainclock speed
*/
void setCPUclock(CPU *pCPU, float mmainclock) {
void setCPUclock(CPU *pCPU, float mmainclock, float mboostclock) {
cout << "Coming from the setCPUclock function in setcpu.h" << endl;
pCPU->mainclock = mmainclock;
pCPU->boostclock = mboostclock;
cout << "Incoming main clock variable was: " << mmainclock << endl;
cout << "Leaving setCPUclock()\n\n";
}

View File

@ -10,39 +10,67 @@ class Hardware {
int ReleasedYear;
};
class Mobo: public Hardware {
public:
int pciegen;
int piceslots;
int dimmslots;
int dualchannel; // This is an int so 1 = dualchannel and 2 = quad channel
int ramspeed;
std::string comment;
Mobo() {
manufacturer = "Forest Gnomes";
model = "HoneyJar";
ReleasedYear = 2025;
pciegen = 4;
piceslots = 3;
dimmslots = 2;
dualchannel = 1;
ramspeed = 6000;
comment = "If on AM5 platform - update BIOS before booting!";
};
};
class CPU: public Hardware {
public:
bool bits64;
bool igpu;
int igpusize;
int cores;
int threads;
int l1cache;
int l2cache;
int l3cache;
int pcielanes;
int maxram;
float mainclock;
float boostclock;
std::string architecture;
std::string memoryrange;
std::string microcode;
std::string kerneldriver;
std::string comment; // This shoule be used to warn the user about updating BIOS on AM5 before booting
CPU() {
manufacturer = "Intel";
model = "default";
ReleasedYear = 2000;
manufacturer = "Forest Gnomes";
model = "HoneyPot";
ReleasedYear = 2025;
bits64 = true;
igpu = false;
igpusize = 0;
cores = 4;
threads = 2;
l1cache = 32;
l2cache = 32;
l3cache = 32;
pcielanes = 24;
maxram = 128;
mainclock = 2;
boostclock = 2.2;
architecture = "x86_64";
memoryrange = "00:00";
};
void getmanufacturer(std::string manufacturer){
cout << manufacturer;
microcode = "acorns";
kerneldriver = "Forest Gnome Special";
comment = "";
};
};
// Spawn a CPU class for the Ryzen 7 7800x3d
// CPU *A7800x3d; // Spawn a CPU class for the Intel i7 5820k
// CPU *Ii75820k;

View File

@ -24,14 +24,15 @@ int main() {
cout << "IIi75820k manufacturer is: " << Ii75820k->manufacturer << endl;
cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl;
cout << "Lets tyy the setCPU function!\n";
cout << "Lets try the setCPU function!\n";
cout << "A7800x3d main clock speed is: " << A7800x3d->mainclock << endl;
setCPUclock(A7800x3d, 4.8);
setCPUmanufacturer(A7800x3d, "AMD");
setCPUcores(A7800x3d, 8);
setCPUthreads(A7800x3d, 16);
setCPUclock(A7800x3d, 4.8, 5.1); // clock is base, boost
cout << "A7800x3d new main clock speed is: " << A7800x3d->mainclock << endl;
cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl;
system("sleep 3s");
return 0;
}