diff options
author | bd <bdunahu@operationnull.com> | 2025-04-17 20:52:55 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-17 20:52:55 -0400 |
commit | 496a08fbfafb8399c9addaf2501262fee228ffd6 (patch) | |
tree | 3e87aed03b50673c8e8c53dba98a45f32f979f48 /gui/worker.cc | |
parent | 025cdd8e174fcf1a229355ecaf63861ac388fa63 (diff) | |
parent | 984ce6eef2e439955ff991f90c2b654be7c6c3f3 (diff) |
Merge remote-tracking branch 'origin/bdunahu' into dev-sid
Diffstat (limited to 'gui/worker.cc')
-rw-r--r-- | gui/worker.cc | 84 |
1 files changed, 54 insertions, 30 deletions
diff --git a/gui/worker.cc b/gui/worker.cc index 2b00620..df6ebd2 100644 --- a/gui/worker.cc +++ b/gui/worker.cc @@ -12,42 +12,66 @@ void Worker::doWork() this->ex_stage = new EX(id_stage); this->mm_stage = new MM(ex_stage); this->wb_stage = new WB(mm_stage); - this->ct = new Controller(wb_stage, this->c, true); + this->ct = new Controller(wb_stage, this->c, false); emit clock_cycles(this->ct->get_clock_cycle(), this->ct->get_pc()); emit dram_storage(this->d->view(0, 32)); emit cache_storage(this->c->view(0, 256)); emit register_storage(this->ct->get_gprs()); - signed int b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, - b15, b16, b17, b18, b19, b20; std::vector<signed int> p; - // I-TYPE / / / / - b0 = 0b00000010000000000001000000001101; - b1 = 0b00000000000000010010100000001101; - b2 = 0b00000000000000000010100010101001; - b3 = 0b00000000000000100010100000001101; - b4 = 0b00000000000000010010100010101001; - b5 = 0b00000000000000110010100000001101; - b6 = 0b00000000000000100010100010101001; - b7 = 0b00000000000001000010100000001101; - b8 = 0b00000000000000110010100010101001; - b9 = 0b00000000000000000010100000001101; - b10 = 0b00000000000000110011000000001101; - b11 = 0b00000000000000000011100000001010; - b12 = 0b00000000000100100101000100000100; - b13 = 0b00000000000000000100100111000101; - b14 = 0b00000000000000010100101000000101; - b15 = 0b00000000000011101000001110000100; - b16 = 0b00000000000000000011101001101001; - b17 = 0b00000000000000010010100101001101; - b18 = 0b00000000000000000101001101000000; - b19 = 0b11111111111111111100100000010110; - // b20 = 0b00000000000000000000000000010000; + p.push_back(0b00000000000000010010100000001101); + p.push_back(0b00000000000000000000000101100010); + p.push_back(0b00000000000000010010100101001101); + p.push_back(0b00000000000000000000000101100010); + p.push_back(0b00000000000000010010100101001101); + p.push_back(0b00000000000000000000000101100010); + p.push_back(0b00000000000000010010100101001101); + p.push_back(0b00000000000000000000000101100010); + p.push_back(0b00000000000000000000000101100110); + p.push_back(0b00000000000000000000000110100110); + p.push_back(0b00000000000000000000000111100110); + p.push_back(0b00000000000000000000001000100110); + p.push_back(0b00000000000000000000000000101110); + p.push_back(0b00000000000000000000000000101110); + p.push_back(0b00000000000000000000000000010000); - p = {b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, - b11, b12, b13, b14, b15, b16, b17, b18, b19}; + // p.push_back(0b00000000000000000010100010001101); + // p.push_back(0b11111111111101010011000000001101); + // p.push_back(0b00000000000000000000000110100010); + // p.push_back(0b00000000000000000011000000001110); + // p.push_back(0b00000000000000000000000110100110); + // p.push_back(0b00000000001000100011000000101001); + // p.push_back(0b00000000000000000000000101100010); + // p.push_back(0b00000000000000000010100010001101); + // p.push_back(0b00000000000000010001000010010001); + // p.push_back(0b11111111111010010011000000001101); + // p.push_back(0b11111111111111000011000101101001); + // p.push_back(0b00000000000001000010100111000101); + // p.push_back(0b11111111111111000010100110000101); + // p.push_back(0b00000000000011000111001100000100); + // p.push_back(0b00000000000000000000000110100010); + // p.push_back(0b00000000000000001010100000001110); + // p.push_back(0b00000000000000000000000110100110); + // p.push_back(0b00000000000001000011000101101001); + // p.push_back(0b00000000000000000001000101001101); + // p.push_back(0b00000000000000000000000101100110); + // p.push_back(0b00000000000000000000000000101010); + // p.push_back(0b00000000000000000000000101100010); + // p.push_back(0b00000000000000000010100010001101); + // p.push_back(0b00000000000000010001000010010001); + // p.push_back(0b00000000010011000011000000001101); + // p.push_back(0b11111111111111000011000101101001); + // p.push_back(0b00000000000001000010100111000101); + // p.push_back(0b11111111111111000010100110000101); + // p.push_back(0b00000000000011000111001100000100); + // p.push_back(0b00000000000001000011000101101001); + // p.push_back(0b00000000000000000001000101001101); + // p.push_back(0b00000000000000000000000101100110); + // p.push_back(0b00000000000000000000000000101010); + // p.push_back(0b00000000000000000000000000010000); + // p.push_back(0b00000000000000000000000000000000); this->d->load(p); } @@ -60,8 +84,8 @@ Worker::~Worker() delete this->c; } -void Worker::loadProgram(std::vector<signed int> p) { - this->d->load(p); +void Worker::loadProgram(std::vector<signed int> p) { + this->d->load(p); } void Worker::refreshDram() @@ -100,7 +124,7 @@ void Worker::runSteps(int steps) void Worker::runStep() { qDebug() << "Running for 1 step "; - this->ct->advance(WAIT); + this->ct->run_for(1); emit dram_storage(this->d->view(0, 256)); emit cache_storage(this->c->view(0, 256)); emit register_storage(this->ct->get_gprs()); |