pulp-platform / pulpissimo

This is the top-level project for the PULPissimo Platform. It instantiates a PULPissimo open-source system with a PULP SoC domain, but no cluster.
Other
386 stars 167 forks source link

Accelerator hwme test example stuck #143

Open HarshitSharm-a opened 4 years ago

HarshitSharm-a commented 4 years ago

Hi,

While running an example accelerator test provided in pulp-rt-examples, simulation stuck after one iteration.

hwme_test_stuck

One the other hand, hello world test executes properly. hello world

FrancescoConti commented 4 years ago

I remember that there was some issue with an update to the SDK and to the HWME itself. Unfortunately I don't have time for helping; maybe @anga93 has some code that is working in the current PULPissimo version. Else, you can have a look at the standalone testbench https://github.com/pulp-platform/hwpe-tb

HarshitSharm-a commented 4 years ago

Thanks @FrancescoConti for guiding, I will check the link provided.

HarshitSharm-a commented 4 years ago

I tried running standalone testbench (https://github.com/pulp-platform/hwpe-tb), but still problem persist. Simulation gets stuck in loop. stuck_in_loop

bluewww commented 4 years ago

Can you please open an issue in the hwpe-tb for this? You can then also link back to here.

abuck97 commented 4 years ago

Hi, I was facing the same issue before. I fixed it by updating the version of the IP in Pulpissimo. The hwpe-stream and hwpe-ctrl modules were older and had some bugs in them.

Adding the following lines to ips_list.yml and then rerunning update-ips fixed it for me.

hwpe-mac-engine:
  commit: v1.3
  domain: [cluster, soc]

The proper fix is probably to update the ips_list.yml in the the pulp_soc ip. That one is referencing v1.2 which seems to have some bugs (due to hwpe-mac-engine v1.2 referencing the older hwpe-stream and hwpe-ctrl module)

abuck97 commented 4 years ago

Oh, another change I made was in the hwme.c file to call hwme_trigger_job(); after soc_eu_fcEventMask_setEvent(ARCHI_SOC_EVENT_FCHWPE0);.

I found that the mac-engine finished before it set up the EventMask so the finish signal by the mac-engine was lost forever and the processor was waiting forever for that signal.

msnagar commented 6 months ago

@abuck97 Can you share your code for MAC-engine with hwme_trigger_job();? for simulation

abuck97 commented 6 months ago

Sorry, this was 4 years ago and I don't know where my code is anymore. Versions might also be different and my workaround irrelevant now?

msnagar commented 6 months ago

Oh, another change I made was in the hwme.c file to call hwme_trigger_job(); after soc_eu_fcEventMask_setEvent(ARCHI_SOC_EVENT_FCHWPE0);.

I found that the mac-engine finished before it set up the EventMask so the finish signal by the mac-engine was lost forever and the processor was waiting forever for that signal.

@abuck97 we were trying to run the HWME with ZedBoard but we were stuck at soc_eu_fcEventMask_setEvent(ARCHI_SOC_EVENT_FCHWPE0);.

We also made the changes as you suggested above. However, it wouldn't work on PULP-SDK or FPGA.