Started the Mobo() Class
This commit is contained in:
parent
65ae11560b
commit
d31db70b79
@ -3,10 +3,11 @@
|
|||||||
/* this function's Incoming arguments are a pointer to the CPU class
|
/* this function's Incoming arguments are a pointer to the CPU class
|
||||||
"CPU *pCPU" and the new mainclock speed
|
"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;
|
cout << "Coming from the setCPUclock function in setcpu.h" << endl;
|
||||||
|
|
||||||
pCPU->mainclock = mmainclock;
|
pCPU->mainclock = mmainclock;
|
||||||
|
pCPU->boostclock = mboostclock;
|
||||||
cout << "Incoming main clock variable was: " << mmainclock << endl;
|
cout << "Incoming main clock variable was: " << mmainclock << endl;
|
||||||
cout << "Leaving setCPUclock()\n\n";
|
cout << "Leaving setCPUclock()\n\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,39 +10,67 @@ class Hardware {
|
|||||||
int ReleasedYear;
|
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 {
|
class CPU: public Hardware {
|
||||||
public:
|
public:
|
||||||
bool bits64;
|
bool bits64;
|
||||||
|
bool igpu;
|
||||||
|
int igpusize;
|
||||||
int cores;
|
int cores;
|
||||||
int threads;
|
int threads;
|
||||||
|
int l1cache;
|
||||||
|
int l2cache;
|
||||||
|
int l3cache;
|
||||||
int pcielanes;
|
int pcielanes;
|
||||||
int maxram;
|
int maxram;
|
||||||
float mainclock;
|
float mainclock;
|
||||||
float boostclock;
|
float boostclock;
|
||||||
std::string architecture;
|
std::string architecture;
|
||||||
std::string memoryrange;
|
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() {
|
CPU() {
|
||||||
manufacturer = "Intel";
|
manufacturer = "Forest Gnomes";
|
||||||
model = "default";
|
model = "HoneyPot";
|
||||||
ReleasedYear = 2000;
|
ReleasedYear = 2025;
|
||||||
bits64 = true;
|
bits64 = true;
|
||||||
|
igpu = false;
|
||||||
|
igpusize = 0;
|
||||||
cores = 4;
|
cores = 4;
|
||||||
threads = 2;
|
threads = 2;
|
||||||
|
l1cache = 32;
|
||||||
|
l2cache = 32;
|
||||||
|
l3cache = 32;
|
||||||
pcielanes = 24;
|
pcielanes = 24;
|
||||||
maxram = 128;
|
maxram = 128;
|
||||||
mainclock = 2;
|
mainclock = 2;
|
||||||
boostclock = 2.2;
|
boostclock = 2.2;
|
||||||
architecture = "x86_64";
|
architecture = "x86_64";
|
||||||
memoryrange = "00:00";
|
memoryrange = "00:00";
|
||||||
};
|
microcode = "acorns";
|
||||||
|
kerneldriver = "Forest Gnome Special";
|
||||||
void getmanufacturer(std::string manufacturer){
|
comment = "";
|
||||||
cout << manufacturer;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Spawn a CPU class for the Ryzen 7 7800x3d
|
|
||||||
// CPU *A7800x3d; // Spawn a CPU class for the Intel i7 5820k
|
|
||||||
// CPU *Ii75820k;
|
|
||||||
|
|
||||||
|
|||||||
9
main.cpp
9
main.cpp
@ -24,14 +24,15 @@ int main() {
|
|||||||
cout << "IIi75820k manufacturer is: " << Ii75820k->manufacturer << endl;
|
cout << "IIi75820k manufacturer is: " << Ii75820k->manufacturer << endl;
|
||||||
cout << "A7800x3d manufacturer is: " << A7800x3d->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;
|
cout << "A7800x3d main clock speed is: " << A7800x3d->mainclock << endl;
|
||||||
|
|
||||||
setCPUclock(A7800x3d, 4.8);
|
|
||||||
setCPUmanufacturer(A7800x3d, "AMD");
|
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 new main clock speed is: " << A7800x3d->mainclock << endl;
|
||||||
cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl;
|
cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl;
|
||||||
|
|
||||||
system("sleep 3s");
|
system("sleep 3s");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user