gem5 v24.0.0.0
Loading...
Searching...
No Matches
smem.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Advanced Micro Devices, Inc.
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 met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived from this
17 * software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 */
31
33
34namespace gem5
35{
36
37namespace VegaISA
38{
39 // --- Inst_SMEM__S_LOAD_DWORD class methods ---
40
42 : Inst_SMEM(iFmt, "s_load_dword")
43 {
44 setFlag(MemoryRef);
46 } // Inst_SMEM__S_LOAD_DWORD
47
49 {
50 } // ~Inst_SMEM__S_LOAD_DWORD
51
58 void
60 {
61 Wavefront *wf = gpuDynInst->wavefront();
62 gpuDynInst->execUnitId = wf->execUnitId;
63 gpuDynInst->latency.init(gpuDynInst->computeUnit());
64 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
66 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
67
68 addr.read();
69
70 if (instData.IMM) {
72 } else {
73 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
74 off_sgpr.read();
75 offset = off_sgpr.rawData();
76 }
77
78 calcAddr(gpuDynInst, addr, offset);
79
80 gpuDynInst->computeUnit()->scalarMemoryPipe
81 .issueRequest(gpuDynInst);
82 } // execute
83
84 void
86 {
87 initMemRead<1>(gpuDynInst);
88 } // initiateAcc
89
90 void
92 {
93 ScalarOperandU32 sdst(gpuDynInst, instData.SDATA);
94 sdst.write();
95 } // completeAcc
96 // --- Inst_SMEM__S_LOAD_DWORDX2 class methods ---
97
99 : Inst_SMEM(iFmt, "s_load_dwordx2")
100 {
101 setFlag(MemoryRef);
102 setFlag(Load);
103 } // Inst_SMEM__S_LOAD_DWORDX2
104
106 {
107 } // ~Inst_SMEM__S_LOAD_DWORDX2
108
113 void
115 {
116 Wavefront *wf = gpuDynInst->wavefront();
117 gpuDynInst->execUnitId = wf->execUnitId;
118 gpuDynInst->latency.init(gpuDynInst->computeUnit());
119 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
121 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
122
123 addr.read();
124
125 if (instData.IMM) {
127 } else {
128 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
129 off_sgpr.read();
130 offset = off_sgpr.rawData();
131 }
132
133 calcAddr(gpuDynInst, addr, offset);
134
135 gpuDynInst->computeUnit()->scalarMemoryPipe.
136 issueRequest(gpuDynInst);
137 } // execute
138
139 void
141 {
142 initMemRead<2>(gpuDynInst);
143 } // initiateAcc
144
145 void
147 {
148 ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
149 sdst.write();
150 } // completeAcc
151 // --- Inst_SMEM__S_LOAD_DWORDX4 class methods ---
152
154 : Inst_SMEM(iFmt, "s_load_dwordx4")
155 {
156 setFlag(MemoryRef);
157 setFlag(Load);
158 } // Inst_SMEM__S_LOAD_DWORDX4
159
161 {
162 } // ~Inst_SMEM__S_LOAD_DWORDX4
163
164 // --- description from .arch file ---
165 // Read 4 dwords from scalar data cache. See S_LOAD_DWORD for details on
166 // the offset input.
167 void
169 {
170 Wavefront *wf = gpuDynInst->wavefront();
171 gpuDynInst->execUnitId = wf->execUnitId;
172 gpuDynInst->latency.init(gpuDynInst->computeUnit());
173 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
175 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
176
177 addr.read();
178
179 if (instData.IMM) {
181 } else {
182 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
183 off_sgpr.read();
184 offset = off_sgpr.rawData();
185 }
186
187 calcAddr(gpuDynInst, addr, offset);
188
189 gpuDynInst->computeUnit()->scalarMemoryPipe.
190 issueRequest(gpuDynInst);
191 } // execute
192
193 void
195 {
196 initMemRead<4>(gpuDynInst);
197 } // initiateAcc
198
199 void
201 {
202 ScalarOperandU128 sdst(gpuDynInst, instData.SDATA);
203 sdst.write();
204 } // completeAcc
205 // --- Inst_SMEM__S_LOAD_DWORDX8 class methods ---
206
208 : Inst_SMEM(iFmt, "s_load_dwordx8")
209 {
210 setFlag(MemoryRef);
211 setFlag(Load);
212 } // Inst_SMEM__S_LOAD_DWORDX8
213
215 {
216 } // ~Inst_SMEM__S_LOAD_DWORDX8
217
218 // --- description from .arch file ---
219 // Read 8 dwords from scalar data cache. See S_LOAD_DWORD for details on
220 // the offset input.
221 void
223 {
224 Wavefront *wf = gpuDynInst->wavefront();
225 gpuDynInst->execUnitId = wf->execUnitId;
226 gpuDynInst->latency.init(gpuDynInst->computeUnit());
227 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
229 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
230
231 addr.read();
232
233 if (instData.IMM) {
235 } else {
236 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
237 off_sgpr.read();
238 offset = off_sgpr.rawData();
239 }
240
241 calcAddr(gpuDynInst, addr, offset);
242
243 gpuDynInst->computeUnit()->scalarMemoryPipe.
244 issueRequest(gpuDynInst);
245 } // execute
246
247 void
249 {
250 initMemRead<8>(gpuDynInst);
251 } // initiateAcc
252
253 void
255 {
256 ScalarOperandU256 sdst(gpuDynInst, instData.SDATA);
257 sdst.write();
258 } // completeAcc
259 // --- Inst_SMEM__S_LOAD_DWORDX16 class methods ---
260
262 : Inst_SMEM(iFmt, "s_load_dwordx16")
263 {
264 setFlag(MemoryRef);
265 setFlag(Load);
266 } // Inst_SMEM__S_LOAD_DWORDX16
267
269 {
270 } // ~Inst_SMEM__S_LOAD_DWORDX16
271
272 // --- description from .arch file ---
273 // Read 16 dwords from scalar data cache. See S_LOAD_DWORD for details on
274 // the offset input.
275 void
277 {
278 Wavefront *wf = gpuDynInst->wavefront();
279 gpuDynInst->execUnitId = wf->execUnitId;
280 gpuDynInst->latency.init(gpuDynInst->computeUnit());
281 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
283 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
284
285 addr.read();
286
287 if (instData.IMM) {
289 } else {
290 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
291 off_sgpr.read();
292 offset = off_sgpr.rawData();
293 }
294
295 calcAddr(gpuDynInst, addr, offset);
296
297 gpuDynInst->computeUnit()->scalarMemoryPipe.
298 issueRequest(gpuDynInst);
299 } // execute
300
301 void
303 {
304 initMemRead<16>(gpuDynInst);
305 } // initiateAcc
306
307 void
309 {
310 ScalarOperandU512 sdst(gpuDynInst, instData.SDATA);
311 sdst.write();
312 } // completeAcc
313 // --- Inst_SMEM__S_BUFFER_LOAD_DWORD class methods ---
314
316 InFmt_SMEM *iFmt)
317 : Inst_SMEM(iFmt, "s_buffer_load_dword")
318 {
319 setFlag(MemoryRef);
320 setFlag(Load);
321 } // Inst_SMEM__S_BUFFER_LOAD_DWORD
322
324 {
325 } // ~Inst_SMEM__S_BUFFER_LOAD_DWORD
326
327 // --- description from .arch file ---
328 // Read 1 dword from scalar data cache. See S_LOAD_DWORD for details on the
329 // --- offset input.
330 void
332 {
333 Wavefront *wf = gpuDynInst->wavefront();
334 gpuDynInst->execUnitId = wf->execUnitId;
335 gpuDynInst->latency.init(gpuDynInst->computeUnit());
336 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
338 ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
339
340 rsrcDesc.read();
341
342 if (instData.IMM) {
344 } else {
345 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
346 off_sgpr.read();
347 offset = off_sgpr.rawData();
348 }
349
350 calcAddr(gpuDynInst, rsrcDesc, offset);
351
352 gpuDynInst->computeUnit()->scalarMemoryPipe
353 .issueRequest(gpuDynInst);
354 } // execute
355
356 void
358 {
359 initMemRead<1>(gpuDynInst);
360 } // initiateAcc
361
362 void
364 {
365 // 1 request, size 32
366 ScalarOperandU32 sdst(gpuDynInst, instData.SDATA);
367 sdst.write();
368 } // completeAcc
369 // --- Inst_SMEM__S_BUFFER_LOAD_DWORDX2 class methods ---
370
372 InFmt_SMEM *iFmt)
373 : Inst_SMEM(iFmt, "s_buffer_load_dwordx2")
374 {
375 setFlag(MemoryRef);
376 setFlag(Load);
377 } // Inst_SMEM__S_BUFFER_LOAD_DWORDX2
378
380 {
381 } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX2
382
383 // --- description from .arch file ---
384 // Read 2 dwords from scalar data cache. See S_LOAD_DWORD for details on
385 // the offset input.
386 void
388 {
389 Wavefront *wf = gpuDynInst->wavefront();
390 gpuDynInst->execUnitId = wf->execUnitId;
391 gpuDynInst->latency.init(gpuDynInst->computeUnit());
392 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
394 ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
395
396 rsrcDesc.read();
397
398 if (instData.IMM) {
400 } else {
401 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
402 off_sgpr.read();
403 offset = off_sgpr.rawData();
404 }
405
406 calcAddr(gpuDynInst, rsrcDesc, offset);
407
408 gpuDynInst->computeUnit()->scalarMemoryPipe
409 .issueRequest(gpuDynInst);
410 } // execute
411
412 void
414 {
415 initMemRead<2>(gpuDynInst);
416 } // initiateAcc
417
418 void
420 {
421 // use U64 because 2 requests, each size 32
422 ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
423 sdst.write();
424 } // completeAcc
425 // --- Inst_SMEM__S_BUFFER_LOAD_DWORDX4 class methods ---
426
428 InFmt_SMEM *iFmt)
429 : Inst_SMEM(iFmt, "s_buffer_load_dwordx4")
430 {
431 setFlag(MemoryRef);
432 setFlag(Load);
433 } // Inst_SMEM__S_BUFFER_LOAD_DWORDX4
434
436 {
437 } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX4
438
439 // --- description from .arch file ---
440 // Read 4 dwords from scalar data cache. See S_LOAD_DWORD for details on
441 // the offset input.
442 void
444 {
445 Wavefront *wf = gpuDynInst->wavefront();
446 gpuDynInst->execUnitId = wf->execUnitId;
447 gpuDynInst->latency.init(gpuDynInst->computeUnit());
448 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
450 ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
451
452 rsrcDesc.read();
453
454 if (instData.IMM) {
456 } else {
457 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
458 off_sgpr.read();
459 offset = off_sgpr.rawData();
460 }
461
462 calcAddr(gpuDynInst, rsrcDesc, offset);
463
464 gpuDynInst->computeUnit()->scalarMemoryPipe
465 .issueRequest(gpuDynInst);
466 } // execute
467
468 void
470 {
471 initMemRead<4>(gpuDynInst);
472 } // initiateAcc
473
474 void
476 {
477 // 4 requests, each size 32
478 ScalarOperandU128 sdst(gpuDynInst, instData.SDATA);
479 sdst.write();
480 } // completeAcc
481 // --- Inst_SMEM__S_BUFFER_LOAD_DWORDX8 class methods ---
482
484 InFmt_SMEM *iFmt)
485 : Inst_SMEM(iFmt, "s_buffer_load_dwordx8")
486 {
487 setFlag(MemoryRef);
488 setFlag(Load);
489 } // Inst_SMEM__S_BUFFER_LOAD_DWORDX8
490
492 {
493 } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX8
494
495 // --- description from .arch file ---
496 // Read 8 dwords from scalar data cache. See S_LOAD_DWORD for details on
497 // the offset input.
498 void
500 {
501 Wavefront *wf = gpuDynInst->wavefront();
502 gpuDynInst->execUnitId = wf->execUnitId;
503 gpuDynInst->latency.init(gpuDynInst->computeUnit());
504 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
506 ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
507
508 rsrcDesc.read();
509
510 if (instData.IMM) {
512 } else {
513 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
514 off_sgpr.read();
515 offset = off_sgpr.rawData();
516 }
517
518 calcAddr(gpuDynInst, rsrcDesc, offset);
519
520 gpuDynInst->computeUnit()->scalarMemoryPipe
521 .issueRequest(gpuDynInst);
522 } // execute
523
524 void
526 {
527 initMemRead<8>(gpuDynInst);
528 } // initiateAcc
529
530 void
532 {
533 // 8 requests, each size 32
534 ScalarOperandU256 sdst(gpuDynInst, instData.SDATA);
535 sdst.write();
536 } // completeAcc
537 // --- Inst_SMEM__S_BUFFER_LOAD_DWORDX16 class methods ---
538
540 InFmt_SMEM *iFmt)
541 : Inst_SMEM(iFmt, "s_buffer_load_dwordx16")
542 {
543 setFlag(MemoryRef);
544 setFlag(Load);
545 } // Inst_SMEM__S_BUFFER_LOAD_DWORDX16
546
548 {
549 } // ~Inst_SMEM__S_BUFFER_LOAD_DWORDX16
550
551 // --- description from .arch file ---
552 // Read 16 dwords from scalar data cache. See S_LOAD_DWORD for details on
553 // the offset input.
554 void
556 {
557 Wavefront *wf = gpuDynInst->wavefront();
558 gpuDynInst->execUnitId = wf->execUnitId;
559 gpuDynInst->latency.init(gpuDynInst->computeUnit());
560 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
562 ConstScalarOperandU128 rsrcDesc(gpuDynInst, instData.SBASE);
563
564 rsrcDesc.read();
565
566 if (instData.IMM) {
568 } else {
569 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
570 off_sgpr.read();
571 offset = off_sgpr.rawData();
572 }
573
574 calcAddr(gpuDynInst, rsrcDesc, offset);
575
576 gpuDynInst->computeUnit()->scalarMemoryPipe
577 .issueRequest(gpuDynInst);
578 } // execute
579
580 void
582 {
583 initMemRead<16>(gpuDynInst);
584 } // initiateAcc
585
586 void
588 {
589 // 16 requests, each size 32
590 ScalarOperandU512 sdst(gpuDynInst, instData.SDATA);
591 sdst.write();
592 } // completeAcc
593 // --- Inst_SMEM__S_STORE_DWORD class methods ---
594
596 : Inst_SMEM(iFmt, "s_store_dword")
597 {
598 setFlag(MemoryRef);
599 setFlag(Store);
600 } // Inst_SMEM__S_STORE_DWORD
601
603 {
604 } // ~Inst_SMEM__S_STORE_DWORD
605
606 // --- description from .arch file ---
607 // Write 1 dword to scalar data cache.
608 // If the offset is specified as an SGPR, the SGPR contains an unsigned
609 // BYTE offset (the 2 LSBs are ignored).
610 // If the offset is specified as an immediate 20-bit constant, the
611 // constant is an unsigned BYTE offset.
612 void
614 {
615 Wavefront *wf = gpuDynInst->wavefront();
616 gpuDynInst->execUnitId = wf->execUnitId;
617 gpuDynInst->latency.init(gpuDynInst->computeUnit());
618 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
620 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
621 ConstScalarOperandU32 sdata(gpuDynInst, instData.SDATA);
622
623 addr.read();
624 sdata.read();
625
626 std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
627 sizeof(ScalarRegU32));
628
629 if (instData.IMM) {
631 } else {
632 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
633 off_sgpr.read();
634 offset = off_sgpr.rawData();
635 }
636
637 calcAddr(gpuDynInst, addr, offset);
638
639 gpuDynInst->computeUnit()->scalarMemoryPipe.
640 issueRequest(gpuDynInst);
641 } // execute
642
643 void
645 {
646 initMemWrite<1>(gpuDynInst);
647 } // initiateAcc
648
649 void
651 {
652 } // completeAcc
653 // --- Inst_SMEM__S_STORE_DWORDX2 class methods ---
654
656 : Inst_SMEM(iFmt, "s_store_dwordx2")
657 {
658 setFlag(MemoryRef);
659 setFlag(Store);
660 } // Inst_SMEM__S_STORE_DWORDX2
661
663 {
664 } // ~Inst_SMEM__S_STORE_DWORDX2
665
666 // --- description from .arch file ---
667 // Write 2 dwords to scalar data cache. See S_STORE_DWORD for details on
668 // the offset input.
669 void
671 {
672 Wavefront *wf = gpuDynInst->wavefront();
673 gpuDynInst->execUnitId = wf->execUnitId;
674 gpuDynInst->latency.init(gpuDynInst->computeUnit());
675 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
677 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
678 ConstScalarOperandU64 sdata(gpuDynInst, instData.SDATA);
679
680 addr.read();
681 sdata.read();
682
683 std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
684 sizeof(ScalarRegU64));
685
686 if (instData.IMM) {
688 } else {
689 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
690 off_sgpr.read();
691 offset = off_sgpr.rawData();
692 }
693
694 calcAddr(gpuDynInst, addr, offset);
695
696 gpuDynInst->computeUnit()->scalarMemoryPipe.
697 issueRequest(gpuDynInst);
698 } // execute
699
700 void
702 {
703 initMemWrite<2>(gpuDynInst);
704 } // initiateAcc
705
706 void
708 {
709 } // completeAcc
710 // --- Inst_SMEM__S_STORE_DWORDX4 class methods ---
711
713 : Inst_SMEM(iFmt, "s_store_dwordx4")
714 {
715 setFlag(MemoryRef);
716 setFlag(Store);
717 } // Inst_SMEM__S_STORE_DWORDX4
718
720 {
721 } // ~Inst_SMEM__S_STORE_DWORDX4
722
723 // --- description from .arch file ---
724 // Write 4 dwords to scalar data cache. See S_STORE_DWORD for details on
725 // the offset input.
726 void
728 {
729 Wavefront *wf = gpuDynInst->wavefront();
730 gpuDynInst->execUnitId = wf->execUnitId;
731 gpuDynInst->latency.init(gpuDynInst->computeUnit());
732 gpuDynInst->latency.set(gpuDynInst->computeUnit()->clockPeriod());
734 ConstScalarOperandU64 addr(gpuDynInst, instData.SBASE << 1);
735 ConstScalarOperandU64 sdata(gpuDynInst, instData.SDATA);
736
737 addr.read();
738 sdata.read();
739
740 std::memcpy((void*)gpuDynInst->scalar_data, sdata.rawDataPtr(),
741 sizeof(gpuDynInst->scalar_data));
742
743 if (instData.IMM) {
745 } else {
746 ConstScalarOperandU32 off_sgpr(gpuDynInst, extData.OFFSET);
747 off_sgpr.read();
748 offset = off_sgpr.rawData();
749 }
750
751 calcAddr(gpuDynInst, addr, offset);
752
753 gpuDynInst->computeUnit()->scalarMemoryPipe.
754 issueRequest(gpuDynInst);
755 } // execute
756
757 void
759 {
760 initMemWrite<4>(gpuDynInst);
761 } // initiateAcc
762
763 void
765 {
766 } // completeAcc
767 // --- Inst_SMEM__S_BUFFER_STORE_DWORD class methods ---
768
770 InFmt_SMEM *iFmt)
771 : Inst_SMEM(iFmt, "s_buffer_store_dword")
772 {
773 setFlag(MemoryRef);
774 setFlag(Store);
775 } // Inst_SMEM__S_BUFFER_STORE_DWORD
776
778 {
779 } // ~Inst_SMEM__S_BUFFER_STORE_DWORD
780
781 // --- description from .arch file ---
782 // Write 1 dword to scalar data cache. See S_STORE_DWORD for details on the
783 // --- offset input.
784 void
789
790 void
792 {
793 } // initiateAcc
794
795 void
797 {
798 } // completeAcc
799 // --- Inst_SMEM__S_BUFFER_STORE_DWORDX2 class methods ---
800
802 InFmt_SMEM *iFmt)
803 : Inst_SMEM(iFmt, "s_buffer_store_dwordx2")
804 {
805 setFlag(MemoryRef);
806 setFlag(Store);
807 } // Inst_SMEM__S_BUFFER_STORE_DWORDX2
808
810 {
811 } // ~Inst_SMEM__S_BUFFER_STORE_DWORDX2
812
813 // --- description from .arch file ---
814 // Write 2 dwords to scalar data cache. See S_STORE_DWORD for details on
815 // the offset input.
816 void
821
822 void
824 {
825 } // initiateAcc
826
827 void
829 {
830 } // completeAcc
831 // --- Inst_SMEM__S_BUFFER_STORE_DWORDX4 class methods ---
832
834 InFmt_SMEM *iFmt)
835 : Inst_SMEM(iFmt, "s_buffer_store_dwordx4")
836 {
837 setFlag(MemoryRef);
838 setFlag(Store);
839 } // Inst_SMEM__S_BUFFER_STORE_DWORDX4
840
842 {
843 } // ~Inst_SMEM__S_BUFFER_STORE_DWORDX4
844
845 // --- description from .arch file ---
846 // Write 4 dwords to scalar data cache. See S_STORE_DWORD for details on
847 // the offset input.
848 void
853
854 void
856 {
857 } // initiateAcc
858
859 void
861 {
862 } // completeAcc
863 // --- Inst_SMEM__S_DCACHE_INV class methods ---
864
866 : Inst_SMEM(iFmt, "s_dcache_inv")
867 {
868 } // Inst_SMEM__S_DCACHE_INV
869
871 {
872 } // ~Inst_SMEM__S_DCACHE_INV
873
874 // --- description from .arch file ---
875 // Invalidate the scalar data cache.
876 void
878 {
880 } // execute
881 // --- Inst_SMEM__S_DCACHE_WB class methods ---
882
884 : Inst_SMEM(iFmt, "s_dcache_wb")
885 {
886 } // Inst_SMEM__S_DCACHE_WB
887
889 {
890 } // ~Inst_SMEM__S_DCACHE_WB
891
892 // --- description from .arch file ---
893 // Write back dirty data in the scalar data cache.
894 void
896 {
898 } // execute
899 // --- Inst_SMEM__S_DCACHE_INV_VOL class methods ---
900
902 : Inst_SMEM(iFmt, "s_dcache_inv_vol")
903 {
904 } // Inst_SMEM__S_DCACHE_INV_VOL
905
907 {
908 } // ~Inst_SMEM__S_DCACHE_INV_VOL
909
910 // --- description from .arch file ---
911 // Invalidate the scalar data cache volatile lines.
912 void
917 // --- Inst_SMEM__S_DCACHE_WB_VOL class methods ---
918
920 : Inst_SMEM(iFmt, "s_dcache_wb_vol")
921 {
922 } // Inst_SMEM__S_DCACHE_WB_VOL
923
925 {
926 } // ~Inst_SMEM__S_DCACHE_WB_VOL
927
928 // --- description from .arch file ---
929 // Write back dirty data in the scalar data cache volatile lines.
930 void
935 // --- Inst_SMEM__S_MEMTIME class methods ---
936
938 : Inst_SMEM(iFmt, "s_memtime")
939 {
940 // s_memtime does not issue a memory request
941 setFlag(ALU);
942 } // Inst_SMEM__S_MEMTIME
943
945 {
946 } // ~Inst_SMEM__S_MEMTIME
947
948 // --- description from .arch file ---
949 // Return current 64-bit timestamp.
950 void
952 {
953 ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
954 sdst = (ScalarRegU64)gpuDynInst->computeUnit()->curCycle();
955 sdst.write();
956 } // execute
957 // --- Inst_SMEM__S_MEMREALTIME class methods ---
958
960 : Inst_SMEM(iFmt, "s_memrealtime")
961 {
962 } // Inst_SMEM__S_MEMREALTIME
963
965 {
966 } // ~Inst_SMEM__S_MEMREALTIME
967
968 // --- description from .arch file ---
969 // Return current 64-bit RTC.
970 void
972 {
974 } // execute
975 // --- Inst_SMEM__S_ATC_PROBE class methods ---
976
978 : Inst_SMEM(iFmt, "s_atc_probe")
979 {
980 } // Inst_SMEM__S_ATC_PROBE
981
983 {
984 } // ~Inst_SMEM__S_ATC_PROBE
985
986 // --- description from .arch file ---
987 // Probe or prefetch an address into the SQC data cache.
988 void
990 {
992 } // execute
993 // --- Inst_SMEM__S_ATC_PROBE_BUFFER class methods ---
994
996 InFmt_SMEM *iFmt)
997 : Inst_SMEM(iFmt, "s_atc_probe_buffer")
998 {
999 } // Inst_SMEM__S_ATC_PROBE_BUFFER
1000
1002 {
1003 } // ~Inst_SMEM__S_ATC_PROBE_BUFFER
1004
1005 // --- description from .arch file ---
1006 // Probe or prefetch an address into the SQC data cache.
1007 void
1012} // namespace VegaISA
1013} // namespace gem5
void setFlag(Flags flag)
void execute(GPUDynInstPtr) override
Definition smem.cc:1008
void execute(GPUDynInstPtr) override
Definition smem.cc:989
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:581
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:587
void execute(GPUDynInstPtr) override
Definition smem.cc:555
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:413
void execute(GPUDynInstPtr) override
Definition smem.cc:387
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:419
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:469
void execute(GPUDynInstPtr) override
Definition smem.cc:443
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:475
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:531
void execute(GPUDynInstPtr) override
Definition smem.cc:499
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:525
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:357
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:363
void execute(GPUDynInstPtr) override
Definition smem.cc:331
void execute(GPUDynInstPtr) override
Definition smem.cc:817
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:828
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:823
void execute(GPUDynInstPtr) override
Definition smem.cc:849
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:855
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:860
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:791
void execute(GPUDynInstPtr) override
Definition smem.cc:785
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:796
void execute(GPUDynInstPtr) override
Definition smem.cc:913
void execute(GPUDynInstPtr) override
Definition smem.cc:877
void execute(GPUDynInstPtr) override
Definition smem.cc:931
void execute(GPUDynInstPtr) override
Definition smem.cc:895
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:302
void execute(GPUDynInstPtr) override
Definition smem.cc:276
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:308
void execute(GPUDynInstPtr) override
Read 2 dwords from scalar data cache.
Definition smem.cc:114
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:140
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:146
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:194
void execute(GPUDynInstPtr) override
Definition smem.cc:168
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:200
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:248
void execute(GPUDynInstPtr) override
Definition smem.cc:222
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:254
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:85
void execute(GPUDynInstPtr) override
Read 1 dword from scalar data cache.
Definition smem.cc:59
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:91
void execute(GPUDynInstPtr) override
Definition smem.cc:971
void execute(GPUDynInstPtr) override
Definition smem.cc:951
void execute(GPUDynInstPtr) override
Definition smem.cc:670
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:707
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:701
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:758
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:764
void execute(GPUDynInstPtr) override
Definition smem.cc:727
void initiateAcc(GPUDynInstPtr) override
Definition smem.cc:644
void execute(GPUDynInstPtr) override
Definition smem.cc:613
void completeAcc(GPUDynInstPtr) override
Definition smem.cc:650
void initMemRead(GPUDynInstPtr gpuDynInst)
initiate a memory read access for N dwords
void calcAddr(GPUDynInstPtr gpu_dyn_inst, ConstScalarOperandU64 &addr, ScalarRegU32 offset)
For normal s_load_dword/s_store_dword instruction addresses.
void initMemWrite(GPUDynInstPtr gpuDynInst)
initiate a memory write access for N dwords
void read() override
read from and write to the underlying register(s) that this operand is referring to.
Definition operand.hh:409
std::enable_if< Condition, DataType >::type rawData() const
we store scalar data in a std::array, however if we need the full operand data we use this method to ...
Definition operand.hh:392
Bitfield< 23, 0 > offset
Definition types.hh:144
uint64_t ScalarRegU64
uint32_t ScalarRegU32
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition misc.hh:49

Generated on Tue Jun 18 2024 16:23:47 for gem5 by doxygen 1.11.0