pulp-platform / pulp_soc

pulp_soc is the core building component of PULP based SoCs
Other
78 stars 81 forks source link

Zfinx patch on latest SoC version #34

Closed luca-valente closed 3 years ago

luca-valente commented 3 years ago

Hi! :)

Stemming from master, I had a patch on Zfinx for the FC core. Now is a parameter in input to the SoC and is put =1, in this way the floating point RF is neither instantiated nor used. Having Zfinx=0 causes all FP operations of executed by the FC to fail: the compiler works to support the Zfinx extension (Zfinx=1), hence it never loads any value in the fp register file but the FC doesn't know it (Zfinx=0) and fetches trash values from the FP reg file, causing FP op to fail. But I guess that no one had recently tired FP ops on the SoC.

I tried it with the tests that you'll soon see in regression_tests and it works, along with the modifications Michael did on Pulp to bump to version 1.4.0. So, if you do not find errors, if could please merge this into master and tag as 1.4.2 that would be great.

Let me know in case there are any problems!! Luca

bluewww commented 3 years ago

Hi! :)

Stemming from master, I had a patch on Zfinx for the FC core. Now is a parameter in input to the SoC and is put =1, in this way the floating point RF is neither instantiated nor used. Having Zfinx=0 causes all FP operations of executed by the FC to fail: the compiler works to support the Zfinx extension (Zfinx=1), hence it never loads any value in the fp register file but the FC doesn't know it (Zfinx=0) and fetches trash values from the FP reg file, causing FP op to fail. But I guess that no one had recently tired FP ops on the SoC.

That is not true, we run fp loads all the time in the PULPissimo ci and some pulp forks. Also whether fpr are mapped to gpr or not is a compiler setting (xgap9 vs other). Anyway this is still a bug since the zfinx parameter is not accessible/configurable. Thanks!

I tried it with the tests that you'll soon see in regression_tests and it works, along with the modifications Michael did on Pulp to bump to version 1.4.0. So, if you do not find errors, if could please merge this into master and tag as 1.4.2 that would be great.

Let me know in case there are any problems!! Luca

luca-valente commented 3 years ago

Now it is perfect. I had some issues with tab + gedit, now it is fixed :)

Anyway, that was a bug to me as I used hte standard pulp-runtime without setting anithing in the compiler and tought that no one was actually using the SoC. My bad!! However it is good to have it parametrized anyway.

thanks for your time!!

bluewww commented 3 years ago

thanks for the patch