Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

(null cookie; hope that's ok)


devel / comp.lang.forth / Hi all, building a Verilog FORTH… but? Why?

SubjectAuthor
* Hi all, building a Verilog FORTH… but? Why?SpainHackForth
+* Re: Hi all, building a Verilog FORTH… but? Why?minf...@arcor.de
|`- Re: Hi all, building a Verilog FORTH… but? Why?SpainHackForth
+* Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum
|`* Re: Hi all, building a Verilog FORTH… but? Why?SpainHackForth
| `* Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum
|  `* Re: Hi all, building a Verilog FORTH… but? Why?SpainHackForth
|   `- Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum
+- Re: Hi all, building a Verilog FORTH… but? Why?Jurgen Pitaske
+* Re: Hi all, building a Verilog FORTH… but? Why?Zbig
|`- Re: Hi all, building a Verilog FORTH… but? Why?SpainHackForth
+* Re: Hi all, building a Verilog FORTH, mem addr example, b16Jan Coombs
|`* Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
| `* Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
|  `* Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
|   +* Re: Hi all, building a Verilog FORTH, mem addr example, b16Brian Fox
|   |+- Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
|   |+* Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   ||`* Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   || +* Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
|   || |`* Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   || | `* Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
|   || |  `- Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   || `* Re: Hi all, building a Verilog FORTH, mem addr example, b16Brian Fox
|   ||  +- Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
|   ||  `* Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   ||   `- Re: Hi all, building a Verilog FORTH, mem addr example, b16SpainHackForth
|   |`* Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
|   | `* Re: Hi all, building a Verilog FORTH, mem addr example, b16Marcel Hendrix
|   |  `* Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
|   |   +- Re: Hi all, building a Verilog FORTH, mem addr example, b16minf...@arcor.de
|   |   `* Re: Hi all, building a Verilog FORTH, mem addr example, b16none
|   |    `- Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
|   +- Re: Hi all, building a Verilog FORTH, mem addr example, b16Myron Plichota
|   `- Re: Hi all, building a Verilog FORTH, mem addr example, b16Lorem Ipsum
+- Re: Hi all, building a Verilog FORTH… but?Matthias Koch
`* Re: Hi all, building a Verilog FORTH… but? Why?Myron Plichota
 `* Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum
  `* Re: Hi all, building a Verilog FORTH… but? Why?Myron Plichota
   +* Re: Hi all, building a Verilog FORTH… but? Why?Jurgen Pitaske
   |`* Re: Hi all, building a Verilog FORTH… but? Why?SpainHackForth
   | `- Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum
   `- Re: Hi all, building a Verilog FORTH… but? Why?Lorem Ipsum

Pages:12
Hi all, building a Verilog FORTH… but? Why?

<755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21675&group=comp.lang.forth#21675

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:4812:b0:398:fec:d89 with SMTP id fb18-20020a05622a481200b003980fec0d89mr69374583qtb.351.1670956311766;
Tue, 13 Dec 2022 10:31:51 -0800 (PST)
X-Received: by 2002:a05:620a:10b4:b0:6fb:f17e:c8f8 with SMTP id
h20-20020a05620a10b400b006fbf17ec8f8mr72780376qkk.404.1670956311498; Tue, 13
Dec 2022 10:31:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 10:31:51 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
Subject: Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Tue, 13 Dec 2022 18:31:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2973
 by: SpainHackForth - Tue, 13 Dec 2022 18:31 UTC

Ok, so I’m learning Forth and Verilog… i’m not proficient in neither, but I like to learn and hack stuff, I built my first module on Verilog as a staring point for a Forth FPGA… https://gist.githubusercontent.com/jemo07/5d5ba7d31bb12410888f46ca6060a1f2/raw/1c597704a9a8f4f99b3e73a3906905ef0f38c358/ProgramCounter.v

This is my cheesy Program counter, I know, don’t laugh… :D.

Ok, while I started this several weeks ago, I have a simple question… what do HW Forth implementations really do? I mean, I understand a picoJava, as it’s executing “bitecode,” and you remove the interpreter as the bite-codes map 1:1 to the Operating Instructions *Opcodes. The JIT in essence becomes the compiler and the code is run native.

Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes. In essence, is all we are saying that when you write native Forth, you are really writing complied code?

I ask this, as I was trying to wrap my head on how to implement the OpCodes for the Forth CPU, and then I was daunted by the fact that you need to, some how compile the words with the outer interpreter to get to the codes words, is that all that is really happening here?

What re the fundamental benefits vs just leveraging a lo cost *$0.50 µCU? Is it the word length? Specially since we are now seen cores running at 200MHz the size of the Attiny and they are 32 bits and also 400/600 Mhz RiscV systems the size of the STM32F4 or smaller… >twice the RAM / FLASH…

I’m asking for my understanding, I’m enjoying learning something like Verilog, maybe even System Verilog… but I just don’t get the logic.

Re: Hi all, building a Verilog FORTH… but? Why?

<7360435d-6f24-4dc1-a8dc-6ccec04fb2afn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21676&group=comp.lang.forth#21676

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:43eb:0:b0:4bb:7ad8:deae with SMTP id f11-20020ad443eb000000b004bb7ad8deaemr70604249qvu.92.1670957484196;
Tue, 13 Dec 2022 10:51:24 -0800 (PST)
X-Received: by 2002:ac8:71d4:0:b0:3a7:f4c7:1bab with SMTP id
i20-20020ac871d4000000b003a7f4c71babmr4506870qtp.517.1670957483986; Tue, 13
Dec 2022 10:51:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 10:51:23 -0800 (PST)
In-Reply-To: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.111.171; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.111.171
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7360435d-6f24-4dc1-a8dc-6ccec04fb2afn@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Tue, 13 Dec 2022 18:51:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1759
 by: minf...@arcor.de - Tue, 13 Dec 2022 18:51 UTC

SpainHackForth schrieb am Dienstag, 13. Dezember 2022 um 19:31:52 UTC+1:
> Ok, so I’m learning Forth and Verilog… i’m not proficient in neither, but I like to learn

With all due respect, you are trying to make too many and too big steps at once.
IOW in your shoes I would first learn to set up and run a Forth system on a small MCU
like Arduinos to get the feeling.

In parallel dive deeper into Verilog, f.ex. by studying this project:
http://mindworks.shoutwiki.com/wiki/Forth_Computing_on_FPGA

Re: Hi all, building a Verilog FORTH… but? Why?

<399af9a3-b040-442c-a28b-b72a56452c55n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21677&group=comp.lang.forth#21677

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:cce:0:b0:6fe:b359:4896 with SMTP id 197-20020a370cce000000b006feb3594896mr14904298qkm.579.1670959155013;
Tue, 13 Dec 2022 11:19:15 -0800 (PST)
X-Received: by 2002:a05:622a:4295:b0:3a6:9c46:828 with SMTP id
cr21-20020a05622a429500b003a69c460828mr23328326qtb.663.1670959154756; Tue, 13
Dec 2022 11:19:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 11:19:14 -0800 (PST)
In-Reply-To: <7360435d-6f24-4dc1-a8dc-6ccec04fb2afn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com> <7360435d-6f24-4dc1-a8dc-6ccec04fb2afn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <399af9a3-b040-442c-a28b-b72a56452c55n@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Tue, 13 Dec 2022 19:19:15 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1602
 by: SpainHackForth - Tue, 13 Dec 2022 19:19 UTC

> With all due respect, you are trying to make too many and too big steps at once.
> IOW in your shoes I would first learn to set up and run a Forth system on a small MCU
> like Arduinos to get the feeling.

Thanks for the Link!
>
> In parallel dive deeper into Verilog, f.ex. by studying this project:
> http://mindworks.shoutwiki.com/wiki/Forth_Computing_on_FPGA

Re: Hi all, building a Verilog FORTH… but? Why?

<b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21678&group=comp.lang.forth#21678

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:91:b0:3a8:9c5:8698 with SMTP id o17-20020a05622a009100b003a809c58698mr764168qtw.18.1670967895994;
Tue, 13 Dec 2022 13:44:55 -0800 (PST)
X-Received: by 2002:a0c:ef85:0:b0:4c7:75c9:e8c8 with SMTP id
w5-20020a0cef85000000b004c775c9e8c8mr13636767qvr.66.1670967895365; Tue, 13
Dec 2022 13:44:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 13:44:55 -0800 (PST)
In-Reply-To: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2605:ba00:4117:fb49:dc48:c7b0:7817:6714;
posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 2605:ba00:4117:fb49:dc48:c7b0:7817:6714
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Tue, 13 Dec 2022 21:44:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4070
 by: Lorem Ipsum - Tue, 13 Dec 2022 21:44 UTC

On Tuesday, December 13, 2022 at 2:31:52 PM UTC-4, SpainHackForth wrote:
> Ok, so I’m learning Forth and Verilog… i’m not proficient in neither, but I like to learn and hack stuff, I built my first module on Verilog as a staring point for a Forth FPGA… https://gist.githubusercontent.com/jemo07/5d5ba7d31bb12410888f46ca6060a1f2/raw/1c597704a9a8f4f99b3e73a3906905ef0f38c358/ProgramCounter.v
>
> This is my cheesy Program counter, I know, don’t laugh… :D.
>
> Ok, while I started this several weeks ago, I have a simple question… what do HW Forth implementations really do? I mean, I understand a picoJava, as it’s executing “bitecode,” and you remove the interpreter as the bite-codes map 1:1 to the Operating Instructions *Opcodes. The JIT in essence becomes the compiler and the code is run native.
>
> Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes. In essence, is all we are saying that when you write native Forth, you are really writing complied code?
>
> I ask this, as I was trying to wrap my head on how to implement the OpCodes for the Forth CPU, and then I was daunted by the fact that you need to, some how compile the words with the outer interpreter to get to the codes words, is that all that is really happening here?
>
> What re the fundamental benefits vs just leveraging a lo cost *$0.50 µCU? Is it the word length? Specially since we are now seen cores running at 200MHz the size of the Attiny and they are 32 bits and also 400/600 Mhz RiscV systems the size of the STM32F4 or smaller… >twice the RAM / FLASH…
>
> I’m asking for my understanding, I’m enjoying learning something like Verilog, maybe even System Verilog… but I just don’t get the logic.

I think you don't understand Forth. Forth has explicit definitions of words that are part of any program you write. Every word is "compiled", or better to say, "defined" before it can be executed. At that point, the Forth "interpreter" can execute any word that has been defined.

It's not clear to me how you might apply the concept of JIT, other than just writing normal Forth code that does compile the program when loading.

As to your Verilog, what are you trying to do with a line like,

temp[7:0] = 8'bzzzz_zzzz;

I'm curious as to what you think this assignment will do in hardware that results from this code.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH… but? Why?

<377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21679&group=comp.lang.forth#21679

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:43d6:0:b0:3a6:a563:36ae with SMTP id w22-20020ac843d6000000b003a6a56336aemr19912252qtn.462.1670970084946;
Tue, 13 Dec 2022 14:21:24 -0800 (PST)
X-Received: by 2002:ad4:4c03:0:b0:4bc:182e:78c2 with SMTP id
bz3-20020ad44c03000000b004bc182e78c2mr67600171qvb.2.1670970084788; Tue, 13
Dec 2022 14:21:24 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 14:21:24 -0800 (PST)
In-Reply-To: <b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com> <b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Tue, 13 Dec 2022 22:21:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1636
 by: SpainHackForth - Tue, 13 Dec 2022 22:21 UTC

>
> As to your Verilog, what are you trying to do with a line like,
>
> temp[7:0] = 8'bzzzz_zzzz;
>
> I'm curious as to what you think this assignment will do in hardware that results from this code.

Not sure how to take your request, it’s just assigning a temp space for register temp… <Size>’<base><number>

Re: Hi all, building a Verilog FORTH… but? Why?

<84b80fd4-f7e1-45be-a0e6-12b204ffb7a3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21680&group=comp.lang.forth#21680

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:46cd:0:b0:6fb:7c45:bd5 with SMTP id t196-20020a3746cd000000b006fb7c450bd5mr84079244qka.304.1670971113311;
Tue, 13 Dec 2022 14:38:33 -0800 (PST)
X-Received: by 2002:a05:6214:205:b0:4e2:cef8:c816 with SMTP id
i5-20020a056214020500b004e2cef8c816mr464828qvt.51.1670971113047; Tue, 13 Dec
2022 14:38:33 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 14:38:32 -0800 (PST)
In-Reply-To: <377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2605:ba00:4117:fb49:dc48:c7b0:7817:6714;
posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 2605:ba00:4117:fb49:dc48:c7b0:7817:6714
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com> <377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84b80fd4-f7e1-45be-a0e6-12b204ffb7a3n@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Tue, 13 Dec 2022 22:38:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2951
 by: Lorem Ipsum - Tue, 13 Dec 2022 22:38 UTC

On Tuesday, December 13, 2022 at 6:21:26 PM UTC-4, SpainHackForth wrote:
> >
> > As to your Verilog, what are you trying to do with a line like,
> >
> > temp[7:0] = 8'bzzzz_zzzz;
> >
> > I'm curious as to what you think this assignment will do in hardware that results from this code.
> Not sure how to take your request, it’s just assigning a temp space for register temp… <Size>’<base><number>

I'm asking an honest question. Verilog is an HDL, Hardware Description Language. It is used to "describe" hardware in terms of it's actions. What exactly do you think that assignment does in terms of an action. "assigning a temp space" has no meaning in hardware.

I'm trying to understand how you are visualizing Verilog. I'm guessing that you don't actually have much understanding of the nature of the hardware produced.

"Assigning a space" is something done in Verilog by declaring the signal, or whatever they call them in Verilog. I'm more conversant in VHDL which has signals and variables. Both can be thought of as "wires" with defined logic states. But most of the states possible in the default types have some states that are not actually realizable in hardware. They are mostly used to show results of poor logic design.

Not try to be rude or anything. I'm just trying to figure out if I can help you in any way.

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH… but? Why?

<e8d6b2ff-397a-4731-b7a0-795b79242493n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21681&group=comp.lang.forth#21681

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7308:0:b0:3a7:ec96:ef with SMTP id x8-20020ac87308000000b003a7ec9600efmr8830647qto.579.1670973203381;
Tue, 13 Dec 2022 15:13:23 -0800 (PST)
X-Received: by 2002:a05:6214:126:b0:4c7:81e1:6db2 with SMTP id
w6-20020a056214012600b004c781e16db2mr9343187qvs.117.1670973203233; Tue, 13
Dec 2022 15:13:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 15:13:22 -0800 (PST)
In-Reply-To: <84b80fd4-f7e1-45be-a0e6-12b204ffb7a3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com> <377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>
<84b80fd4-f7e1-45be-a0e6-12b204ffb7a3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e8d6b2ff-397a-4731-b7a0-795b79242493n@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Tue, 13 Dec 2022 23:13:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4540
 by: SpainHackForth - Tue, 13 Dec 2022 23:13 UTC

> > > I'm curious as to what you think this assignment will do in hardware that results from this code.
> > Not sure how to take your request, it’s just assigning a temp space for register temp… <Size>’<base><number>
> I'm asking an honest question. Verilog is an HDL, Hardware Description Language. It is used to "describe" hardware in terms of it's actions. What exactly do you think that assignment does in terms of an action. "assigning a temp space" has no meaning in hardware.
>
> I'm trying to understand how you are visualizing Verilog. I'm guessing that you don't actually have much understanding of the nature of the hardware produced.
>
> "Assigning a space" is something done in Verilog by declaring the signal, or whatever they call them in Verilog. I'm more conversant in VHDL which has signals and variables. Both can be thought of as "wires" with defined logic states. But most of the states possible in the default types have some states that are not actually realizable in hardware. They are mostly used to show results of poor logic design.
>
> Not try to be rude or anything. I'm just trying to figure out if I can help you in any way.

Again, not sure how to take your request, I’m very conscious of overly apologetic conversations when I don’t see a reason for it, it raises a high level of suspicion on my end, so not really sure why you are apologizing?

As clearly stated… I’m learning Verilog, so I don’t have a deep understanding of the language nor do I claim to be a subject matter expert.

Please feel free to “show” me what the line does?
I’m always open to an opportunity to learn, hence my original questions.

In the mean time, I can share with you my understanding… "zzzz_zzzz" is a placeholder value that indicates an unknown or undefined state. It is often used in Verilog code as a default value for registers or other variables when their actual value is not known or not relevant. In the code you provided, "zzzz_zzzz" is assigned to the "temp" register in several cases where the value of the "temp" register is not used or is not important.

Here, let me explain what i’m trying to do and by al means, show me a sample VHDL of how accomplish the following:

I’m just building a simple program counter…. 3 bit mode, a clock, a pc_value and a temp value… If mode is 010 i assign the pc_value to the data bus, if the mode is 000 I value to 0’s set temp z’ s else if mode is 001 I set value to the bus and temp so z’ s, and if 010 again does nothing * has been set in first case, else if mode changes 011 and temp is set to z’s and if mode is 100, value reg is incremented to 1…. block waits for raising edge to execute each instruction…

I’ve implemented this on a read board about 10 times playing with my kids… all it takes is a 555 and a 4027 (from memory).

Re: Hi all, building a Verilog FORTH… but? Why?

<d1c35428-8f51-46bd-91ea-a05aa75a111cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21684&group=comp.lang.forth#21684

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:5376:b0:6ff:ca92:2678 with SMTP id op54-20020a05620a537600b006ffca922678mr47179qkn.612.1670983114373;
Tue, 13 Dec 2022 17:58:34 -0800 (PST)
X-Received: by 2002:ad4:4e74:0:b0:4c7:693a:5506 with SMTP id
ec20-20020ad44e74000000b004c7693a5506mr16016366qvb.70.1670983114136; Tue, 13
Dec 2022 17:58:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 13 Dec 2022 17:58:33 -0800 (PST)
In-Reply-To: <e8d6b2ff-397a-4731-b7a0-795b79242493n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2605:ba00:4117:fb49:5946:9bfa:ffed:31fb;
posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 2605:ba00:4117:fb49:5946:9bfa:ffed:31fb
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<b0724e8e-27be-4d25-9ce6-43312ea03c5fn@googlegroups.com> <377d70e6-a248-4610-94d7-6c6951379856n@googlegroups.com>
<84b80fd4-f7e1-45be-a0e6-12b204ffb7a3n@googlegroups.com> <e8d6b2ff-397a-4731-b7a0-795b79242493n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d1c35428-8f51-46bd-91ea-a05aa75a111cn@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Wed, 14 Dec 2022 01:58:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 7602
 by: Lorem Ipsum - Wed, 14 Dec 2022 01:58 UTC

On Tuesday, December 13, 2022 at 7:13:24 PM UTC-4, SpainHackForth wrote:
> > > > I'm curious as to what you think this assignment will do in hardware that results from this code.
> > > Not sure how to take your request, it’s just assigning a temp space for register temp… <Size>’<base><number>
> > I'm asking an honest question. Verilog is an HDL, Hardware Description Language. It is used to "describe" hardware in terms of it's actions. What exactly do you think that assignment does in terms of an action. "assigning a temp space" has no meaning in hardware.
> >
> > I'm trying to understand how you are visualizing Verilog. I'm guessing that you don't actually have much understanding of the nature of the hardware produced.
> >
> > "Assigning a space" is something done in Verilog by declaring the signal, or whatever they call them in Verilog. I'm more conversant in VHDL which has signals and variables. Both can be thought of as "wires" with defined logic states. But most of the states possible in the default types have some states that are not actually realizable in hardware. They are mostly used to show results of poor logic design.
> >
> > Not try to be rude or anything. I'm just trying to figure out if I can help you in any way.
> Again, not sure how to take your request, I’m very conscious of overly apologetic conversations when I don’t see a reason for it, it raises a high level of suspicion on my end, so not really sure why you are apologizing?

There are some real whackos in this group, so I'm trying to not be condescending by trying to teach you something you don't need or want to learn. Some people here are set off very easily, and would find that highly offensive.

> As clearly stated… I’m learning Verilog, so I don’t have a deep understanding of the language nor do I claim to be a subject matter expert.
>
> Please feel free to “show” me what the line does?
> I’m always open to an opportunity to learn, hence my original questions.

In terms of hardware synthesis, it does nothing useful, unless you want temp to be a tri-state bus. If implementing in a modern FPGA, there are no tri-state buses, so not a good idea. The only other use is to flag that the contents of that register are invalid, as you say, but it makes no sense for the designer to set that value. In fact, I think the more appropriate value would be 'x', but, as I said, I'm much more conversant in VHDL, so I'm not sure of all the values available, or what is best. Verilog may not have all the same choices as VHDL.

> In the mean time, I can share with you my understanding… "zzzz_zzzz" is a placeholder value that indicates an unknown or undefined state. It is often used in Verilog code as a default value for registers or other variables when their actual value is not known or not relevant. In the code you provided, "zzzz_zzzz" is assigned to the "temp" register in several cases where the value of the "temp" register is not used or is not important.

I guess my question would be, why is temp undefined or unknown at the times you are assigning z's?

The code you've written in the always block should specify an assignment in every part of the code, unless you want that signal to hold it's previous value. This would be implemented by using a clock enable.

Just to make sure we are on the same foot, assignments in a clocked always clause, define a register. If the register output is not defined in any flow through the always block, it will have a clock enable to be disabled in that condition.

> Here, let me explain what i’m trying to do and by al means, show me a sample VHDL of how accomplish the following:
>
> I’m just building a simple program counter…. 3 bit mode, a clock, a pc_value and a temp value… If mode is 010 i assign the pc_value to the data bus, if the mode is 000 I value to 0’s set temp z’ s else if mode is 001 I set value to the bus and temp so z’ s, and if 010 again does nothing * has been set in first case, else if mode changes 011 and temp is set to z’s and if mode is 100, value reg is incremented to 1…. block waits for raising edge to execute each instruction…

I never see temp set to a value other than z's. It would appear to have no valid assignment, so no valid value, ever. In addition, temp is never used by any other logic. So even if it were assigned a value, it would be optimized away by the tools, unless you turn off that feature (discarding useless logic, i.e. no outputs).

So we can ignore temp in understanding what this code does.

When pc_mode is zero, initialize pc_value to 0
When pc_mode is one, set pc_value from data_bus
When pc_mode is four, set pc_value to pc_value + 1

That's it. Seems like a reasonable set of operations for a program counter if you are limiting it to simple jumps, or calculating the address elsewhere for more complex jumps.

> I’ve implemented this on a read board about 10 times playing with my kids… all it takes is a 555 and a 4027 (from memory).

I don't know what a "read board" is. I'm not sure how a 555 timer and a pair of FFs could implement this design. You would need four 4027 chips for the pc_value register. You would also need an adder for the increment operation, or some gates to implement half adders. Oh, and mux chips to switch the load between data_bus and pc_value + 1.

Is any of this useful? Any questions? Or am I missing the point entirely? Is there some use for temp which has not been coded yet?

--

Rick C.

-- Get 1,000 miles of free Supercharging
-- Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH… but? Why?

<1c135728-3159-4ce6-acbc-d3081b9f4c85n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21685&group=comp.lang.forth#21685

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:52e7:0:b0:4e1:bb55:1d8c with SMTP id p7-20020ad452e7000000b004e1bb551d8cmr518088qvu.66.1671008629916;
Wed, 14 Dec 2022 01:03:49 -0800 (PST)
X-Received: by 2002:a37:6584:0:b0:6fd:70d0:184f with SMTP id
z126-20020a376584000000b006fd70d0184fmr17226096qkb.478.1671008629717; Wed, 14
Dec 2022 01:03:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 01:03:49 -0800 (PST)
In-Reply-To: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=78.147.154.166; posting-account=eAOrwQkAAABheFES5y-02sBOFdTlBRio
NNTP-Posting-Host: 78.147.154.166
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1c135728-3159-4ce6-acbc-d3081b9f4c85n@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jpita...@gmail.com (Jurgen Pitaske)
Injection-Date: Wed, 14 Dec 2022 09:03:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jurgen Pitaske - Wed, 14 Dec 2022 09:03 UTC

On Tuesday, 13 December 2022 at 18:31:52 UTC, SpainHackForth wrote:
> Ok, so I’m learning Forth and Verilog…
> i’m not proficient in neither, but I like to learn and hack stuff,
> I built my first module on Verilog as a staring point for a Forth FPGA… https://gist.githubusercontent.com/jemo07/5d5ba7d31bb12410888f46ca6060a1f2/raw/1c597704a9a8f4f99b3e73a3906905ef0f38c358/ProgramCounter.v
>

I wonder if somebody has done the other option in the past: VHDL
So it could be compared with your approach.
Testra has done something here
http://www.testra.com/Forth/VHDL.htm

Re: Hi all, building a Verilog FORTH… but? Why?

<ab0c3e83-377c-4b4d-8cd7-20734c4ff23cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21686&group=comp.lang.forth#21686

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:ca01:0:b0:4c8:1ded:b016 with SMTP id c1-20020a0cca01000000b004c81dedb016mr2872553qvk.40.1671018262125;
Wed, 14 Dec 2022 03:44:22 -0800 (PST)
X-Received: by 2002:a05:6214:154c:b0:4c7:660f:184d with SMTP id
t12-20020a056214154c00b004c7660f184dmr17177780qvw.19.1671018261853; Wed, 14
Dec 2022 03:44:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 03:44:21 -0800 (PST)
In-Reply-To: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.64.52.14; posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 89.64.52.14
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ab0c3e83-377c-4b4d-8cd7-20734c4ff23cn@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Wed, 14 Dec 2022 11:44:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1906
 by: Zbig - Wed, 14 Dec 2022 11:44 UTC

> Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes. In essence, is all we are saying that when you write native Forth, you are really writing complied code?
>
> I ask this, as I was trying to wrap my head on how to implement the OpCodes for the Forth CPU, and then I was daunted by the fact that you need to, some how compile the words with the outer interpreter to get to the codes words, is that all that is really happening here?

You may want to study Brad Rodriguez' paper „Moving Forth” (5 parts):
http://www.bradrodriguez.com/papers/moving1.htm

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<20221214143416.3826d547@t530>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21687&group=comp.lang.forth#21687

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jan4comp...@murray-microft.co.uk (Jan Coombs)
Newsgroups: comp.lang.forth
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
Date: Wed, 14 Dec 2022 14:34:16 +0000
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <20221214143416.3826d547@t530>
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader01.eternal-september.org; posting-host="ff7531656e9d26a97f60b1d8f56f4b3b";
logging-data="2958327"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mXI4lcdecAJQYW+ZhE7/7vf30aC97rcU="
Cancel-Lock: sha1:inXdGkSvsqm6wVvwiR3r67eDiQ4=
X-Newsreader: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
 by: Jan Coombs - Wed, 14 Dec 2022 14:34 UTC

On Tue, 13 Dec 2022 10:31:51 -0800 (PST)
SpainHackForth <jemo07@gmail.com> wrote:
[…]
> Ok, while I started this several weeks ago, I have a simple question… what
> do HW Forth implementations really do? I mean, I understand a picoJava, as
> it’s executing “bitecode,” and you remove the interpreter as the bite-codes
> map 1:1 to the Operating Instructions *Opcodes. The JIT in essence becomes
> the compiler and the code is run native.
[…]
The python virtual stack engine also uses byte size tokens for it's
instructions. Many of these provide much higher level functions than
can be easily implemented in a simple hardware stack machine. Bernd's
b16[1] has 32 instructions (plus a few), and this is sufficient to host
a forth system. Each 16b instruction fetch contains either a 15b address,
three 5b instructions, or a mixture.

Memory addresses in the b16 can be derived from it's IP, the A register,
the TOR register, a combinations of register and inline data, or from the
incremented previous memory address.

As with many processors, performance is limited by the memory access time.
It is therefore good to latch the next address on a clock edge, and avoid
any asynchronous logic between the latches and the memory.

The state machine controlling the processor and other signals must therefore
predict the address source for the next memory cycle, and select it in the
cycle before. In linear code the Memory address will mostly be incremented.
Where a source other than the IP is to be used, the incremented address
value is saved back into the IP reg. Similarly, during a call this is pushed
to the R stack.

So, the IP reg is used to save the IP when it is not being used, which makes
it's logic fairly simple. Selecting what will be needed as the next address
source is likely where the complexity will be.

The b16 Verilog source code is powerfully minimalist, perhaps it is time for
this neat processor to get out and become more appreciated.

Jan Coombs
--

Re: Hi all, building a Verilog FORTH… but? Why?

<a6c577e4-6844-47bc-9c51-e16e5d8bb0ebn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21688&group=comp.lang.forth#21688

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:bac5:0:b0:6fa:f354:939f with SMTP id k188-20020a37bac5000000b006faf354939fmr84191615qkf.57.1671029123513;
Wed, 14 Dec 2022 06:45:23 -0800 (PST)
X-Received: by 2002:a05:622a:22a9:b0:3a8:27db:48b2 with SMTP id
ay41-20020a05622a22a900b003a827db48b2mr260191qtb.588.1671029123144; Wed, 14
Dec 2022 06:45:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 06:45:22 -0800 (PST)
In-Reply-To: <ab0c3e83-377c-4b4d-8cd7-20734c4ff23cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com> <ab0c3e83-377c-4b4d-8cd7-20734c4ff23cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a6c577e4-6844-47bc-9c51-e16e5d8bb0ebn@googlegroups.com>
Subject: Re:_Hi_all,_building_a_Verilog_FORTH…_but?_Why?
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Wed, 14 Dec 2022 14:45:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4576
 by: SpainHackForth - Wed, 14 Dec 2022 14:45 UTC

On Wednesday, December 14, 2022 at 12:44:23 PM UTC+1, Zbig wrote:
> > Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes. In essence, is all we are saying that when you write native Forth, you are really writing complied code?
> >
> > I ask this, as I was trying to wrap my head on how to implement the OpCodes for the Forth CPU, and then I was daunted by the fact that you need to, some how compile the words with the outer interpreter to get to the codes words, is that all that is really happening here?
> You may want to study Brad Rodriguez' paper „Moving Forth” (5 parts):
> http://www.bradrodriguez.com/papers/moving1.htm
Thanks for the source, yes I agree that Brad’s book is great! it’s a fantastic way to learn how to write a forth.

Now, one thing is implementing Forth, the other is how a Forth VM implemented in HW.
So, stepping back and restating my question, if you consider most VM’s, NGA, JVM, BEAM *erlang, Python, WASM VM, ETC, they all have have a common “if I may overly simplify” architecture that they emulate a virtual CPU, that is, the machine code *byte-code is further translated to host machine code.

In other words,
Code —> JIT *compiler VCPU Target —> Bytecode —> interpreter *compiler —> Hosted Machine code.
Java — >( SW / JVM ) —> Hosted Machine Code..
In HW:
Java —> ( JIT * compiler VCPU Target) —> [ picoJava Native CPU *HW ]

Now, in in Forth, it’s a bit different.

Forth Code —> JIT Interpreter * New Word —> Compiler — > Hosted Machine Code. ( the whole Forth systems is build on top of the hosted code… it’s hard to determine when the Inner and Outer compiler is acting on any time of the code. Words are really little programs that pass messages through the stack. If you think about it…what could be mor elegant than that really…

What I see here and in Chuck’s one words, you don’t necessarily build a CPU, you are building a computer in HW, that is the realization I came to.

So, is that correct? otherwise, you are essentially building stack CPU, inspired by the Forth VM, but the output would be the same, you build a Forth with the newly created opcode *yes they would match 1:1 to the 28 or so core words, but other than that, what are we gaining?

I think it’s a great experience, and it has given me the opportunity to understand many low level computational factors, and I will end up building my own little Forth VM in HW, but I’m asking a pure practical matter, what do you really gain by doing this that you can’t already do on any other HW.

I’m not sure, I might have missed something and while I’m fine to enjoy the experience, I was hoping others would chime in with their own ideas as I have seem to have run into a wall of…. really?

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21689&group=comp.lang.forth#21689

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:2c85:0:b0:6ef:1b80:ac9b with SMTP id s127-20020a372c85000000b006ef1b80ac9bmr69260524qkh.773.1671029223582;
Wed, 14 Dec 2022 06:47:03 -0800 (PST)
X-Received: by 2002:a05:6214:16f:b0:4c6:ed60:798 with SMTP id
y15-20020a056214016f00b004c6ed600798mr49726435qvs.88.1671029223399; Wed, 14
Dec 2022 06:47:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 06:47:03 -0800 (PST)
In-Reply-To: <20221214143416.3826d547@t530>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com> <20221214143416.3826d547@t530>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Wed, 14 Dec 2022 14:47:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1583
 by: SpainHackForth - Wed, 14 Dec 2022 14:47 UTC

>
> So, the IP reg is used to save the IP when it is not being used, which makes
> it's logic fairly simple. Selecting what will be needed as the next address
> source is likely where the complexity will be.
>
> The b16 Verilog source code is powerfully minimalist, perhaps it is time for
> this neat processor to get out and become more appreciated.
>
> Jan Coombs
> --

Jan, that is fantastic feedback.

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21690&group=comp.lang.forth#21690

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:5a87:b0:3a5:47de:a214 with SMTP id fz7-20020a05622a5a8700b003a547dea214mr71263274qtb.304.1671031351433;
Wed, 14 Dec 2022 07:22:31 -0800 (PST)
X-Received: by 2002:a05:620a:f8a:b0:6fc:ae0f:cdec with SMTP id
b10-20020a05620a0f8a00b006fcae0fcdecmr24423890qkn.663.1671031351191; Wed, 14
Dec 2022 07:22:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 07:22:30 -0800 (PST)
In-Reply-To: <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2605:ba00:4117:fb49:f9ba:f4d0:562e:8dca;
posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 2605:ba00:4117:fb49:f9ba:f4d0:562e:8dca
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Wed, 14 Dec 2022 15:22:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2249
 by: Lorem Ipsum - Wed, 14 Dec 2022 15:22 UTC

On Wednesday, December 14, 2022 at 10:47:04 AM UTC-4, SpainHackForth wrote:
> >
> > So, the IP reg is used to save the IP when it is not being used, which makes
> > it's logic fairly simple. Selecting what will be needed as the next address
> > source is likely where the complexity will be.
> >
> > The b16 Verilog source code is powerfully minimalist, perhaps it is time for
> > this neat processor to get out and become more appreciated.
> >
> > Jan Coombs
> > --
> Jan, that is fantastic feedback.

The Forth VM is unique to Forth. I don't recall any processor design that was literally a Forth VM, including the b16. They are stack machines, but often deviate from the Forth VM by adding various registers, and other details.

What exactly are you trying to do? What is your actual goal?

--

Rick C.

-+ Get 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21692&group=comp.lang.forth#21692

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7308:0:b0:3a7:ec96:ef with SMTP id x8-20020ac87308000000b003a7ec9600efmr8943263qto.579.1671039134259;
Wed, 14 Dec 2022 09:32:14 -0800 (PST)
X-Received: by 2002:a37:512:0:b0:6fe:d1a0:ba88 with SMTP id
18-20020a370512000000b006fed1a0ba88mr11692058qkf.233.1671039134064; Wed, 14
Dec 2022 09:32:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 09:32:13 -0800 (PST)
In-Reply-To: <013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Wed, 14 Dec 2022 17:32:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2733
 by: SpainHackForth - Wed, 14 Dec 2022 17:32 UTC

> > Jan, that is fantastic feedback.
> The Forth VM is unique to Forth. I don't recall any processor design that was literally a Forth VM, including the b16. They are stack machines, but often deviate from the Forth VM by adding various registers, and other details.
>
> What exactly are you trying to do? What is your actual goal?
>
> --
>
> Rick C.

Hello Ric, yes,, I have to agree, the Forth VM, ( not sure if *VM is an appropriate term ) behaves more like a intermediate state machine, there are some principals of a CPU there, but the level of abstraction that the stack machine provides is quite simple. If you think about it, it is a perfect target for a massive parallelization, provided you can keep track of the order of the machine to keep track of next… *there is the idea of my temp ;^D but I have to admit, I did read Bob’s Functional Designs for digital computer long ago! :D

I don’t have goals, specifically, I’m just exploring the possibilities… I’m trying to learn a cool tech and fill the bunch of repurposed FPGA I got for $50

I wish I would have explore Forth rather than Java and we could have had FPGA 30 years ago and I was the the university… but why miss out on the fun of innovation…

Cheers,

Jose

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21693&group=comp.lang.forth#21693

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:5d87:b0:4c7:91ae:7458 with SMTP id mf7-20020a0562145d8700b004c791ae7458mr5932387qvb.51.1671050696035;
Wed, 14 Dec 2022 12:44:56 -0800 (PST)
X-Received: by 2002:a05:620a:60c4:b0:6ff:aeee:b2c9 with SMTP id
dy4-20020a05620a60c400b006ffaeeeb2c9mr330867qkb.517.1671050695879; Wed, 14
Dec 2022 12:44:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 12:44:55 -0800 (PST)
In-Reply-To: <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:2a60:9ae:467:f691:b073:ca00;
posting-account=2z7GawoAAADc70p5SM5AbaCyzjLblS3g
NNTP-Posting-Host: 2607:fea8:2a60:9ae:467:f691:b073:ca00
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: brian....@brianfox.ca (Brian Fox)
Injection-Date: Wed, 14 Dec 2022 20:44:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3611
 by: Brian Fox - Wed, 14 Dec 2022 20:44 UTC

On Wednesday, December 14, 2022 at 12:32:15 PM UTC-5, SpainHackForth wrote:
>
> I wish I would have explore Forth rather than Java and we could have had FPGA 30 years ago and I was the the university… but why miss out on the fun of innovation…
>
> Cheers,
>
> Jose
I am not sure anybody has answered your question directly.
Here is one from a hobby Forth guy.

"Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes. In essence, is all we are saying that when you write native Forth, you are really writing complied code?"

So a traditional indirect-threaded Forth system compiles pointers to addresses and
although there is typically no "JIT" most implementers make some form of optimizer
in the course of their work. (peephole is popular) GForth, is unique, I think, in that
it tries to create optimized "super-instructions" to replace slower combinations of
Forth primitives.

In Forth on Hardware you will be compiling "native" opcodes for your CPU as
primitives. Sub-routine calls will be used for hi-level words where you want to save space.
This most closely resembles "sub-routine threaded" Forth systems on conventional
machines. An optimizer could simply copy a sub-routine inline for a quick an
easy speed up.

" ...you build a Forth with the newly created opcode *yes they would match 1:1 to
the 28 or so core words, but other than that, what are we gaining?"

Some Forth CPUs have taken advantage of the fact that <32 instructions can
be the entire set for a Forth CPU, encoded in 5 bits. So in a 16 bit word you can
place 3 instructions in one word and execute them in parallel if possible, or take
at least take advantage of this to reduce memory fetches to read the program.
Some of Chuck Moore's machines used this approach as I recall.
Chuck reserved the last bit to make a sub-routine call and an implicit return.
Clever.

I wish you success with your project and hope you publish your results.

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<88b0a2b3-02f1-4306-bbda-65903492f088n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21694&group=comp.lang.forth#21694

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:209:b0:4bb:6bbd:8c1b with SMTP id i9-20020a056214020900b004bb6bbd8c1bmr69687950qvt.111.1671060986829;
Wed, 14 Dec 2022 15:36:26 -0800 (PST)
X-Received: by 2002:a0c:ff2c:0:b0:4c6:924e:30d2 with SMTP id
x12-20020a0cff2c000000b004c6924e30d2mr67963285qvt.114.1671060986626; Wed, 14
Dec 2022 15:36:26 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 15:36:26 -0800 (PST)
In-Reply-To: <959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <88b0a2b3-02f1-4306-bbda-65903492f088n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Wed, 14 Dec 2022 23:36:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1938
 by: SpainHackForth - Wed, 14 Dec 2022 23:36 UTC

> I wish you success with your project and hope you publish your results.
Thank you Brian! I appreciate the encouragement, and most of all, you provided some good feedback as to possible benefits.

I just read some reference on Gary Bergstrom’s AFT, but I can’t seem to find a source to the reference documentation.
it reads of another set to stack registers and a more compact code… any one able to point me towards this reference.

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<b29750ab-ec82-4886-88e7-a57c0e12b5f3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21696&group=comp.lang.forth#21696

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:4d4a:0:b0:3a8:3121:b4ba with SMTP id x10-20020ac84d4a000000b003a83121b4bamr125174qtv.96.1671078136183;
Wed, 14 Dec 2022 20:22:16 -0800 (PST)
X-Received: by 2002:a05:6214:16f:b0:4c6:ed60:798 with SMTP id
y15-20020a056214016f00b004c6ed600798mr49815227qvs.88.1671078136026; Wed, 14
Dec 2022 20:22:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 20:22:15 -0800 (PST)
In-Reply-To: <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=199.48.66.218; posting-account=zkoivgoAAABqROvHfKJPu3S9NWXITnSr
NNTP-Posting-Host: 199.48.66.218
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b29750ab-ec82-4886-88e7-a57c0e12b5f3n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: myronpli...@gmail.com (Myron Plichota)
Injection-Date: Thu, 15 Dec 2022 04:22:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1982
 by: Myron Plichota - Thu, 15 Dec 2022 04:22 UTC

On Wednesday, December 14, 2022 at 12:32:15 PM UTC-5, SpainHackForth wrote:
> I don’t have goals, specifically, I’m just exploring the possibilities… I’m trying to learn a cool tech and fill the bunch of repurposed FPGA I got for $50
>
> I wish I would have explore Forth rather than Java and we could have had FPGA 30 years ago and I was the the university… but why miss out on the fun of innovation…

It's kept me off the streets for 20+ years :)
I'm curious, what is your "repurposed" FPGA target?

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21697&group=comp.lang.forth#21697

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:5233:b0:6fe:fb09:ec2e with SMTP id dc51-20020a05620a523300b006fefb09ec2emr3673938qkb.214.1671078977626;
Wed, 14 Dec 2022 20:36:17 -0800 (PST)
X-Received: by 2002:a0c:8087:0:b0:4e8:1593:e03d with SMTP id
7-20020a0c8087000000b004e81593e03dmr663795qvb.90.1671078977411; Wed, 14 Dec
2022 20:36:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 20:36:17 -0800 (PST)
In-Reply-To: <959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=199.48.66.218; posting-account=zkoivgoAAABqROvHfKJPu3S9NWXITnSr
NNTP-Posting-Host: 199.48.66.218
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: myronpli...@gmail.com (Myron Plichota)
Injection-Date: Thu, 15 Dec 2022 04:36:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2760
 by: Myron Plichota - Thu, 15 Dec 2022 04:36 UTC

On Wednesday, December 14, 2022 at 3:44:57 PM UTC-5, Brian Fox wrote:
> In Forth on Hardware you will be compiling "native" opcodes for your CPU as
> primitives. Sub-routine calls will be used for hi-level words where you want to save space.
> This most closely resembles "sub-routine threaded" Forth systems on conventional
> machines. An optimizer could simply copy a sub-routine inline for a quick an
> easy speed up.
>
> " ...you build a Forth with the newly created opcode *yes they would match 1:1 to
> the 28 or so core words, but other than that, what are we gaining?"
> Some Forth CPUs have taken advantage of the fact that <32 instructions can
> be the entire set for a Forth CPU, encoded in 5 bits. So in a 16 bit word you can
> place 3 instructions in one word and execute them in parallel if possible, or take
> at least take advantage of this to reduce memory fetches to read the program.
> Some of Chuck Moore's machines used this approach as I recall.
[ > Chuck reserved the last bit to make a sub-routine call and an implicit return.
> Clever.
] I disagree on this point. Chuck's chips always had an explicit return aka ; instruction.
Only the called procedure can know when it is time to return.
>
> I wish you success with your project and hope you publish your results.

I as well.

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21698&group=comp.lang.forth#21698

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4506:0:b0:4e6:ca24:d339 with SMTP id k6-20020ad44506000000b004e6ca24d339mr317026qvu.115.1671079826035;
Wed, 14 Dec 2022 20:50:26 -0800 (PST)
X-Received: by 2002:a05:622a:4a08:b0:3a6:722f:4d71 with SMTP id
fv8-20020a05622a4a0800b003a6722f4d71mr49880810qtb.404.1671079825839; Wed, 14
Dec 2022 20:50:25 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 14 Dec 2022 20:50:25 -0800 (PST)
In-Reply-To: <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=199.48.66.218; posting-account=zkoivgoAAABqROvHfKJPu3S9NWXITnSr
NNTP-Posting-Host: 199.48.66.218
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com> <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: myronpli...@gmail.com (Myron Plichota)
Injection-Date: Thu, 15 Dec 2022 04:50:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3009
 by: Myron Plichota - Thu, 15 Dec 2022 04:50 UTC

On Wednesday, December 14, 2022 at 11:36:18 PM UTC-5, Myron Plichota wrote:
> On Wednesday, December 14, 2022 at 3:44:57 PM UTC-5, Brian Fox wrote:
> > In Forth on Hardware you will be compiling "native" opcodes for your CPU as
> > primitives. Sub-routine calls will be used for hi-level words where you want to save space.
> > This most closely resembles "sub-routine threaded" Forth systems on conventional
> > machines. An optimizer could simply copy a sub-routine inline for a quick an
> > easy speed up.
> >
> > " ...you build a Forth with the newly created opcode *yes they would match 1:1 to
> > the 28 or so core words, but other than that, what are we gaining?"
> > Some Forth CPUs have taken advantage of the fact that <32 instructions can
> > be the entire set for a Forth CPU, encoded in 5 bits. So in a 16 bit word you can
> > place 3 instructions in one word and execute them in parallel if possible, or take
> > at least take advantage of this to reduce memory fetches to read the program.
> > Some of Chuck Moore's machines used this approach as I recall.
> [
> > Chuck reserved the last bit to make a sub-routine call and an implicit return.
> > Clever.
> ]
> I disagree on this point. Chuck's chips always had an explicit return aka ; instruction.
> Only the called procedure can know when it is time to return.
> >
> > I wish you success with your project and hope you publish your results.
> I as well.

PS great analysis, Brian. Sorry this missed my first reply.

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<fdb942d0-7bf2-4c16-b159-c5d53aa46883n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21699&group=comp.lang.forth#21699

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:110:b0:3a5:50fa:1a32 with SMTP id u16-20020a05622a011000b003a550fa1a32mr71501341qtw.11.1671091786789;
Thu, 15 Dec 2022 00:09:46 -0800 (PST)
X-Received: by 2002:a05:6214:16f:b0:4c6:ed60:798 with SMTP id
y15-20020a056214016f00b004c6ed600798mr49834388qvs.88.1671091786530; Thu, 15
Dec 2022 00:09:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 15 Dec 2022 00:09:46 -0800 (PST)
In-Reply-To: <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fdb942d0-7bf2-4c16-b159-c5d53aa46883n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Thu, 15 Dec 2022 08:09:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3130
 by: Lorem Ipsum - Thu, 15 Dec 2022 08:09 UTC

On Wednesday, December 14, 2022 at 1:32:15 PM UTC-4, SpainHackForth wrote:
> > > Jan, that is fantastic feedback.
> > The Forth VM is unique to Forth. I don't recall any processor design that was literally a Forth VM, including the b16. They are stack machines, but often deviate from the Forth VM by adding various registers, and other details.
> >
> > What exactly are you trying to do? What is your actual goal?
> >
> > --
> >
> > Rick C.
> Hello Ric, yes,, I have to agree, the Forth VM, ( not sure if *VM is an appropriate term ) behaves more like a intermediate state machine, there are some principals of a CPU there, but the level of abstraction that the stack machine provides is quite simple. If you think about it, it is a perfect target for a massive parallelization, provided you can keep track of the order of the machine to keep track of next… *there is the idea of my temp ;^D but I have to admit, I did read Bob’s Functional Designs for digital computer long ago! :D
>
> I don’t have goals, specifically, I’m just exploring the possibilities… I’m trying to learn a cool tech and fill the bunch of repurposed FPGA I got for $50
>
> I wish I would have explore Forth rather than Java and we could have had FPGA 30 years ago and I was the the university… but why miss out on the fun of innovation…

Ok, if you don't have any goals in mind, I'm not sure how I can help. If you have questions, ask, otherwise I'll tune out.

--

Rick C.

+- Get 1,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<585ec90a-c06a-4226-8b51-f91055ba5d1dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21700&group=comp.lang.forth#21700

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:b2a:b0:4c7:4c07:8036 with SMTP id w10-20020a0562140b2a00b004c74c078036mr22510691qvj.36.1671092919810;
Thu, 15 Dec 2022 00:28:39 -0800 (PST)
X-Received: by 2002:ad4:4c03:0:b0:4bc:182e:78c2 with SMTP id
bz3-20020ad44c03000000b004bc182e78c2mr67857377qvb.2.1671092919573; Thu, 15
Dec 2022 00:28:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 15 Dec 2022 00:28:39 -0800 (PST)
In-Reply-To: <6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com> <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
<6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <585ec90a-c06a-4226-8b51-f91055ba5d1dn@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Thu, 15 Dec 2022 08:28:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2327
 by: SpainHackForth - Thu, 15 Dec 2022 08:28 UTC

> > > I wish you success with your project and hope you publish your results.
> > I as well.
> PS great analysis, Brian. Sorry this missed my first reply.
I bought the Pano Logic boards, a lot of them for $50, I got I think 30 the first lot, and 10 cisco cdma modems the second lot, so I’m about $150 in with all these boards including shipping to Spain… :D

Here is a good resource I found after the fact, I bough these boards in 2018, so after Covid prices have changed, but you do get the Cisco board quite cheap if you search for them, if you get a lot like I did of used ones, they are very cheap indeed.

https://geeklan.co.uk/files/ossg16072020-repurposing_obsolete_fpga_and_dev_kits.pdf

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<19d55503-102a-4bee-93aa-832e83eb4f53n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21701&group=comp.lang.forth#21701

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:8c8:b0:3a5:7de1:9708 with SMTP id i8-20020a05622a08c800b003a57de19708mr88073845qte.616.1671093271446;
Thu, 15 Dec 2022 00:34:31 -0800 (PST)
X-Received: by 2002:a05:6214:205:b0:4e2:cef8:c816 with SMTP id
i5-20020a056214020500b004e2cef8c816mr770297qvt.51.1671093271178; Thu, 15 Dec
2022 00:34:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 15 Dec 2022 00:34:30 -0800 (PST)
In-Reply-To: <959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=63.114.57.174; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 63.114.57.174
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <19d55503-102a-4bee-93aa-832e83eb4f53n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: gnuarm.d...@gmail.com (Lorem Ipsum)
Injection-Date: Thu, 15 Dec 2022 08:34:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6099
 by: Lorem Ipsum - Thu, 15 Dec 2022 08:34 UTC

On Wednesday, December 14, 2022 at 4:44:57 PM UTC-4, Brian Fox wrote:
> On Wednesday, December 14, 2022 at 12:32:15 PM UTC-5, SpainHackForth wrote:
> >
> > I wish I would have explore Forth rather than Java and we could have had FPGA 30 years ago and I was the the university… but why miss out on the fun of innovation…
> >
> > Cheers,
> >
> > Jose
> I am not sure anybody has answered your question directly.
> Here is one from a hobby Forth guy.
> "Now, for Forth, how does that work out? If the outer interpreter is a JIT, it then compiles the words into core words *who are in term just Opcodes.. In essence, is all we are saying that when you write native Forth, you are really writing complied code?"
> So a traditional indirect-threaded Forth system compiles pointers to addresses and
> although there is typically no "JIT" most implementers make some form of optimizer
> in the course of their work. (peephole is popular) GForth, is unique, I think, in that
> it tries to create optimized "super-instructions" to replace slower combinations of
> Forth primitives.
>
> In Forth on Hardware you will be compiling "native" opcodes for your CPU as
> primitives. Sub-routine calls will be used for hi-level words where you want to save space.
> This most closely resembles "sub-routine threaded" Forth systems on conventional
> machines. An optimizer could simply copy a sub-routine inline for a quick an
> easy speed up.
>
> " ...you build a Forth with the newly created opcode *yes they would match 1:1 to
> the 28 or so core words, but other than that, what are we gaining?"
> Some Forth CPUs have taken advantage of the fact that <32 instructions can
> be the entire set for a Forth CPU, encoded in 5 bits. So in a 16 bit word you can
> place 3 instructions in one word and execute them in parallel if possible, or take
> at least take advantage of this to reduce memory fetches to read the program.
> Some of Chuck Moore's machines used this approach as I recall.
> Chuck reserved the last bit to make a sub-routine call and an implicit return.
> Clever.
>
> I wish you success with your project and hope you publish your results.

One of the things about working in FPGAs is that you have memory that will keep up with most logic designs. So the idea of internal program store with wide words containing multiple instructions, is not of much value. Packing multiple instructions into words is only useful for external memory, that can not keep up with the CPU speed.

There are many options for instruction encoding. I designed an ISA that used a variable width instruction, allowing the remainder of the word to be immediate data. This was designed around the frequency of instruction use, so as to minimize the size of the actual op code and maximize the size of immediate data. In fact, the design was agnostic as to the size of the data words. I had two versions, 8 bit instructions and 9 bit instructions. Literal is the first instruction with a one bit op code, '0' in the msb, leaving the remaining n-1 bits as immediate data loaded onto the return stack with sign extension. Multiple literal instructions would shift left the previous top of return stack and shift in another n-1 bits. This could be repeated ad nauseam to fill any size data word desired.

The return stack is used, since most immediate data are addresses. For a data immediate, the data then is transferred to the data stack ( R> ) and you have LITERAL.

The jump and call instructions are next with 2 or 3 (or maybe 4, not sure, I'd have to check) op codes with the remainder of the instruction as immediate data, again, loaded to the return stack in the same way as LITERAL. So you have some five or six bits of signed address offset, great for loops and short jumps in one instruction.

The last design I was working on was a stack design that allowed offset addressing as part of the instruction. This greatly reduced the need for stack juggling instructions, like DUP, SWAP, ROT, etc. My test case was an interrupt handler for a software NCO, with phase and frequency control on a sample by sample basis. The code size was reduced by a third, if I recall correctly. I put it aside and have not gotten back to it.

--

Rick C.

++ Get 1,000 miles of free Supercharging
++ Tesla referral code - https://ts.la/richard11209

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<f41d8507-b909-460d-abe8-7bc96db17678n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21702&group=comp.lang.forth#21702

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:57aa:0:b0:4c6:f83c:4741 with SMTP id g10-20020ad457aa000000b004c6f83c4741mr49189299qvx.11.1671095419025;
Thu, 15 Dec 2022 01:10:19 -0800 (PST)
X-Received: by 2002:a0c:a799:0:b0:4ea:2041:4baa with SMTP id
v25-20020a0ca799000000b004ea20414baamr418471qva.21.1671095418820; Thu, 15 Dec
2022 01:10:18 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 15 Dec 2022 01:10:18 -0800 (PST)
In-Reply-To: <585ec90a-c06a-4226-8b51-f91055ba5d1dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=199.48.66.218; posting-account=zkoivgoAAABqROvHfKJPu3S9NWXITnSr
NNTP-Posting-Host: 199.48.66.218
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com> <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
<6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com> <585ec90a-c06a-4226-8b51-f91055ba5d1dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f41d8507-b909-460d-abe8-7bc96db17678n@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: myronpli...@gmail.com (Myron Plichota)
Injection-Date: Thu, 15 Dec 2022 09:10:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2605
 by: Myron Plichota - Thu, 15 Dec 2022 09:10 UTC

On Thursday, December 15, 2022 at 3:28:41 AM UTC-5, SpainHackForth wrote:
> > > > I wish you success with your project and hope you publish your results.
> > > I as well.
> > PS great analysis, Brian. Sorry this missed my first reply.
> I bought the Pano Logic boards, a lot of them for $50, I got I think 30 the first lot, and 10 cisco cdma modems the second lot, so I’m about $150 in with all these boards including shipping to Spain… :D
>
> Here is a good resource I found after the fact, I bough these boards in 2018, so after Covid prices have changed, but you do get the Cisco board quite cheap if you search for them, if you get a lot like I did of used ones, they are very cheap indeed.
>
> https://geeklan.co.uk/files/ossg16072020-repurposing_obsolete_fpga_and_dev_kits.pdf

Thanks for the link. But I'm still unclear on whether your boards are based on Spartan-3E (G1?) or Spartan-6 (G2?).

Re: Hi all, building a Verilog FORTH, mem addr example, b16

<ae4e897b-ec85-4cfe-8bf6-cef0a84fd43bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21704&group=comp.lang.forth#21704

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:ecc4:0:b0:4c7:7257:68b4 with SMTP id o4-20020a0cecc4000000b004c7725768b4mr14711486qvq.99.1671108605864;
Thu, 15 Dec 2022 04:50:05 -0800 (PST)
X-Received: by 2002:a05:620a:13ad:b0:702:1715:44b9 with SMTP id
m13-20020a05620a13ad00b00702171544b9mr7647qki.663.1671108605687; Thu, 15 Dec
2022 04:50:05 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 15 Dec 2022 04:50:05 -0800 (PST)
In-Reply-To: <f41d8507-b909-460d-abe8-7bc96db17678n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.1.141.153; posting-account=oUnEFAoAAADoKEMDaPmswUef8xS_aFfv
NNTP-Posting-Host: 88.1.141.153
References: <755a2dbf-a953-47ab-bdf3-3b6adc9f8b54n@googlegroups.com>
<20221214143416.3826d547@t530> <ef464c24-6dfd-4344-8773-9b5acb6edcebn@googlegroups.com>
<013d75fd-0359-414f-96a7-8ad5d348e1d4n@googlegroups.com> <3dde5f0f-74d3-479d-935b-9e6753309300n@googlegroups.com>
<959bfa77-65af-4da3-a842-93fb7d527766n@googlegroups.com> <6538b1c8-6496-466f-ad8f-f80b5bea44e5n@googlegroups.com>
<6a131617-c098-42e3-a774-167b970b18afn@googlegroups.com> <585ec90a-c06a-4226-8b51-f91055ba5d1dn@googlegroups.com>
<f41d8507-b909-460d-abe8-7bc96db17678n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ae4e897b-ec85-4cfe-8bf6-cef0a84fd43bn@googlegroups.com>
Subject: Re: Hi all, building a Verilog FORTH, mem addr example, b16
From: jem...@gmail.com (SpainHackForth)
Injection-Date: Thu, 15 Dec 2022 12:50:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1803
 by: SpainHackForth - Thu, 15 Dec 2022 12:50 UTC

> Thanks for the link. But I'm still unclear on whether your boards are based on Spartan-3E (G1?) or Spartan-6 (G2?).

I got the G2 so they are Spartan 6.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor