Hello,

On Thu, Dec 05, 2013 at 09:13:09PM +0100, S?bastien Bourdeauducq wrote:
> I can reproduce the problem with your sieve.vh. Note that it does not
> actually use the barrel shift instruction - instead GCC emits calls to
> the software implementation __ashlsi3 which is in in libgcc.
> 
> The gateware barrel shifter is however enabled in lm32_config.v. I have
> added the -mbarrel-shift-enabled option to GCC (I use compiler-rt here
> instead of libgcc, and it does not provide ashlsi3), removed -lgcc, and
> recompiled. The test now produces better output:

awesome!

double-win because now the generated code contains a wider variety of
instructions to test.

> I have attached my sieve.vh. I do not use the Lattice GCC binaries, it's
> easier to compile from source:
> https://github.com/m-labs/misoc/blob/master/README#L9

I can verify that it also works with the Lattice GCC binaries. I've added
a comment to my build.sh about building gcc from sources, with a link
to the misoc README. (I did not realize that the lm32 port was in
GCC upstream. If I would have, I probably would not have spend so much
time on the lattice binaries. :)

thanks for the help! now I have to figure out why the yosys FSM extraction
code crashes on lm32..

I'll post a short note as soon as I get lm32 working with yosys.

yours,
 - clifford

PS: Is the problem with __ashlsi3 in libgcc something that should be
reported as a bug to the lm32 gcc people?

-- 
The early bird catches the worm, but the 2nd mouse gets the cheese.
_______________________________________________
Devel mailing list
[email protected]
https://ssl.serverraum.org/lists/listinfo/devel

Reply via email to