FPGARelated.com
Forums

Dual-stack (Forth) processors

Started by Davka February 16, 2004
Bengt Larsson wrote:

> Outlook Express is crap as a newsreader. I could go on and on about > it, but I bet you didn't know.
What's a good newsreader? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin Euredjian To send private email: 0_0_0_0_@pacbell.net where "0_0_0_0_" = "martineu"
"Martin Euredjian" <0_0_0_0_@pacbell.net> wrote in message news:<TTdZb.27845$9j2.1957@newssvr25.news.prodigy.com>...
> Davka wrote: > > > Is there a community that is actively involved in discussing and/or > > developing FPGA-based Forth chips, or more generally, stack > > machines?
Davka asked about FPGA-based Forth chips. He has a right to have an interest and ask a question, but he probably also expected some of the usual flame bait in response.
> I've thought about this in terms of internal use. As much as I like FORTH > (used it extensively in the 80's and early 90's) the reality seems to be > that C is the way to go.
The subject of the question was about FPGA-based Forth chips. The reason from the question is that they are a good fit to FPGA as they can provide higher performance with fewer gates than many other designs, especially when used as the control processor to interface to other user defined custom circuitry in an FPGA application. Given that Davka obviously knows this already and is interested in using some language on an application that may include a dual-stack (Forth) processor in an FPGA he really didn't ask if he should just give up the idea because it is not what everyone else is doing. Given the context it seems strange to suggest that 'the reality seems to be that C is the way to go.' That sounds rather strange since he asked about a particular type of FPGA-based dual-stack (Forth) chip. Are you suggesting that C would be a better choice for the software for this type of chip than Forth? What C compiler will produce better code for a Forth chip than Forth? I realize that you were probably just trying to flame Davka and trying to change the subject from asking about where people can discuss the subject of dual-stack (Forth) processors and make it clear that you don't like that subject broached in any of the above newsgroups. But after all, it wasn't cross posted to c.advocacy etc. If you stick to the technical details that Davka was interested in you find lots of examples of very small dual-stack processors implmented in programmable gate array that had very high performance. In 1988 it was 50 mips on a 32-bit processor in PGA when Intel was selling full custom VLSI 80286 that got substantially less. And today's FPGA are pretty cheap, fast, and/or big compared to what was available sixteen years ago.
> It's a matter of the business equation more than a technical > rationalization.
What do you know about Davka's business plans regarding his use of dual-stack processors in FPGA? I suspect that you know nothing about it and were just trying to change the subject to popularity. I think he asked because he was interested in technical details on the subject, not in lectures about your idea of business equations or popularity comparisons.
> FORTH is very cryptic for non-FORTH programmers and
Duh. (insert programming language name) is very cryptic for non- (insert same programming language name) programmers. C is very cryptic for non-C programmers. The average person is not a programmer and can't read C programs. Should we conclude that because that is what the majority of people think of C that everyone who uses C should stop using a language that is cryptic to people who haven't learned it? Duh. (APL is so cryptic looking to non-APL programmers that it looks like it came from outer space! Take over the world? ;-)
> finding skilled FORTH programmers is not as easy as C programmers.
Duh. Finding skilled (insert language name) programmers is not as easy as (insert other language name) programmers. The keyword there is skilled. Sure, not all programmers in a given language are really the ones who are labeled skilled. The qualifier makes the statement language independent. It is easier to find C programmers than programmers of languages used by smaller numbers of people. Duh. But after all this thread was about Davka's interest in finding people who could rationally discuss the design and use dual-stack processors implemented in FPGA. I don't think that this group of people is going to be larger than the group that includes skilled and unskilled C programmers. It really has nothing to do with what he asked about.
> And, > while productivity with FORTH can be substantially greater than with C or > Assembly,
It is interesting that you think Forth can be substantially more productive than C or assembly. Not everyone would agree with you, but in the context of the software that Davka will use with a dual-stack processor in FPGA it certainly seems like a quite reasonable statement. Maybe you were just baiting.
> you are, eventually, forced to contend with code maintenance, > reuse and changes in design teams (Oh, no! Our only FORTH guy left!).
Davka may be only guy involved in his work, he may have a team of people, and after all he only asked were to find people who knew about the subject. He didn't ask if Forth was more popular than C in systems written in C or with programmers who prefer C. Maintenance is generally more of an issue of code quality than anything else. There are plenty of unskilled programmers who have written, and will continue to write, code that is hard to maintain because it was baddly written in the first place. That certainly includes C and Cobol and assembler and Forth or whatever. As you say not all programmers are skilled programmers. Well written Forth programs are as easy to maintain as any other well written programs. Some consultants who use Forth complain that they have to keep it a secret because if they tell the client that their well written program was written in Forth they won't be called in to do the maintenance, even the non-technical vice-president can read and modify their code if they know it is written in something as easy as Forth. In the cases where development 'productivity with Forth can be substantially greater than with C or Assembly' any maintenance productivity comparison would hopefully be similar. Of course there are always examples of bad and unmaintainable code being written in any language. Often unskilled programmers point to their own code as examples of code that they wrote but other people had difficulty understanding or maintaining. That is really a skill issue, or a managment issue more than a language issue. Best Wishes, Jeff Fox
Jeff Fox wrote:

> Davka asked about FPGA-based Forth chips. He has a right to have > an interest and ask a question, but he probably also expected some > of the usual flame bait in response.
<SNIP> Jeff, Very good post. Please rest assured that my posts were made with the best of intentions and "flame baiting" isn't even close to anything in my life. I don't know which of the newsgroups you have read this from. I'm a frequent participant in comp.arch.fpga and folks in that NG can tell you that I'm not some kid getting off by starting controversy. Hell, I'm not even a kid! Anyhow. Maybe I got off topic with my detour into the business issues involved. I'm sorry for that. I simply wanted to point out that there are issues --business issues-- with regards to using Forth (or APL, or whatever) in your work. Of course, nothing anyone says in these NG's is universally applicable. It is left to the reader to decide whether or not to attach validity and/or waste any time pondering what was said. My own perspective is that, while I would love to use Forth for my work, I have not found that the effort required jusifies the excercise. You can almost say the same thing about assembler. You can't make such statements without explaining why. My reasoning has to do with non-technical issues. With the realities of business. Regarding using C with an FPGA. Implementing something as simple as an 8051 core opens the door to using a large number of C compilers, tools, libraries and capable programmers to write your control code. If efficiency or execution speed (in the context of an FPGA) is paramount, maybe a custom state-machine solution makes more sense. All of these options have advantages and disadvantages, of course. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin Euredjian To send private email: 0_0_0_0_@pacbell.net where "0_0_0_0_" = "martineu"
Martin Euredjian wrote:
> Regarding using C with an FPGA. Implementing something as simple as > an 8051 core opens the door to using a large number of C compilers, > tools, libraries and capable programmers to write your control code.
I wonder how someone can call the 8051 "simple". On my last task, we had an 8051 (customer choice), which took about 3000LEs on an Altera FPGA (I think that's even more than the 32 bit NIOS core takes ;-). Being less than happy about that, I developed a simple Forth processor in a few days (see www.b16-cpu.de), which did fit into about 600LEs. This is a 16 bit processor, and much faster than the 8051 (but too late to convince our customers). Recently, I stripped down a few not absolutely necessary features such as fast divide and add, and fast mem-mem copy, and now I'm at about 300LEs with the simplified version (for the current project, where the customer wantet a "state machine"). I'm also working on a GCC backend, but it looks like GCC 3.5's SSA tree representation will make the job much simpler to generate stack code than going through the machine description aproach. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/
Bernd Paysan wrote:

> I wonder how someone can call the 8051 "simple". On my last task, we had > an 8051 (customer choice), which took about 3000LEs on an Altera FPGA > (I think that's even more than the 32 bit NIOS core takes ;-). Being > less than happy about that, I developed a simple Forth processor in a > few days (see www.b16-cpu.de), which did fit into about 600LEs.
I can buy a core today and have any 8051 code running in it tomorrow. That's simple. Even better. If I have a design that uses an external 8051 and need to reduce BOM cost (and have FPGA resources) I can buy a core and fold the processor and peripherals into the FPGA with little if any changes to the 8051 source code. Again, that's simple. And, BTW, I have exactly that situation in one of our designs right now. Simple isn't always smaller, faster, cheaper, less LE's, etc. "Simpler" is defined by the application and the circumstances at hand. Now, to address your 600 vs. 3000 LE comparison. Well, of course, if you have a constraint that does not allow you the luxury of a 3000 LE processor you have to look elsewhere. This might mean adopting something like a small Forth CPU implementation (such as yours), a small state machine or simply moving the processor off-chip. I mean, these days, for two bucks you can put a tiny 25+ MHz (Cygnal and others) processor on a board. So, yes, context is important, of course. In your context your choice made perfect sense. No question about it. Now, in these days of 6 million gate FPGA's it might be OK to trade device utilization for time to market, flexibility, portability or other parameters. Of course, each project is different. Each company is different. Each designer is different and each circumstance is different. You have to keep an open mind. That's all. The other interesting choice today is V2 Pro. You might, for example, want to use one to take advantage of the high-speed serial I/O capabilities and, as a result, have free PowerPC processors ready to blast away. BTW, your b16 looks to be very useful and compact. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin Euredjian To send private email: 0_0_0_0_@pacbell.net where "0_0_0_0_" = "martineu"
Martin Schoeberl wrote:
>>Is there a community that is actively involved in discussing and/or >>developing FPGA-based Forth chips, or more generally, stack >>machines? >> > > > Tha Java Virtual Machine is stack based. There are some projects to > build a 'real' Java machine. You can find more information about a > solution in an FPGA (with VHDL source) at: http://www.jopdesign.com/ > > It is sucessfully implemented in Altera ACEX 1K50, Cyclone (EP1C6) and > Xilinx Spartan2. > > Martin
Does anyone know of efforts on a FPGA design for .NET bytecodes ? Any numbers on how much resource it would need, and how that might compare with a Java machine (or Forth one, for that matter..) ? -jg
> What's annoying about bottom posting?
I have to scroll down to find out if you said anything interesting, and then, half the time it's just a "me too" type comment. If I jump to the end and discover that you didn't just say "me too", then I have to go back to the top and search forward to find out if you inserted something interesting rather than dumping everything at the end. Top vs bottom posting is a perpetural source of flames on usenet. In my opinion, the key is to trim the stuff that isn't directly relevant to what you are responding to. After that, the top/bottom part is lost in the noise and you will probably insert your text in a reasonable place. Top "posting" may be good in an office context where new people get cc-ed and need the previous context. It gets pretty silly in the usenet context when the discussion gets about 6 layers deep and everybody has seen the first N-1 layers several times already. (But then, it might help the poor sucker on a brain-damaged news server that drops 50% of the articles. But he's probably got other troubles.) On usenet, where I do have the context, I find it very annoying. The anti-top posters have many good sig lines. A few examples: A. Top posters. Q. What is the most annoying thing on Usenet? A. Because it destroys the natural flow of conversation. Q. What's wrong with top posting ? -- The suespammers.org mail server is located in California. So are all my other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. I hate spam.
hmurray@suespammers.org (Hal Murray) writes:

>> What's annoying about bottom posting? > > I have to scroll down to find out if you said anything interesting, > and then, half the time it's just a "me too" type comment. If I jump to > the end and discover that you didn't just say "me too", then I > have to go back to the top and search forward to find out if you > inserted something interesting rather than dumping everything at the end. > > > Top vs bottom posting is a perpetural source of flames on usenet. > > In my opinion, the key is to trim the stuff that isn't directly > relevant to what you are responding to. After that, the top/bottom > part is lost in the noise and you will probably insert your text > in a reasonable place. > > > Top "posting" may be good in an office context where new people > get cc-ed and need the previous context. It gets pretty silly > in the usenet context when the discussion gets about 6 layers deep > and everybody has seen the first N-1 layers several times already. > (But then, it might help the poor sucker on a brain-damaged > news server that drops 50% of the articles. But he's probably > got other troubles.) On usenet, where I do have the context, > I find it very annoying. > > > The anti-top posters have many good sig lines. A few > examples: > > A. Top posters. > Q. What is the most annoying thing on Usenet? > > A. Because it destroys the natural flow of conversation. > Q. What's wrong with top posting ?
Perhaps the problem isn't top- or bottom-posting per se, but that the quoting method used is inconsistent. If folks are careful to ensure the "Tom says:" lines are properly maintained and use the same quote character and indentation style, either posting style is fairly easily- parsed, in my opinion. -- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Martin Euredjian wrote:

> The other interesting choice today is V2 Pro.
Could you give a link for that? See you, Uwe
"Uwe Klo&#4294967295;" wrote:

> > The other interesting choice today is V2 Pro. > > Could you give a link for that?
www.xilinx.com Look at the Virtex II Pro family of devices. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin Euredjian To send private email: 0_0_0_0_@pacbell.net where "0_0_0_0_" = "martineu"