corescore icon indicating copy to clipboard operation
corescore copied to clipboard

Corescore on spartan6

Open Martoni opened this issue 4 years ago • 4 comments

I'm trying to add my board opos6ul_sp in the corescore project. but I'm stuck with a $clog2() problem.

ERROR:HDLCompiler:815 - "/…/workspace/build/corescore_0/src/serving_1.0.2/serving/serving.v" Line 42: System function call clog2 is not allowed here
ERROR:HDLCompiler:815 - "/.../workspace/build/corescore_0/src/serving_1.0.2/serving/serving.v" Line 152: System function call clog2 is not allowed here
ERROR:HDLCompiler:598 - "/.../workspace/build/corescore_0/src/serving_1.0.2/serving/serving.v" Line 21: Module <serving> ignored due to previous errors.

$clog2() function is not supported by ISE in local parameters. Have you got a solution for this problem ? Maybe use yosys as ISE-Frontend ?

Is there a fusesoc configuration to use yosys as ISE frontend ?

Thanks

Martoni avatar Aug 04 '20 14:08 Martoni

I found a similar problem here with ISE... just change the "localparam" by "parameter" and everything will work!

samsoniuk avatar Feb 11 '21 05:02 samsoniuk

Was this ever resolved? I could swear also that I had a branch where I added yosys support to the ISE backend but I can't find it now

olofk avatar Jan 12 '22 22:01 olofk

I haven't tested it since. The problem is that ISE doesn't recognize $clog2() function used in serving.v. As ISE is freezed in old version and will not be updated it can't be left as it.

Then to solve the problem there is two solutions in my opinion:

  • change serving.v code to use $clog2() as (global) parameter instead of localparameter
  • Do not use ISE synthesis tool but Yosys.

I think the second solution is the right thinks to do. But I haven't tested it. I have to find time to test yosys with ISE backend.

Martoni avatar Jan 14 '22 07:01 Martoni

I agree. There's not much effort to change it to a a parameter instead of a localparam in serving.v, but the CoreScore rules also say that we must use version 1.0.2 and then it's starting to get a bit more complicated because we need to fork serving. Unfortunately I don't think we can use option 2 right away. I thought I had added support for Yosys synthesis in the ISE backend but I can't find it. Maybe it was a local branch that I removed at some point. It should be added though. Could start by filing an issue about it in Edalize

olofk avatar Jan 14 '22 08:01 olofk