Hi Ed,
When my friend Alan Wood and I specified the BlackIce design, I was influenced by James's J1 - and word addressing appeared the obvious choice. The word-wide 10nS SRAM was only a couple of dollars, so it seemed sensible to include it on the back of the pcb - very closely coupled to the FPGA.
Whilst there are about 50 of the myStorm boards in circulation - I don't think anyone has used the SRAM in earnest yet.
There have been a few designs, notably those of Chuck Moore, that pack several 4 or 5 bit opcodes into a 16-bit word and execute them in sequence. This creates a pseudo-pipeline which speeds up the throughput, but also allows the use of slower RAMs.
Matthias Koch of MeCrisp Forth has got the J1 running on the myStorm board - and a version of MeCrisp that runs on the ARM cpu.
My ultimate aim was to understand which instructions are essential for an interpreter like SIMPL, and try to implement these efficiently. So I coded SIMPL up in very crude MSP430 assembly language - so I have a feel for what is needed to implement it - at least on a 16-bit harvard cpu with a reasonable amount of registers. As it happens I only use about 6 registers. However there's quite a lot of transferring data between those 6 registers - and so a hybrid machine that has both a stack architecture but allows efficient register to register instructions might be an advantage.
On OCP 6 I like the means of being able to modify the registers by a short integer - including the PC which gives short jumps. I'd be tempted to extend this idea to allow an 8-bit "payload" - so that efficient jump tables can be created, and an instruction like DJNZ would also be useful for implementing efficient loops.
A register file in on chip RAM could be used to create a parameter stack, for a true stack machine - but as SIMPL generally only uses 2 operands, even a full stack is possibly somewhat redundant.
I'll try to come up with a proper description of SIMPL to share with the forum. I've tried several times to describe it, but it's constantly evolving, and finding new applications. I've added a summary below, but the full code (MSP430 ASM) is on github
https://github.com/monsonite/SIMPL/blob ... asm_15.asmI think that it's best to think of it as a toolkit to help exercise experimental hardware, with an instruction set that is highly mnemonic - so that you can virtually write directly in the machine language of the processor - and still read the code.
;-------------------------------------------------------------------------------
; SIMPL - a very small Forth Inspired Extensible Language
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language
;
; A Forth-Like Language in under 1024 bytes
; Ken Boak May June 2017
; Loops, I/O, Strings and Delays added
; Jump table reduced by 36 entries (72 bytes)
; times_32 subroutine further reduces codesize
; This version 860 bytes 9600 baud communications with 1MHz DCO
; Input and output to port P2 of Launchpad added with "i" and "o" commands
; SIMPL_430ASM_16
; Primitive Instructions - all have a fairly mnemonic ascii character that is the machine instruction!
; These allow basic maths an logical instructions on 16-bit integers + - / * & | ^ ~
; Stack Manipulation DUP DROP PUSH POP SWAP OVER " ' , . $ %
; Memory transfers with FETCH and STORE @ !
; Compilation mode with : and ;
; Simple decrementing loops (..........)
; Input and Output
; Print a string _Hello World_
; Note as of 13/06-2017 - not all of these are fully implemented
; ADD +
; SUB -
; SHR /
; SHL *
; AND &
; OR |
; XOR ^
; INV ~
; DUP “
; DROP `
; PUSH ,
; POP ‘
; SWAP $
; OVER %
; FETCH @
; STORE !
; CALL :
; RETURN ;
; JMP \
; JE =
; JGT >
; JLT <
; TO-R {
; FROM-R }
; LOOP-Strt (
; LOOP-End )
; IN [
; OUT ]
; KEY ?
; PRINT _
; NOP Space
; LIT #
; Lower case letters are used for more complex commands
;a
;b
;c
;d
;e
;f
;g
;h set port pin high
;i input byte from port
;j
;k access the loop counter variable
;l set port pin low
;m milliseconds delay
;n
;o output byte to port
;p print the to of stack to terminal
;q print the ascii character at given RAM location
;r read input pin
;s sample the ADC
;t
;u microseconds delay
;v
;w
;x
;y
;z
; Upper case letters are used to define Users "words"
; User Routines are defined by capital letters starting with colon : and end with semicolon ;
; eg :F10(100mh200ml); ; Flash the led 10 times - high for 100mS and low for 200mS
; You can play sequences of notes through a small speaker ABC etc
; :A40{h1106ul1106u); musical note A
; :B5{h986ul986u); musical note B
; :C51{h929ul929u); musical note C
;
57{h825ul825u); musical note D
; :E64{h733ul733u); musical note E
; :F72{h690ul691u); musical note F
; :G81{h613ul613u); musical note G
; :H_Hello World, and welcome to SIMPL_; A Banner Message
;A
;B
;C
;D
;E
;F
;G
;H
;I
;J
;L
;M
;N
;O
;P
;Q
;R
;S
;T
;U
;V
;W
;X
;Y
;Z
; Examples of SIMPL phrases
; eg add 123 and 456 and print the result to the terminal
; 123 456+p
; Loop 10 times printing "Spurs are Fab!"
; 10(_Spurs are Fab!_)
; Flash a LED 10 times 100mS on 200mS off
; 10(h100ml200m)
; Toggle a port pin at 1MHz 1000(hlhlhlhlhlhlhlhlhlhl)
; That's all folks!
;-------------------------------------------------------------------------------