-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update data preloading #61
Conversation
yyan7223
commented
Jan 8, 2025
lib/messages.py
Outdated
@@ -392,6 +392,31 @@ def str_func(s): | |||
namespace = {'__str__': str_func} | |||
) | |||
|
|||
#========================================================================= | |||
# Ring for delivering data across SPM banks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ring is the NoC for multiple CGRAs? Or for multiple tiles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the multiple banks in the SPM of one CGRA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then all the banks are connected to one controller:
Lines 89 to 91 in 4688d88
s.data_mem.recv_raddr[height] //= s.controller.send_to_tile_load_request_addr | |
s.data_mem.recv_waddr[height] //= s.controller.send_to_tile_store_request_addr | |
s.data_mem.recv_wdata[height] //= s.controller.send_to_tile_store_request_data |
Why do we need to send pkt/msg on ring for SRAM banks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, do you mean the SRAM banks on other CGRAs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better if this message just have data
and addr
? The cgra id and bank id could be inferred based on the addr2controller_lut
, and send through
VectorCGRA/controller/ControllerRTL.py
Lines 52 to 53 in 4688d88
s.send_to_tile_store_request_addr_queue = ChannelRTL(CGRAAddrType, latency = 1) | |
s.send_to_tile_store_request_data_queue = ChannelRTL(CGRADataType, latency = 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller/ControllerRTL.py
Outdated
s.send_to_ctrl_ring_ctrl_pkt = SendIfcRTL(CtrlPktType) | ||
# s.recv_from_cpu_ctrl_pkt = RecvIfcRTL(CtrlPktType) | ||
# s.send_to_ctrl_ring_ctrl_pkt = SendIfcRTL(CtrlPktType) | ||
s.recv_ctrl_pkt = RecvIfcRTL(CtrlPktType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we remove _cpu_
here? It can come from other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have 100 cgras, I don't think let CPU connect all of them
is a good idea.
Instead, only the first cgra connect to cpu, and the rest of cgras are connected sequentially, which will be more synthesised&P&R friendly I believe?
Or I change it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are aligned on this, CPU only talks to the first controller. Thus, we already have:
- pkg from NoC:
VectorCGRA/controller/ControllerRTL.py
Line 29 in 4688d88
s.recv_from_noc = RecvIfcRTL(NocPktType) - Handler (TODO) upon receiving the pkg from NoC:
VectorCGRA/controller/ControllerRTL.py
Line 215 in 4688d88
# # TODO: Handle other cmd types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand, then what is the purpose of recv_from_cpu_ctrl_pkt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry, let me read CgraTemplateRTL.py
and understand your design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. And to briefly clarify, recv_from_cpu_ctrl_pkt
of the first CGRA/controller would get pkt from CPU then send into the queue recv_ctrl_pkt_queue
, then the pkt in the queue would be popped to the inter-CGRA NoC (now is a ring), note that even the CGRA_0's pkt would be sent into the ring and popped, to be uniformed/simplified.