pulp-platform / pulp

This is the top-level project for the PULP Platform. It instantiates a PULP open-source system with a PULP SoC (microcontroller) domain accelerated by a PULP cluster with 8 cores.
Other
452 stars 114 forks source link

Attaching a hardware accelerator / Custom IP within pulp_cluster via AXI #83

Closed prajwalkashyap closed 1 year ago

prajwalkashyap commented 1 year ago

Hello,

I want to attach a custom IP within the pulp_cluster. I couldn't find any documents or steps anywhere to do this. I used this https://github.com/pulp-platform/pulpissimo/issues/222 to attach an IP in pulp_soc and it works fine. Can somebody share the steps/doc to attach an IP in pulp_cluster ?

Thank you

FrancescoConti commented 1 year ago

It does not make too much sense IMHO to attach an AXI accelerator within the cluster, as the act of coupling them by AXI makes them pretty much decoupled (same level of coupling as a L2 accelerator). For example, the cluster is itself an "AXI-coupled accelerator" of the pulp-soc. So I see two options:

  1. you attach the accelerator to the AXI cluster interconnect, which is not that different from doing exactly the same on the SoC side... there is nothing "premade" there, but you can follow what is done for the cores themselves https://github.com/pulp-platform/pulp_cluster/blob/e87fc585b90aa54148017a2d3072337ec7534f17/rtl/pulp_cluster.sv#L566 . Notice you will be limited in bandwidth by the width of the AXI bus. This is more similar to what you are asking in your question!
  2. you exploit HWPE IPs as suggested by @GiannaP in the referred issue. You can find several examples + docs in https://hwpe-doc.readthedocs.io/en/latest/ . This is less aligned with your original request as it allows for much tighter integration with the cluster (and much higher bandwidth to TCDM).
prajwalkashyap commented 1 year ago

Hi @FrancescoConti Thank you for replying. I am implementing point no 1. I think the cluster address is 32'h1000_0000 to 32'h1040_0000 according to soc_mem_map.svh file. But in cluster_bus_wrap.sv there is something called ext slave with address as

start_addr: cluster_base_addr + 32'h0040_0000, end_addr: 32'hFFFF_FFFF

Now if I add my IP, what address range can I use? and also should I add this address anywhere in pulp_soc or soc_interconnect_wrap.sv ?

Thank you