On 18/05/10 16:27, Sébastien Bourdeauducq wrote:
On Tuesday 18 May 2010 16:44:24 Philip Pemberton wrote:
I'm not using the Milkymist hardware

Why not? You don't need a big FPGA for that, a small version works on the $39
Avnet Spartan 3A devkit: http://github.com/fallen/milkymist-avnet

Hmm. £35 (though no doubt that's excluding P&P). Not bad for what it is, though how are you supposed to get VGA out of it? An add-on board?

> SDRAM controllers are often a
lot of trouble and I would not be surprised that this execution problem simply
stems from your SDRAM controller not working.

Yep, it's the SDRAMC. Again. I've rejigged the HDL code to use a 64kword block-RAM for the stack and scratchpad, and now the RAM test is passing (but only on the scratchpad area).

Attempting to access the SDRAM seems to frag the CPU. I think I need to put a logic analyser on this thing... It's a shame Chipscope is a pay-for option on Webpack :-/

If this blocks you, it seems older versions of LM32 (like the one in Joerg
Bornschein's soc-lm32) didn't tickle this bug.

Going by the gitlog, it looks like he's *fixed* the bug. Interesting. I wonder what version of lm32 he based his on (and if I could merge his icache/dcache fixes into the current version).

Half the trouble with lm32 is that there's no real "central repository" for all the fixes that have been applied to the core. Which is a shame, really... it just makes it that little bit harder to find the one patch that might help you get an lm32 SoC working :-/

> Somebody ported parts of Milkymist to the Altera DE2 board and
did not encounter significant problems.

I ported the LM32 core and a bunch of Opencores modules across to the Altera DE1, and only had problems with the SDRAM (and most of that was from using a 32-bit SDRAM controller core on a 16-bit SDRAM chip).

Hmm... true. Checking that out, I found out it's just a documentation error.
The positions of the X and U bits are reversed.

That'll be the... 4th error in the LM32 Processor Reference Manual, then (by my count). That document seems to contain more bugs than the average ant farm!

I wasn't aware that LLVM had an LM32 backend...

It doesn't, but the documentation to write one is there and the code is not an
horrible mess (contrary to GCC). Doing so would be an interesting move forward
instead of complaining about GCC's brokenness.

It might make a decent summer project (if I knew even the tiniest thing about writing compilers!) but I'd rather like to get that ICE bug (gcc#43805) dealt with first.

--
Phil.
[email protected]
http://www.philpem.me.uk/
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkym...@freenode
Webchat: www.milkymist.org/irc.html
Wiki: www.milkymist.org/wiki

Reply via email to