Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #35232
| Date | 2014-12-25 13:18 +0000 |
|---|---|
| From | Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> |
| Newsgroups | comp.lang.forth |
| Subject | Re: gforth 32bit cross compile |
| Message-ID | <20141225131812.1b3a4813@T60A> (permalink) |
| References | <caeaf7be-6043-4f47-8312-a667b49e7441@googlegroups.com> |
On Mon, 22 Dec 2014 20:32:56 -0800 (PST) Mark <sv8194@gmail.com> wrote: > Hi All, > > I tried James Bowman's J1 Forth CPU on an Altera board I have and it works great. But the Altera Nios CPU has a 32bits data bus. How does one compile the following Forth into 32bit CPU machine code: > > h# 00000001 h# 00000002 + using j1 processor unmodified: h# 0001 s>d h# 0002 s>d d+ or h# 0001 h# 0000 h# 0002 h# 0000 d+ (I think) Note: d+ is not a primitive because the j1 is a 16b processor. If you would like to modify the processor to 32b, then I have an executable model of it which shortens the edit-test cycle. The model can then export VHDL or Verilog for synthesis. [1] > In Jame's cross compiler, a literal is identified by the bit15 of the instruction word read(bit15=1 => a literal). In James's cross compiler, the above machine code would be(hex): > > 8001 > 8002 > 6203 > > For 32bit, I think it should be: > 80000001 > 80000002 > 6203 > > Here I would like to have only 32bit literals but keep instructions as 16bit(e.g., hex 6203 -> ALU/+). Of course, all the ALU operations are done in 32bit, as well as ! @, etc. This is not trivial, and will depend on how you choose to modify the j1 instruction set and data path size. If large constants use is infrequent it might be better to use multiple instructions for them. [2][3] > > Any help and pointers are appreciated, Why do you want 32b numbers? There might be a better way. Are you only looking at the Novix style stack processor [4], or would you consider types? Jan Coombs. -- email valid, else fix dots and hyphen jan4clf2014@murrayhyphenmicroftdotcodotuk [1] http://myhdl.org/ [2] http://www.microcore.org/Introduction/#instructionarch [3] http://opencores.org/project,zpu [4] http://users.ece.cmu.edu/~koopman/stack_computers/sec4_4.html
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
gforth 32bit cross compile Mark <sv8194@gmail.com> - 2014-12-22 20:32 -0800
Re: gforth 32bit cross compile Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2014-12-25 13:18 +0000
Re: gforth 32bit cross compile Mark <sv8194@gmail.com> - 2014-12-25 12:19 -0800
Re: gforth 32bit cross compile Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-01-05 16:59 +0000
Re: gforth 32bit cross compile Mark <sv8194@gmail.com> - 2015-01-06 09:26 -0800
csiph-web