decode_impl.hh (3970:d54945bab95d) decode_impl.hh (4318:eb4241362a80)
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;

--- 100 unchanged lines hidden (view full) ---

109 .desc("Number of squashed instructions handled by decode")
110 .prereq(decodeSquashedInsts);
111}
112
113template<class Impl>
114void
115DefaultDecode<Impl>::setCPU(O3CPU *cpu_ptr)
116{
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;

--- 100 unchanged lines hidden (view full) ---

109 .desc("Number of squashed instructions handled by decode")
110 .prereq(decodeSquashedInsts);
111}
112
113template<class Impl>
114void
115DefaultDecode<Impl>::setCPU(O3CPU *cpu_ptr)
116{
117 DPRINTF(Decode, "Setting CPU pointer.\n");
118 cpu = cpu_ptr;
117 cpu = cpu_ptr;
118 DPRINTF(Decode, "Setting CPU pointer.\n");
119}
120
121template<class Impl>
122void
123DefaultDecode<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
124{
119}
120
121template<class Impl>
122void
123DefaultDecode<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
124{
125 DPRINTF(Decode, "Setting time buffer pointer.\n");
126 timeBuffer = tb_ptr;
127
128 // Setup wire to write information back to fetch.
129 toFetch = timeBuffer->getWire(0);
130
131 // Create wires to get information from proper places in time buffer.
132 fromRename = timeBuffer->getWire(-renameToDecodeDelay);
133 fromIEW = timeBuffer->getWire(-iewToDecodeDelay);
134 fromCommit = timeBuffer->getWire(-commitToDecodeDelay);
135}
136
137template<class Impl>
138void
139DefaultDecode<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr)
140{
125 timeBuffer = tb_ptr;
126
127 // Setup wire to write information back to fetch.
128 toFetch = timeBuffer->getWire(0);
129
130 // Create wires to get information from proper places in time buffer.
131 fromRename = timeBuffer->getWire(-renameToDecodeDelay);
132 fromIEW = timeBuffer->getWire(-iewToDecodeDelay);
133 fromCommit = timeBuffer->getWire(-commitToDecodeDelay);
134}
135
136template<class Impl>
137void
138DefaultDecode<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr)
139{
141 DPRINTF(Decode, "Setting decode queue pointer.\n");
142 decodeQueue = dq_ptr;
143
144 // Setup wire to write information to proper place in decode queue.
145 toRename = decodeQueue->getWire(0);
146}
147
148template<class Impl>
149void
150DefaultDecode<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr)
151{
140 decodeQueue = dq_ptr;
141
142 // Setup wire to write information to proper place in decode queue.
143 toRename = decodeQueue->getWire(0);
144}
145
146template<class Impl>
147void
148DefaultDecode<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr)
149{
152 DPRINTF(Decode, "Setting fetch queue pointer.\n");
153 fetchQueue = fq_ptr;
154
155 // Setup wire to read information from fetch queue.
156 fromFetch = fetchQueue->getWire(-fetchToDecodeDelay);
157}
158
159template<class Impl>
160void
161DefaultDecode<Impl>::setActiveThreads(std::list<unsigned> *at_ptr)
162{
150 fetchQueue = fq_ptr;
151
152 // Setup wire to read information from fetch queue.
153 fromFetch = fetchQueue->getWire(-fetchToDecodeDelay);
154}
155
156template<class Impl>
157void
158DefaultDecode<Impl>::setActiveThreads(std::list<unsigned> *at_ptr)
159{
163 DPRINTF(Decode, "Setting active threads list pointer.\n");
164 activeThreads = at_ptr;
165}
166
167template <class Impl>
168bool
169DefaultDecode<Impl>::drain()
170{
171 // Decode is done draining at any time.

--- 658 unchanged lines hidden ---
160 activeThreads = at_ptr;
161}
162
163template <class Impl>
164bool
165DefaultDecode<Impl>::drain()
166{
167 // Decode is done draining at any time.

--- 658 unchanged lines hidden ---