Last visit was: Wed Mar 29, 2023 4:01 am
|
It is currently Wed Mar 29, 2023 4:01 am
|
rf68000 - 68k similar core
Author |
Message |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Added a nano-cache to the core for instructions. Eight-entry fully associative. It does a wonderful job of speeding up small loops and things are noticeably faster. However, the screen display is now corrupt. It must be sending back-to-back writes through the network too quickly now. So a delay routine was added. Adding the delay routine fixed up the screen issues even on the other core too.
Been working on the string handling. Had to update things to take into account strings contained by local variables. Which means digging into the stack to find them. As it is the code updates variables on the stack when it is extremely likely a string. That means if data on the stack looks like a string it might get updated incorrectly. I am leaving it this way as it is TinyBasic. The data type is checked on the stack, then the pointer is checked to see if it is into the string area. If both those are true then it is assumed to be a string var.
This has led me into thinking of developing a processor with the data type tagged on the stack. If it were always know that a certain portion of the stack indicated the data type then it would be easy to do garbage collection. Keeping the stack 128-bit aligned for instance, a 32-bit data type and a 96-bit value could be stored on it.
_________________Robert Finch http://www.finitron.ca
|
Sat Dec 24, 2022 4:06 am |
|
 |
BigEd
Joined: Wed Jan 09, 2013 6:54 pm Posts: 1745
|
It's quite remarkable to what degree cache size is a matter of diminishing returns. I recall we did very well with a tiny (direct-mapped, I think) cache in our OPC adventures.
|
Sat Dec 24, 2022 9:08 am |
|
 |
oldben
Joined: Mon Oct 07, 2019 2:41 am Posts: 431
|
Do you have cache for each style of memory acess, program counter, text segment,stack segment,video ram and i/o segment? How well does the cache work with virtual memory? Have you ever ran a simulation of your cache model? I still think in terms FORTRAN IV here for that, is this showing my AGE? Ben.
|
Sat Dec 24, 2022 1:39 pm |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Quote: Do you have cache for each style of memory acess, program counter, text segment,stack segment,video ram and i/o segment? No. There is only an eight instruction word cache. I may add more later. Thinking about adding a larger direc-mapped cache. 3/4 of access is fetching instructions. Quote: How well does the cache work with virtual memory? I am not using virtual memory ATM. So it likely does not play nicely if virtual memory is added. Quote: Have you ever ran a simulation of your cache model? I still think in terms FORTRAN IV here for that, is this showing my AGE? I just ran it directly from the FPGA.
_________________Robert Finch http://www.finitron.ca
|
Sun Dec 25, 2022 5:08 am |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Quote: I recall we did very well with a tiny (direct-mapped, I think) cache in our OPC adventures.
What ever happened with OPC?
_________________Robert Finch http://www.finitron.ca
|
Sun Dec 25, 2022 5:15 am |
|
 |
BigEd
Joined: Wed Jan 09, 2013 6:54 pm Posts: 1745
|
OPC... from a CPU design and implementation perspective, I think not much has happened for perhaps 5 years. But back in 2020 a PiTubeDirect release brought OPC second processors to the hundreds of people with a Beeb, a Pi, and a suitable adapter board. And I see revaldinho recently (last year) optimised some Pi-calculating code for the OPC7. https://github.com/revaldinho/opc/commits/masterhttps://github.com/hoglet67/PiTubeDirect/releaseshttps://revaldinho.github.io/opc/Most recently the T3X language has caught my eye https://t3x.org/t3x/index.html> T3X is a family of programming languages that share a common syntax, but offer different runtime environments and focus on different aspects of programming. All T3X compilers are small and fast and easily bootstrapped. Some of them support modules and separate compilation, some compile to machine code in a single step. The original compiler was targetted at the 16-bit Tcode machine, but native code backends for various processors exist. (Edit: I see on a nearby page it wants many 100k of RAM, which we don't have. But I also see a Z80 version which doesn't need s much. More reading is needed!)
|
Mon Dec 26, 2022 4:44 pm |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Had the divide operands backwards in TinyBasic leading to incorrect divide results. Found the loop variable in a FOR/NEXT statement was not being handled properly. Leading to type mismatches. I had a quick look at the T3X language and was glad to see they provided a grammar listing as well as descriptive text. Quote: Edit: I see on a nearby page it wants many 100k of RAM 100k of RAM is not very much these days.
_________________Robert Finch http://www.finitron.ca
|
Tue Dec 27, 2022 7:34 am |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Finally got Basic working well enough to perform the prime.bas test again. This time it crawls at 6:54 six minutes, fifty four seconds to find the first 1000 primes. It is using decimal float arithmetic. I should find a way to eliminate the subroutine call as it copies values to / from memory.
_________________Robert Finch http://www.finitron.ca
|
Tue Dec 27, 2022 7:49 am |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Spent most of the time today working on Thor2023. But,
added the DFPTrunc96() module to the decimal float module collection. Trunc() returns the integer part of a floating-point number in a float register. It essentially implements the INT() function in BASIC.
Changed the prime.bas program to be more similar to the original and eliminated a multiply and subtract. Hopefully it will run a few seconds faster.
_________________Robert Finch http://www.finitron.ca
|
Thu Dec 29, 2022 8:08 am |
|
 |
robfinch
Joined: Sat Feb 02, 2013 9:40 am Posts: 1886 Location: Canada
|
Please note the most recent version of the core is rf68000 located in the rf68000 repository. https://github.com/robfinch/rf68000I should maybe change the name of this topic. The original FT68000 core is very outdated and no so 68k compatible.
_________________Robert Finch http://www.finitron.ca
|
Sat Jan 14, 2023 2:20 pm |
|
Who is online |
Users browsing this forum: CCBot and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|