Fix/kernel termination return#297
Conversation
7726455 to
83e1c87
Compare
83e1c87 to
6358200
Compare
6358200 to
5904e1a
Compare
|
Concrete example: ctrl steps: Before: After: |
| (s.recv_pkt_from_controller_queue.send.msg.payload.cmd == CMD_CONFIG_GEP_STRIDE) | \ | ||
| (s.recv_pkt_from_controller_queue.send.msg.payload.cmd == CMD_UPDATE_COUNTER_SHADOW_VALUE) | \ | ||
| (s.recv_pkt_from_controller_queue.send.msg.payload.cmd == CMD_RESET_LEAF_COUNTER): | ||
| (s.recv_pkt_from_controller_queue.send.msg.payload.cmd == CMD_RESET_LEAF_COUNTER) | \ |
There was a problem hiding this comment.
Those changes are unrelated to this PR, right?
| s.send_pkt_to_controller.msg @= \ | ||
| IntraCgraPktType(zext(s.tile_id, IntraPktTileIdType), num_tiles, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| IntraCgraPktType(s.tile_id, num_tiles, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| s.recv_from_element_queue.send.msg) |
There was a problem hiding this comment.
How do you make sure the result of OPT_RET is sent back to CPU? recv_from_element_queue may contain the results of any operations.
| # Sets each FU's op code as NAH when prologue execution has not completed. | ||
| # As FU is supposed to do nothing during prologue. | ||
| if s.prologue_count_outport_fu != 0: | ||
| s.send_ctrl.msg.operation @= OPT_NAH |
| # FlexibleFuRTL so the real control word remains visible to the | ||
| # crossbars and debug signals. | ||
| if ~s.send_ctrl.val: | ||
| s.send_ctrl.msg.operation @= OPT_START |
| s.send_ctrl.msg.is_last_ctrl @= \ | ||
| s.reg_file.rdata[0].is_last_ctrl | \ | ||
| ((s.total_ctrl_steps_val > 0) & | ||
| (s.times == s.total_ctrl_steps_val - TimeType(1))) |
There was a problem hiding this comment.
Can you explain why we need ((s.total_ctrl_steps_val > 0) & (s.times == s.total_ctrl_steps_val - TimeType(1))) ?
|
|
||
| @update | ||
| def update_send_ctrl_val(): | ||
| def update_send_ctrl(): |
yyan7223
left a comment
There was a problem hiding this comment.
Are you using AI to help you with the PR?
Of coarse. And using AI is totally fine. And we should encourage that. @yyan7223 do you have any concern~? But for this PR, AI might not aware of our original motivation, we indeed provided the |
I agree with your proposal. |
I'm totally fine with AI, I also use it for coding, and I check every line of code it generated carefully to make sure it is reasonable. |
hmm, I suggest we keep the original solution as well. i.e., it can also send I thought including this |
Summary
Addresses #292 with a minimized dynamic-control termination fix. This PR only updates
CtrlMemDynamicRTL.pyand its focused test.Changes
is_last_ctrl.No new ports or interfaces are introduced.