lsq.hh (2669:f2b336e89d2a) | lsq.hh (2674:6d4afef73a20) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 35 unchanged lines hidden (view full) --- 44class LSQ { 45 public: 46 typedef typename Impl::Params Params; 47 typedef typename Impl::FullCPU FullCPU; 48 typedef typename Impl::DynInstPtr DynInstPtr; 49 typedef typename Impl::CPUPol::IEW IEW; 50 typedef typename Impl::CPUPol::LSQUnit LSQUnit; 51 | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 35 unchanged lines hidden (view full) --- 44class LSQ { 45 public: 46 typedef typename Impl::Params Params; 47 typedef typename Impl::FullCPU FullCPU; 48 typedef typename Impl::DynInstPtr DynInstPtr; 49 typedef typename Impl::CPUPol::IEW IEW; 50 typedef typename Impl::CPUPol::LSQUnit LSQUnit; 51 |
52 /** SMT policy. */ |
|
52 enum LSQPolicy { 53 Dynamic, 54 Partitioned, 55 Threshold 56 }; 57 58 /** Constructs an LSQ with the given parameters. */ 59 LSQ(Params *params); --- 4 unchanged lines hidden (view full) --- 64 /** Sets the pointer to the list of active threads. */ 65 void setActiveThreads(std::list<unsigned> *at_ptr); 66 /** Sets the CPU pointer. */ 67 void setCPU(FullCPU *cpu_ptr); 68 /** Sets the IEW stage pointer. */ 69 void setIEW(IEW *iew_ptr); 70 /** Sets the page table pointer. */ 71// void setPageTable(PageTable *pt_ptr); | 53 enum LSQPolicy { 54 Dynamic, 55 Partitioned, 56 Threshold 57 }; 58 59 /** Constructs an LSQ with the given parameters. */ 60 LSQ(Params *params); --- 4 unchanged lines hidden (view full) --- 65 /** Sets the pointer to the list of active threads. */ 66 void setActiveThreads(std::list<unsigned> *at_ptr); 67 /** Sets the CPU pointer. */ 68 void setCPU(FullCPU *cpu_ptr); 69 /** Sets the IEW stage pointer. */ 70 void setIEW(IEW *iew_ptr); 71 /** Sets the page table pointer. */ 72// void setPageTable(PageTable *pt_ptr); |
72 | 73 /** Switches out the LSQ. */ |
73 void switchOut(); | 74 void switchOut(); |
75 /** Takes over execution from another CPU's thread. */ |
|
74 void takeOverFrom(); 75 76 /** Number of entries needed for the given amount of threads.*/ 77 int entryAmount(int num_threads); 78 void removeEntries(unsigned tid); 79 /** Reset the max entries for each thread. */ 80 void resetEntries(); 81 /** Resize the max entries for a thread. */ --- 8 unchanged lines hidden (view full) --- 90 /** Inserts a load into the LSQ. */ 91 void insertLoad(DynInstPtr &load_inst); 92 /** Inserts a store into the LSQ. */ 93 void insertStore(DynInstPtr &store_inst); 94 95 /** Executes a load. */ 96 Fault executeLoad(DynInstPtr &inst); 97 | 76 void takeOverFrom(); 77 78 /** Number of entries needed for the given amount of threads.*/ 79 int entryAmount(int num_threads); 80 void removeEntries(unsigned tid); 81 /** Reset the max entries for each thread. */ 82 void resetEntries(); 83 /** Resize the max entries for a thread. */ --- 8 unchanged lines hidden (view full) --- 92 /** Inserts a load into the LSQ. */ 93 void insertLoad(DynInstPtr &load_inst); 94 /** Inserts a store into the LSQ. */ 95 void insertStore(DynInstPtr &store_inst); 96 97 /** Executes a load. */ 98 Fault executeLoad(DynInstPtr &inst); 99 |
98 Fault executeLoad(int lq_idx, unsigned tid) 99 { return thread[tid].executeLoad(lq_idx); } 100 | |
101 /** Executes a store. */ 102 Fault executeStore(DynInstPtr &inst); 103 104 /** 105 * Commits loads up until the given sequence number for a specific thread. 106 */ 107 void commitLoads(InstSeqNum &youngest_inst, unsigned tid) 108 { thread[tid].commitLoads(youngest_inst); } --- 216 unchanged lines hidden --- | 100 /** Executes a store. */ 101 Fault executeStore(DynInstPtr &inst); 102 103 /** 104 * Commits loads up until the given sequence number for a specific thread. 105 */ 106 void commitLoads(InstSeqNum &youngest_inst, unsigned tid) 107 { thread[tid].commitLoads(youngest_inst); } --- 216 unchanged lines hidden --- |