zuloloxi / mecrisp-ice

http://mecrisp.sourceforge.net/ Mecrisp-Ice is an enhanced version of Swapforth and the J1a stack processor by James Bowman, featuring three MSP430 style IO ports, a tick counter, constant folding, inlining and tail-call optimisations
BSD 3-Clause "New" or "Revised" License
28 stars 4 forks source link

Comments on the version from sourceforge #6

Open PythonLinks opened 1 year ago

PythonLinks commented 1 year ago

So downloaded the version from source forge, and am reading through it. Here are some comments.

First of all there is a lot more gorgeous stuff in here than I at first realized.

The readme includes details about the individual boards, that would be best in each board's directory.

One board's license file clearly said FreeBSD hardware, GPL Software. That should be moved to the top level. Otherwise it is easy to think the whole thing is Freebsd licensed.

So one needs a terminal to talk to the boards or to the simulated cpu. Not quite clear what is being used. In due course I will figure it out, but it would be helpful if it were upfront.

I quite like how each board gets a separate directory. It would be good to briefly mention all of the boards that this runs on, at the top level read me.

Rumor has it that this is going into some major applications. Citing that in the read me would give you much credibility. The badge one also gives a lot of crediblity.

It would be good to pull the definitions of the forth words out of the readme, and put them in a separate file.

In the read me, it would be great to list all of the boards you do run on. I had not realized how many it is.

Not quite clear what software I need to download to run the simulator and the synthesizer. Maybe it was listed somewhere. Simulator is probably just Verilator and C++, synthesizer is more complex. Particularly since there was the old software that Yosys worked with, and the new version that runs with more chips.

I will say one more thing. Somehow I find the process of firing up these tools quite scary. And having said that, I now understand why. I am not sure if I can do this on Mac OS X, or if I have to use Linux.

I am also worried, that when I fire up the synthesiser, it just will not work. I think maybe firing up a blinking light with these tools is what I need to do first. You may want to suggest something like that also.

And of course i am waiting for my board to arrive, watching as it inches its way across the world. So no great rush here.

The warning about the limited memory on Ice40, was most helpful, that should be highlighted, got quite missed when I first read the read me. All the more reason to pull things out of the read me.

And maybe the KNOWN-ISSUES should also go in the read me.

I hope that helps. Overall, my impression from reading the files was that this is way way more evolved than the impression I got from first reading the README.

PythonLinks commented 1 year ago

Here is what the ReadMe for Mecrisp-ice could look like. https://forth.pythonlinks.info/j1-and-mecrisp You are welcome to use what you want from it. Just delete the part about the Hana CPU.

Anyhow my fear is now gone. I have figured out what is what. This is what i need to do.

If you are just getting started with Mecrisp, the first thing to do is to get the tools working. Create a blinking light demo. Once the tools are working for you, get the verilator working, and then proceed to getting Mecrisp working.

And in particular your recommendation of the Icebreaker uses the largest ICE40 chip, the one used by the UPduino, and there is an out of data upduino port of the Mecrisp code, so between the two of them I should be good.

And of course it would be great if you moved off of source forge and onto one of the git repositories, so then I could have just edited the code, and issued a pull request.

Anyhow the bottom line is that the Mecrisp world looks way way more mature than the first impressions suggested.

Oh, and not only does the J1 read one instruction every clock cycle, it also reads or writes to memory every clock cycle. Using the single port memory will probably take more LUTs than the J1 itself uses!

PythonLinks commented 1 year ago

I just returned from a week in stockholm and a presentation on review of Forth soft core processors. People found the talk most interesting, but the corporate crowd in Sweden was not interested in actually using Forth. They liked small stack machines, but not Forth. Really they do not care about minimizing size.

Okay, back to your stuff. I downloaded mecrisp-ice-2.6d/

First comment. it has way way too many directories. humans get confused when there are more than 7 items. So on my version, I created a directory called boards, and moved all the board descriptions into it. Now I can easily see what boards you support. Would make a good slide for my next talk.

Of course that probably messes up all of the links to common-*, so maybe best to just create the Boards directory, and move things over one at a time, as is possible.

A read me in each board directory would be good. takes a while to figure out what all of the files are.

And you have two coredumps in your distribution.

./Verilator/verilator-16bit-quickstore/coredump.hex ./Verilator/verilator-16bit-dualport/coredump.hex

I hope that helps.

PythonLinks commented 1 year ago

So my pico-ice and upduino boards arrived. I published a flashing echo server. It is for debugging the RP2040 pass through. Next up I need to figure this stuff out.

I do not have a high level understanding of what the structure is, what the difference between the different board directories is, and what the process flow is.

Almost the last thing documented on the sourceforge downloaded version is how to build. That was the first thing I was looking for.

The other piece that is missing is the description of what everything is.

Maybe I need to follow your advice and run the simulator first. Maybe that would clear up some of my confusion.

What is not clear is what is required to port to another board.

There is also the unofficial upduino port with a number of modifications.

https://github.com/igor-m/UPduino-Mecrisp-Ice-15kB

Really I just need to read everything a few more times.