wavefront.cc (11523:81332eb10367) wavefront.cc (11534:7106f550afad)
1/*
2 * Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

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

50}
51
52Wavefront::Wavefront(const Params *p)
53 : SimObject(p), callArgMem(nullptr)
54{
55 last_trace = 0;
56 simdId = p->simdId;
57 wfSlotId = p->wf_slot_id;
1/*
2 * Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

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

50}
51
52Wavefront::Wavefront(const Params *p)
53 : SimObject(p), callArgMem(nullptr)
54{
55 last_trace = 0;
56 simdId = p->simdId;
57 wfSlotId = p->wf_slot_id;
58
59 status = S_STOPPED;
60 reservedVectorRegs = 0;
61 startVgprIndex = 0;
62 outstanding_reqs = 0;
63 mem_reqs_in_pipe = 0;
64 outstanding_reqs_wr_gm = 0;
65 outstanding_reqs_wr_lm = 0;
66 outstanding_reqs_rd_gm = 0;

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

72
73 barrier_cnt = 0;
74 old_barrier_cnt = 0;
75 stalledAtBarrier = false;
76
77 mem_trace_busy = 0;
78 old_vgpr_tcnt = 0xffffffffffffffffll;
79 old_dgpr_tcnt = 0xffffffffffffffffll;
58 status = S_STOPPED;
59 reservedVectorRegs = 0;
60 startVgprIndex = 0;
61 outstanding_reqs = 0;
62 mem_reqs_in_pipe = 0;
63 outstanding_reqs_wr_gm = 0;
64 outstanding_reqs_wr_lm = 0;
65 outstanding_reqs_rd_gm = 0;

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

71
72 barrier_cnt = 0;
73 old_barrier_cnt = 0;
74 stalledAtBarrier = false;
75
76 mem_trace_busy = 0;
77 old_vgpr_tcnt = 0xffffffffffffffffll;
78 old_dgpr_tcnt = 0xffffffffffffffffll;
79 old_vgpr.resize(p->wfSize);
80
81 pendingFetch = false;
82 dropFetch = false;
83 condRegState = new ConditionRegisterState();
84 maxSpVgprs = 0;
85 maxDpVgprs = 0;
80
81 pendingFetch = false;
82 dropFetch = false;
83 condRegState = new ConditionRegisterState();
84 maxSpVgprs = 0;
85 maxDpVgprs = 0;
86 last_addr.resize(p->wfSize);
87 workitemFlatId.resize(p->wfSize);
88 old_dgpr.resize(p->wfSize);
89 bar_cnt.resize(p->wfSize);
90 for (int i = 0; i < 3; ++i) {
91 workitemid[i].resize(p->wfSize);
92 }
86}
87
88void
89Wavefront::regStats()
90{
91 SimObject::regStats();
92
93 srcRegOpDist

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

139 maxSpVgprs = num_sregs;
140 maxDpVgprs = num_dregs;
141}
142
143Wavefront::~Wavefront()
144{
145 if (callArgMem)
146 delete callArgMem;
93}
94
95void
96Wavefront::regStats()
97{
98 SimObject::regStats();
99
100 srcRegOpDist

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

146 maxSpVgprs = num_sregs;
147 maxDpVgprs = num_dregs;
148}
149
150Wavefront::~Wavefront()
151{
152 if (callArgMem)
153 delete callArgMem;
154 delete condRegState;
147}
148
149void
150Wavefront::start(uint64_t _wfDynId,uint64_t _base_ptr)
151{
152 wfDynId = _wfDynId;
153 base_ptr = _base_ptr;
154 status = S_RUNNING;

--- 771 unchanged lines hidden ---
155}
156
157void
158Wavefront::start(uint64_t _wfDynId,uint64_t _base_ptr)
159{
160 wfDynId = _wfDynId;
161 base_ptr = _base_ptr;
162 status = S_RUNNING;

--- 771 unchanged lines hidden ---