Matthew Poremba has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/53883 )
Change subject: arch-vega: Implement S_SLEEP
......................................................................
arch-vega: Implement S_SLEEP
This is merely copied from arch-gcn3.
Change-Id: Ibd2bda37fe9adc083a35efab0f59617d386019b9
---
M src/arch/amdgpu/vega/insts/instructions.cc
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/arch/amdgpu/vega/insts/instructions.cc
b/src/arch/amdgpu/vega/insts/instructions.cc
index d12709a..28473d7 100644
--- a/src/arch/amdgpu/vega/insts/instructions.cc
+++ b/src/arch/amdgpu/vega/insts/instructions.cc
@@ -4608,6 +4608,8 @@
Inst_SOPP__S_SLEEP::Inst_SOPP__S_SLEEP(InFmt_SOPP *iFmt)
: Inst_SOPP(iFmt, "s_sleep")
{
+ setFlag(ALU);
+ setFlag(Sleep);
} // Inst_SOPP__S_SLEEP
Inst_SOPP__S_SLEEP::~Inst_SOPP__S_SLEEP()
@@ -4620,7 +4622,10 @@
void
Inst_SOPP__S_SLEEP::execute(GPUDynInstPtr gpuDynInst)
{
- panicUnimplemented();
+ ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ gpuDynInst->wavefront()->setStatus(Wavefront::S_STALLED_SLEEP);
+ // sleep duration is specified in multiples of 64 cycles
+ gpuDynInst->wavefront()->setSleepTime(64 * simm16);
} // execute
// --- Inst_SOPP__S_SETPRIO class methods ---
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53883
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ibd2bda37fe9adc083a35efab0f59617d386019b9
Gerrit-Change-Number: 53883
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s