Last visit was: Wed Oct 29, 2025 8:04 pm
It is currently Wed Oct 29, 2025 8:04 pm



 [ 20 posts ]  Go to page Previous  1, 2
 Tridora-CPU - an FPGA stack machine CPU for Pascal 
Author Message

Joined: Mon Oct 07, 2019 2:41 am
Posts: 853
The CMOS version of the PDP 8 had a stack. IF I was redesigning the 8 , I would have 002X as auto decrement resisters that map to 001x
and Jump to subroutine pushes the PC using 17 as the stack.


Wed May 28, 2025 2:04 am

Joined: Sun Oct 20, 2024 9:43 pm
Posts: 8
oldben wrote:
The CMOS version of the PDP 8 had a stack. IF I was redesigning the 8 , I would have 002X as auto decrement resisters that map to 001x
and Jump to subroutine pushes the PC using 17 as the stack.


Ah, didn't know that, interesting. Come to think of it, the PDP-8 had quite a long lifespan if you count the microprocessor versions and considering the (for the 1970s) limited architecture.


Wed May 28, 2025 10:57 pm

Joined: Sun Oct 20, 2024 9:43 pm
Posts: 8
Another update for the Tridora-CPU - it now has a data cache in addition to the instruction cache.

This has a noticable impact on compile times: building "hello,world" now takes 15 seconds instead of 20.

As with the instruction cache, it just caches the 16 bytes that the DRAM controller always delivers. Since with the stack machine architecture you often read, write and read the same location again, it was important to implement it as a write-back cache. Otherwise the cache would be invalidated too often.

Thankfully, the write-back mechanism was not as complicated as I feared.

I have updated the benchmark results at https://gitlab.com/slederer/Tridora-CPU/-/blob/main/examples/benchmarks.results.text. If you compare the performance when running code from DRAM without any caches to the current version, you get a three times better performance in the empty loop benchmark.

In comparison to running without data cache but with instruction cache, you get 1.6 times better performance.

The other big thing is this update is the audio controller. I finally hooked up the Digilent AMP2 PMOD and added something like the sound generator chips of the early 1980s to the logic design: Four channels of rectangle waves and a noise generator. Then I thought, that is boring, and reworked it so that now it can to interrupt-driven sample playback at (at least) 32KHz (mono).

Here is a video where you can hear the Tridora-CPU making noises and playing music: https://youtu.be/p3USZ40Du24

And now I guess it is already time to plan this year's christmas demo...


Mon Oct 13, 2025 10:05 pm

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1846
Thanks for the update - good to see small caches making good performance improvements!


Tue Oct 14, 2025 10:06 am
User avatar

Joined: Sun Dec 19, 2021 1:36 pm
Posts: 104
Location: Michigan USA
Thank you for the link to your video. I enjoyed watching it. The sound quality is really amazing! Michael


Tue Oct 14, 2025 11:28 pm WWW
 [ 20 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: chrome-134-bots, chrome-8x-bots, Newsai 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

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software