Tag: RISC-V
-
Further thoughts on Forth (and Riscyforth in particular) and Life
It’s now two years since I began my Riscyforth project of writing a Forth for RISC-V single board computers. But it wasn’t until yesterday that I wrote my first serious/useful (if you like this sort of thing) program for it, a version of Conway’s Game of Life. (This program wasn’t as long as the unit…
-
New release of Riscyforth
There is a new release (0.7) of Riscyforth – my Forth for RISC-V based single board computers available – Riscyforth 0.7. This release adds significant support for 64-bit IEEE754 floating point numbers to broadly match the 2012 Forth standard. The implementation of the Forth floating point word set isn’t yet quite complete and Riscyforth does…
-
The unreasonable ineffectiveness of arithmetic with floating point numbers
Eugene Wigner’s wrote a famous short essay “The Unreasonable Effectiveness of Mathematics in the Natural Sciences” in 1960. To be honest I find it slightly underwhelming: to me mathematics is the abstraction from physical reality and not – as might be implied by Wigner – that our physical universe is a concretised subset of a…
-
Trusting the world of floating point
A lot of the everyday calculations we rely on depend on “floating point arithmetic” – in other words an approximation of accurrate mathematics and not actual accurate mathematics. For the last six weeks or so I have been working on bring floating point arithmetic to “Riscyforth” – my assembly-based implementation of Forth for Risc-V “single…
-
How I actually extended Riscyforth
Before I suggested I was going to add dynamic linking by rolling on object files but that turned out to be pretty inflexible. Then I thought I could pass needed initialisation values via use of the gp register (using it as a stack pointer). That actually seemed to work but it was pointed out to…
-
Adding dynamic linking to Riscyforth
This is one of those blogs one writes to clarify inchoate thoughts, so it’s sorry-not-sorry if it starts to wander around… Last week I got to an important point with Riscyforth, my Forth for RISC-V single board computers: I tagged my first release (v0.1). I did that because I had, finally, managed to cover all…
-
Riscyforth at one
RISCYFORTH, my Forth for RISC-V SBCs is one year old today. I’ve added a new markdown file – hopefully one day a man (7) file – that lists what words are supported and what words from the Forth 2012 core still need to be implemented.
-
More on the Riscyforth versus Gforth shootout
This is a further post about optimising Riscyforth, my Forth language for RISC-V single board computers. Riscyforth is a 64-bit Forth which runs on top of Linux – my test system is the Sipeed Nezha SBC – which runs a 1 GHz single core CPU (so 1 cycle is one nano-second). I’m testing it against…
-
Forth code optimisation revisited
I have spent much of the last week working on optimising my Forth code, or more accurately, optimising the RISC-V assembly which actually does the work of executing the Forth words. (See this for the initial discussion.) I cannot properly profile the assembly itself – my efforts to compile the code using gcc -pg aren’t…
-
The actual optimised code
I discovered when I tried to write my optimised code from last night that there was a problem with it – the various register add instructions use a 5 bit number to number the registers being accessed – allowing access to registers 0 to 31. But the program counter is register number 32, so just…