func_unit.cc (5034:6186ef720dd4) func_unit.cc (10807:dac26eb4cb64)
1/*
2 * Copyright (c) 2002-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;

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

47
48
49// Copy constructor
50FuncUnit::FuncUnit(const FuncUnit &fu)
51{
52
53 for (int i = 0; i < Num_OpClasses; ++i) {
54 opLatencies[i] = fu.opLatencies[i];
1/*
2 * Copyright (c) 2002-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;

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

47
48
49// Copy constructor
50FuncUnit::FuncUnit(const FuncUnit &fu)
51{
52
53 for (int i = 0; i < Num_OpClasses; ++i) {
54 opLatencies[i] = fu.opLatencies[i];
55 issueLatencies[i] = fu.issueLatencies[i];
55 pipelined[i] = fu.pipelined[i];
56 }
57
58 capabilityList = fu.capabilityList;
59}
60
61
62void
56 }
57
58 capabilityList = fu.capabilityList;
59}
60
61
62void
63FuncUnit::addCapability(OpClass cap, unsigned oplat, unsigned issuelat)
63FuncUnit::addCapability(OpClass cap, unsigned oplat, bool pipeline)
64{
64{
65 if (issuelat == 0 || oplat == 0)
65 if (oplat == 0)
66 panic("FuncUnit: you don't really want a zero-cycle latency do you?");
67
68 capabilityList.set(cap);
69
70 opLatencies[cap] = oplat;
66 panic("FuncUnit: you don't really want a zero-cycle latency do you?");
67
68 capabilityList.set(cap);
69
70 opLatencies[cap] = oplat;
71 issueLatencies[cap] = issuelat;
71 pipelined[cap] = pipeline;
72}
73
74bool
75FuncUnit::provides(OpClass capability)
76{
77 return capabilityList[capability];
78}
79

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

84}
85
86unsigned &
87FuncUnit::opLatency(OpClass cap)
88{
89 return opLatencies[cap];
90}
91
72}
73
74bool
75FuncUnit::provides(OpClass capability)
76{
77 return capabilityList[capability];
78}
79

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

84}
85
86unsigned &
87FuncUnit::opLatency(OpClass cap)
88{
89 return opLatencies[cap];
90}
91
92unsigned
93FuncUnit::issueLatency(OpClass capability)
92bool
93FuncUnit::isPipelined(OpClass capability)
94{
94{
95 return issueLatencies[capability];
95 return pipelined[capability];
96}
97
98////////////////////////////////////////////////////////////////////////////
99//
100// The SimObjects we use to get the FU information into the simulator
101//
102////////////////////////////////////////////////////////////////////////////
103

--- 28 unchanged lines hidden ---
96}
97
98////////////////////////////////////////////////////////////////////////////
99//
100// The SimObjects we use to get the FU information into the simulator
101//
102////////////////////////////////////////////////////////////////////////////
103

--- 28 unchanged lines hidden ---