FPGA Forth machines
LoopyByteloose
Posts: 12,537
When I look into FPGAs for Propeller 1 or 2 replicas, I cannot help but wonder if there is any interest in creating an alternative that uses Forth CPUs rather than Cogs that require SPIN and PASM.
My great enthusiasm for Forth on the Propeller comes about by having 8 CPUs share come i/o and a common Forth dictionary access. It just seems to me that one might completely eliminate the using PASM by providing a different kind of CPU architecture. There already are Forth CPUs in FPGA that have proven themselves, and actually provide excellent speed performance.
I do realize that is a big fork from the current evolution from Propeller1 to Propeller2, but I am asking is it at all worthwhile and valid.
My great enthusiasm for Forth on the Propeller comes about by having 8 CPUs share come i/o and a common Forth dictionary access. It just seems to me that one might completely eliminate the using PASM by providing a different kind of CPU architecture. There already are Forth CPUs in FPGA that have proven themselves, and actually provide excellent speed performance.
I do realize that is a big fork from the current evolution from Propeller1 to Propeller2, but I am asking is it at all worthwhile and valid.
Comments
Even a hybrid may be possible, where the innermost loop of Forth, could become a couple of new opcodes.
That would allow easy incremental testing.
Go for it, Loopy! Grab yourself a BE Micro or a Nano-DE0 and just into the FPGA waters. Either of those should be able to support a P1VF (That would be a Propeller 1 / Virtual (Forth)) variant. I'm sure folks will jump in the pool once they see you haven't been eaten by any sharks!
I know I would! I found the J1 Forth verilog very interesting! While I am not a Forth programmer, I admire its elegance! A multi-Forth cpu would be neat to see!
Hopefully, this concept doesn't offend the Propeller2 developers as it veers off in a separate direction. We really have two potential FPGA groups with very different abilities -- Experimenters and Developers.
As for the Forum FPGA folks, they go off in all directions. I don't think tehy will be any more offended than running Forth on a propeller upset tehir sensibilities on any normal day.
The BE Micro CV or Max 10 could be interesting since now there is a P1V with 2M of hub and potentially 8M of hub - that would be a glorious space for a Forth dictionary!
It looks like I may have to order an FPGA from the USA to get anything up-to-date, even though there is an Arrow office just 5 minutes from my home in Kaohsiung. Apparently, they may not have a retail inventory.
The Nano-DE0 from Parallax is competitively priced for those of us that can't get an academic discount. And I suppose I could add in a few other Parallax items I desired.
While I am sorting out what to buy from the USA (shipping seems to always double my cost), I have been studying the J1 Forth article and the actual Verilog code. I am also happy to see it is in part based on eForth, which I have studied in the past and decided I particularly liked.
I am going slow as I do have a lot to learn about Verilog. The more I read, the better I get an idea of what I might expect from what I buy.
That targets NIOS on the 10M50, and the MAX10 MHz numbers I've seen for NIOS have been quite high.
https://www.altera.com/products/boards_and_kits/all-development-kits.html#
There was a hint of a ~$100 10M50 Board, but not sure where that has gone...
Then, there is the BeCMiroCVA9 for ~ $150 with a quite grunty FPGA - that one is P2 capable.
Depends what else you want to use the board for, in future.
An appeal of MAX10 is there are small ones available, making something like P1 and Max10xx a Practical pairing.
So I guess I am all in for BeMicro CVA9. Shopping FPGAs is a bit daunting. Altera sells the chips to others that create a wide array of Development Kits, so one has to seek out an Altera partner that is aligned with one's personal goals. Arrow Electronics and the BeMicro devices seem to be a good fit for me. But others might be more comfortable with Parallax's own Propeller 1-2-3 board and the fact that you can talk to other users that have the same.
++++++++
On the Forth side of things, I went shopping for a copy of 'eForth and Zen' by C.H. Ting, but found a lot of broken links. So I finally went to C. H. Ting's own website and was delighted to find that I could order a copy of the book for $15 as an eBook (to be received via email).
http://www.offete.com/library.html
This is quite important as C. H. Ting created a version of Forth ideally suited for this FPGA application as it was limited to 32 or less machine instructions. With the addition of a binary installed in RAM, you get very close to ANSI 83 Forth. One needs to use this book as a reference (or he code for eForth on various platform) to actually have a complete Forth.
Looking into the four short pages of J1 explanation, it seems a bit unclear how the full Forth language is included. So one needs to become knowledgible of eForth via other examples.
The CV A9 should be incredibly spacious (a great lot more than a CV) - you will be able to do much. I don't think you will be alone when it comes to forum member that have CV-A9 boards.
Quartus II is a pig of a download, the Latest Linux .tar file is 5.9GB. I'm not sure how you are set up for bandwidth but you may want to start downloading now! ) I haven;t looked for ALtera and Quartus but Xilinx made CDs available if you did not want to download but could wait for a CD to be delivered.
Thanks for the link to the eForth ebook - that looks interesting and I'm sure will be added to the library very soon now.
Shipping to Taiwan was $44.00USD for all of it, and would likely have been the same for just one item.
And on the Forth side of things, I have downloaded the Propeller 1V FPGA files which will likely be my foundation for a modified Cog CPU to target Forth Asm of some sort instead of SPIN and PASM.
I am not 100% the J1 Forth machine is really useful for a eForth scheme to generate an ANSI Forth from 32 or less assembler instructions. But that is exactly what I am targeting to learn. And as a conceptual bridge, I will be relying on Dave Hein's pfth version 0.83. I was happy studying that code in PASM before, so I am going to get back into it.
One more shopping task, a copy of 'eForth and Zen' by C.H. Ting. I did previously download a free version, but the file has some sort of corrupted file formating. I have several other shorter documents by him that have been very useful, but there may come a point where the complete text is an invaluable reference.
Lots to study and explore.
Based on your stories of shipping, it sounds like you chose wisely!
There are a lots of paths to head down with the actual implementation - it will be interesting to see which route chooses you.
My shopping excursions were a bit frustrating as usual. I seem to always have to import 'the good stuff' to Taiwan, even when we have it made here and have a local office. In this case, the Kaohsiung Arrow office is so near my home that I could kick the door in and return home in less than 3 minutes.
But one just has to accept the global corporate way... nothing gets purchased without a few thousand miles of air travel.
++++++++++++
I really don't have much of a clue about FPGAs... I am a complete novice. But the siren call is strong and I have a gut feeling that I may have one of these two devices end up doing something very different... like cloning a MOOG synthesizer.
They open up a lot of regions to imagination that simply pondering C and Assembler can never reach.
But for now, a dedicated Forth CPU in a Propeller Cog, I/O, and Hub RAM scheme is foremost.
So it seems you don't know
http://www.wulfden.org/downloads/Forth_Resources/
this helped me a lot when I started with FORTH on the Prop
http://www.wulfden.org/downloads/Forth_Resources/
this helped me a lot when I started with FORTH on the Prop
You may need to edit the hyperlinking, it ended up with some extras as http://www.wulfden.org/downloads/Forth_Resources/http://
One of the most absurd cases I read about was that fresh fish would be airlifted all the way from Norway to China, packed, and shipped back.. according to the newspaper which wrote about it the people involved defended the practice because it was 'cheaper'. Well, I don't buy old fish.. I don't know how something like that can work in the long run.
-Tor
One of the most absurd cases I read about was that fresh fish would be airlifted all the way from Norway to China, packed, and shipped back.. according to the newspaper which wrote about it the people involved defended the practice because it was 'cheaper'. Well, I don't buy old fish.. I don't know how something like that can work in the long run.
-Tor
North sea shrimps goto Marocco for pealing ... before they end up in Europe supermarkets ...
and more such things going on.
So it seems you don't know
http://www.wulfden.org/downloads/Forth_Resources/
this helped me a lot when I started with FORTH on the Prop
Well, www.wulfden.org certainly has a good library that I somehow couldn't locate.
I have a copy of eForth Overview, also by C.H. Ting and that is a very very useful document -- must read status. It provides a vision of how compact code can be.
In any event, while I do like to save money by getting Free Downloads, C. H. Ting has contributed so much to eForth that I am more than happy to pay $15 USD for a good 2ed copy of 'eForth and Zen' directly from the author.
STATUS --
1. At this point the 'eForth and Zen, 2ed.' arrived in pdf format and is good to go -- even in Linux which Adobe no longer supports Adobe Reader for pdf. I have to use the non-Adobe pdf reader.
2. And all my stuff from Arrow Electronics seems to have cleared credit card payment and awaiting shipping and a tracking number.
3. Downloaded a Verilog Tutorial in pdf that is a few hundred pages.
4. Located my printout of Dave Hein's pfth ver 0.83 pasm code.
so.... I have a lot to puzzle through, but suspect that all the elements are included if I can just figure out Forth architecture, Verilog code, and how to bridge what has already been done in Forth on the Propeller 1 into the Propeller 1V fpga code.
I found this on Haskell's FC16 FPGA Forth. (just something for the library)
There may be others that are better. I just wanted something that I could have a downloaded pdf as reading HTML annoys me.
I do see a reoccurring problem with Forth pdf downloads that the right margin may be clipped, so words are cut in half or missing on that margin. If the document is short, I can usually work with it. But for long documents it gets to be too much.
Sadly, "eForth Overview" in pdf at wulfden site is one that is clipped, and it is 39 pages long. I have my own clean copy that was acquired elsewhere in HTML and converted to PDF by myself. Just printing directly from an online HTML is likely why the right margin problem.
I need to see what it looks like in an "Official" Adobe PDF reader.
EDIT: The eForth overview document looks identical whether in official Adobe
Reader XI or in Document Viewer. At least in the case of this document,
the right margin is really trimmed by 1/2 character.
About the only frustration I have with not using Adobe Reader is the USA Treasury Department has required I file a document created in Adobe Reader and so I actually have to use a Windows or Apple systems to comply with their rather nasty law for overseas Americans.
But it has made me wary about a coming fork in reading PDF documents. In Linux, I get an nasty message that what should be a generic PDF requires Adobe Reader.
The clipping seems to be a problem in conversion from HTML to pdf, not an Adobe Reader issue.
OK, I'm confused (as usual).
I click on the eForth PDF at Wulfden and it opens up in my FIrefox browser as a PDF document and looks great (slight 1/2 character clipping on right). I decide I like it and want to keep a copy, so I click the save icon in the PDF document's menu bar (not the browser menu bar) and it gives me a save icon adn does its business. I click on the PDF document from where I saved it and (in my case), Document Viewer pops open in Gnome displaying the document and it looks fine.
No place was any HTML to PDF conversion done or expected or required. It's PDF through and through.
As for creating ADOBE only PDFs, I can't respond to that.
Recently I had to fill in some PDF forms, what a pain.
I discovered I could open those forms in inkscape and add text to the form fields. It's a bit clunky but does have the side effect that you can resize the form fields to fit what you want to write into.
But the Department of Treasury for decades has required any U.S. citizen that has overseas bank accounts or stock accounts over $10,000USD to file a form directly to them. Two years ago, they changed from accepting the form on paper, to an automated electronic filing system that uses Adobe software to provide the form with an 'electronic signature' instead of a handwritten one.
The new FBAR system will not provide a Linux compatible pdf after you file, only Windows or Apple OSes with Adobe Reader.
http://www.treasury.gov/services/Pages/TD-F-90-22.1-Report-of-Foreign-Bank-and-Financial-Accounts.aspx
http://bsaefiling.fincen.treas.gov/main.html
The first year, I got a copy from them and printed out a copy to file. At the time, I had to download and install Adobe Reader for Linux.
The second year, it appears that my updating of my Linux removed the Adobe software and it was no longer available. So when I filed this year, what I downloaded as a copy of my 'signed document' just gave me a nasty notice that my PDF was not Adobe Reader.
To add to the bizarre... the Treasury Department allows only one download and I didn't save the file as I was flustered. So I don't have a reference copy for my records, and they say I should refile an 'amended form' on a Windows machine to get a file copy.
++++++++++++++
Regarding the HTML versions....
It appears Wulfden downloaded originals from no longer available links or sites and converted the HTML documents there into PDF versions.... imperfectly.
I did the same thing, then went back and download the HTMLs, opened them in OpenOffice, and reformatted to get clean PDF.
Where are those HTML versions? Likely gone for good. People grow weary of maintaining low traffic websites. And it seems that Forth is suffering from obscurity.
I find it appalling that the US treasury has any interest in US citizens who have been living outside the US for ages, but that is another story.
Yeah, sadly websites die all the time for all kind of reasons.
The topic of this thead is a Propeller-like Forth constructed in FPGA.
I began to mention the formating issues because getting some of the classic Forth articles is awkward.
Regarding overseas Americans and what the USA requires of them is simply political. And I would rather not get this thread closed by a rabid discussion of what should and should not be.
I was merely dumbfounded by Adobe Reader pulling out of Linux and being involved in creating some sort of new PDF that won't work in Linux. We may find in the future that sharing some documents in PDF will actually require proof of identity to be able to read.
++++++++++
Enough said, please let this thread live for its original goals.