public void tick(uint cid) { /* non-omniscient */ if (!is_omniscient) { sched.tick(); if (!Config.sched.same_sched_algo) { wbsched.tick(); } return; } /* omniscient */ if (cid == 0) { sched.tick(); if (!Config.sched.same_sched_algo) { wbsched.tick(); } } }
public virtual void tick(uint cid) { /* non-omniscient */ if (!is_omniscient) { sched.tick(); if (!Config.sched.same_sched_algo) { wbsched.tick(); } return; } /* omniscient */ if (cid == 0) { sched.tick(); if (!Config.sched.same_sched_algo) { wbsched.tick(); } /* foreach (Bank b in banks) { * foreach (Req r in b.mc.inflightqs[b.rid, b.bid]) { * Sim.region_contention[r.addr.cid,r.addr.rid,r.addr.bid]++; * } * } * * if (get_cycles() % Config.sched.acts_quantum_cycles == 0) { * int hotness = 0; * for (int chan = 0; chan < Config.mem.channel_max; chan++) { * //Console.Write("Channel " + chan + ": "); * for (int rank = 0; rank < Config.mem.rank_max; rank++) { * //Console.Write("Rank " + rank + ": "); * for (int bank = 0; bank < 8; bank++) { * //Console.Write(Sim.region_contention[chan,rank,bank] + " "); * if (Sim.region_contention[chan,rank,bank] > hotness || hotness == -1) { * Sim.hot_region_chan = chan; * Sim.hot_region_rank = rank; * Sim.hot_region_bank = bank; * hotness = Sim.region_contention[chan,rank,bank]; * } * Sim.region_contention[chan,rank,bank] = 0; * } * } * } * //Console.WriteLine(); * //Console.Write("Threads: "); * int criticality = 0; * Sim.critical_thread = -1; * for (int n = 0; n < Config.N; n++) { * //Console.Write(Sim.thread_criticality[n] + " "); * if (Sim.thread_criticality[n] > criticality) { * Sim.critical_thread = n; * criticality = Sim.thread_criticality[n]; * } * Sim.thread_criticality[n] = 0; * } * //Console.WriteLine(); * //Console.WriteLine("Critical threads: " + Sim.critical_thread); * } */} }