cambridgehackers / connectal

Connectal is a framework for software-driven hardware development.
MIT License
159 stars 46 forks source link

DataBusWidth=256 support #186

Open RadhikaG opened 2 years ago

RadhikaG commented 2 years ago

For our accelerator design interfaced with Connectal, we've temporarily downgraded our interface to work with DataBusWidth=128 (it used to work with DataBusWidth=256 at some point with some ancient branch of Connectal and closed-source Bluespec...).

What's the best way to get DataBusWidth=256 working again? Is there a particular branch I should be looking at, or some patches I need to apply?

Tool versions

jameyhicks-cmt commented 2 years ago

If you know which version of Connectal and Bluespec it was working with, that would help in finding a solution.

threonorm commented 2 years ago

Hi @RadhikaG @jameyhicks-cmt ,

On the previous version of the design that @RadhikaG is working on, I just remembered that I was actually not using upstream connectal, but Shuotao's fork: https://github.com/xushuotao/connectal

(Sorry Radhika, I just remembered that yesterday, I had forgotten about it)

That version of connectal + some version of open source bluespec + vivado 2019.*, was allowing to compile the design with 256 width, I believe. But I am not sure it would still work.

RadhikaG commented 2 years ago

ref xushuotao's fork: we were using that up till very recently; 256-width was not compiling with that either, it gave me the error below (the same one as issue #185):

Error: "<path>/connectal/bsv/PcieHost.bsv", line 87, column 8: (T0031)
  The provisos for this expression could not be resolved because there are no
  instances of the form:
    Add#(0, 16, 32)
  The proviso was implied by expressions at the following positions:
    "<path>/connectal/bsv/PcieHost.bsv", line 88, column 26
Error: "<path>/connectal/bsv/PcieHost.bsv", line 127, column 4: (T0031)
  The provisos for this expression could not be resolved because there are no
  instances of the form:
    Connectable::Connectable#(ClientServer::Server#(PCIE::TLPData#(16), PCIE::TLPData#(16)), ClientServer::Client#(PCIE::TLPData#(32), PCIE::TLPData#(32)))
obj/Makefile:384: recipe for target 'obj/PcieHost.bo' failed

I moved onto upstream connectal master, since Shuotao's fork was giving us trouble with open source bluespec (which makes sense since the fork is relatively old) and I saw that current master supports the vcu118 as well.

Really what I'm trying to figure out, is whether this issue is related to missing libraries on the open source bsc/bsc-contrib side (I'm suspicious of this, since we've encountered missing libraries before in issue #185), or something I'm missing on the connectal side (less suspicious of this, since neither xushuotao's fork nor upstream connectal are compiling for 256-wide PCIe right now and xushuotao's fork used to at some point). The error above can be reproduced by compiling examples/memread256 or examples/memwrite256.

jameyhicks commented 2 years ago

I'll review Shuotao's branch and see if I can merge it in. I'll also look at my databuswidth256 branch for relevant changes.

On Wed, Nov 10, 2021 at 11:54 AM Radhika Ghosal @.***> wrote:

ref xushuotao's fork: we were using that up till very recently; 256-width was not compiling with that either, it gave me the error below (the same one as issue #185 https://github.com/cambridgehackers/connectal/issues/185):

Error: "/connectal/bsv/PcieHost.bsv", line 87, column 8: (T0031) The provisos for this expression could not be resolved because there are no instances of the form: Add#(0, 16, 32) The proviso was implied by expressions at the following positions: "/connectal/bsv/PcieHost.bsv", line 88, column 26 Error: "/connectal/bsv/PcieHost.bsv", line 127, column 4: (T0031) The provisos for this expression could not be resolved because there are no instances of the form: Connectable::Connectable#(ClientServer::Server#(PCIE::TLPData#(16), PCIE::TLPData#(16)), ClientServer::Client#(PCIE::TLPData#(32), PCIE::TLPData#(32))) obj/Makefile:384: recipe for target 'obj/PcieHost.bo' failed

I moved onto connectal master, since Shuotao's fork was giving us trouble with open source bluespec (which makes sense since the fork is relatively old) and I saw that current master supports the vcu118 as well.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cambridgehackers/connectal/issues/186#issuecomment-965541748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASTPM4TPMX6TVQNBJ7OOWLULKPU5ANCNFSM5HYFS3SQ .

RadhikaG commented 2 years ago

(to be clear, I personally never got Shuotao's branch working with closed source bluespec for DataBusWidth=256 for the vcu118 since I don't have access to closed source Bluespec; I just know that @threonorm got it working at some point)

jameyhicks-cmt commented 2 years ago

I think there are two sets of changes missing. Shuotao's branch has Ultrascale PCIE3 support and some level of DataBusWidth=256 support. The databuswidth256 branch enables full transfer rate.

jameyhicks commented 2 years ago

Please try this branch: https://github.com/cambridgehackers/connectal/pull/187

@RadhikaG I could add you as a reviewer if you like.

jameyhicks commented 2 years ago

I haven't looked at the file, but probably should be using https://github.com/GaloisInc/BESSPIN-BSC/blob/master/src/lib/BSVSource/Xilinx/XilinxVirtexUltraScalePCIE.bsv on UltraScale devices.