Qzero with SRAM extension reaching 40 MHz 68040

Nagging hardware related question? Post here!
lliont
Gold Card
Posts: 338
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by lliont »

Peter this is a fantastic speed, in my core the bottleneck is not the ram speed but the cpu core performance, from some test I did, it seems I can't clock the TG68K.C at high frequency.

And it's not the memory speed because I do zero wait state transfers from memory to video line buffer at block ram at 32Mhz.

QLion Gold card at 32Mhz although it has sram is currently about as fast as QIMSI Gold with sdram at 40Mhz, from what I see it could be way faster.

Is this the same public TG68K.C core you are using? Is Lattice tool better in synthesizing than Quartus. Is my fpga not so fast?
Most probably the approach I used for the use of the core is not optimal because my experience with the core is limited.

Anyway I currently can't reach that kind of speeds, congratulations!


User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Peter »

Hi Leon, thanks for the flowers!

We hardware guys have no chance against the emulators in terms of speed anyway. If we used 10 ns parallel SRAM for 16 MB to get even half of the Q68 memory, costs would skyrocket. Even to a point, where a 68EC060 from eBay is cheaper than SRAM alone.

And a '060 is magnitudes faster than all we can achieve in lowcost FPGAs as hobbyists. So the "easiest" way to beat the Qzero/SRAM is still to design a new '060 board, where the onchip caches allow efficient SDRAM line bursts. ;)
lliont wrote: Tue Dec 17, 2024 9:13 am Is this the same public TG68K.C core you are using?
Yes it is. All my fixes went into the published HDL sources: https://github.com/TobiFlex/TG68K.C
How about the announced public sources for the Spectrum Next QL core?
lliont wrote: Tue Dec 17, 2024 9:13 am Is Lattice tool better in synthesizing than Quartus. Is my fpga not so fast?
While ago I've searched for a few infos around the technology of our FPGAs and think they are in the same league. Rather yours seemed a little more modern. For someone new to QL hardware, you designed really cool stuff. Nobody here expects that you squeeze the last bit of performance out of your FPGA.


lliont
Gold Card
Posts: 338
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by lliont »

Peter wrote: Tue Dec 17, 2024 10:41 am How about the announced public sources for the Spectrum Next QL core?
I am preparing a new version of the core with some changes and a bug fix and faster, soon sources will be public.


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Mark Swift »

Hi Peter,
Peter wrote: Sat Dec 14, 2024 8:57 pm If someone has a Q40 at hand, please try and post the result.
Here is some timings from my Q40 with copyback enabled

Q40-Timings.jpg
SMSQ/E at the top and QDOS Classic at the bottom.
I know you only asked for the QTOP + SMSQ/E timings but while I had my Q40 out of the cupboard...


User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Peter »

Hi Mark,

oh how nice :D Many thanks for your christmas benchmarks, glad you still have a working Qx0! QDOS Classic is still cool, an amazingly portable and modular QL OS. I hope it can be completed for Q68 and QIMSI some day.

Regarding my sensational headline, I'd have to back down now, if you really tested a Q40.

Your result is very hard to believe though. Because in Dhrystone, TEST909 and QSBB_BAS, the Q60/80 was almost three times Q40 speed. Which is reasonable, because the CPU runs at double clock speed plus the architectural and cache size advantages. Motorola 68060 Manual even states 1.6 to 1.7 times higher performance at same clock over a 68040.

And now a 80 MHz 68060 scoring only 39% better than a 40 MHz 68040?
Q-Top Index 80 MHz Q60
Q-Top Index 80 MHz Q60
It looks like something went utterly wrong - but what?

I have SMSQ/E version 3.33 in Q60 ROM. Which definitely executed from the (faster) RAM.
I made sure that Writethrough differs from Copyback result. So cache mode selection works.
I've also checked BogoMIPS to be around 2 * 80 = 160, so the clocks work right.

Could you check if your Q40 has about 2/3 * 40 = 26.6 BogoMIPS as it should? Attached here for convenience.

Q-Top Index full of MOVEP instructions? :o
Does your Q40 run on steroids maybe? ;)

More seriously, what comes to my mind is that some 60 MHz Q60 were made from 68060RC50 chips.
The factor between our results is not exact 80 MHz / 60 MHz, but due to external memory timings it is still plausible.

Sorry for the stupid question, but are you sure you actually have a Q40?

All the best
Peter
Attachments
bogomips.zip
(18.92 KiB) Downloaded 60 times


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Mark Swift »

Hi Peter,
Peter wrote: Wed Dec 18, 2024 12:16 am glad you still have a working Qx0!...
It has survived by being stored at the back of my wardrobe. The computers stored in my loft have not faired so well.
Peter wrote: Wed Dec 18, 2024 12:16 am Sorry for the stupid question, but are you sure you actually have a Q40?
It's not an unreasonable question.
It started life as a Q40 and I don't remember an upgrade, but It's entirely possible that I may have forgotten.

Qnowuncertain.jpg

The processor is obscured by a heatsink. I'll check 161(a6) and BogoMIPS after work.

Mark


User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Peter »

Mark Swift wrote: Wed Dec 18, 2024 8:12 am It has survived by being stored at the back of my wardrobe. The computers stored in my loft have not faired so well.
Thanks for providing the Q60 privileged treatment. :D I've found the following email from Nov 24, 2000:
Mark Swift wrote: Thanks, I got the Q60 yesterday. Plugged it all in last night... works great.
Thanks for the nice internal view on your Q60. Can't see the upper quartz oscillator exactly, but by now I bet it is 60.0 MHz. A frequency never used on Q40, and a clear idicator it must be a Q60/60.

Just not sure why the factor between our machines in Q-Top is 1.39 and not exactly 1.33. I did not optimize the Q60 DRAM controller especially for 60 MHz. It is probably the 66 MHz controller running 10% slower. Since SMSQ/E does regular cache flushing to DRAM (even when not required) this might be an explanation.

By the way, I noticed something a little weird. Under QDOS Classic with copyback cache, I get exactly 160.0 BogoMIPS as I should. Under SMSQ/E 3.3 it is only 157.9 BogoMIPS. I have no idea for what they consume 1.3% of CPU time with no extension loaded and no other job running.

All the best
Peter


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Mark Swift »

Hi Peter,

Yes, its an 060.
The quartz oscillator is 60.0 MHz and PEEK(164001) returns 96,
Peter wrote: Wed Dec 18, 2024 9:20 am Under QDOS Classic with copyback cache, I get exactly 160.0 BogoMIPS as I should. Under SMSQ/E 3.3 it is only 157.9 BogoMIPS.
I see the same discrepancy. I can't think why.
Under QDOS Classic with copyback cache I get 119.97 BogoMIPS. Under SMSQ/E 3.41 I get 116.33 BogoMIPS.
Peter wrote: Wed Dec 18, 2024 9:20 am
Mark Swift wrote: Thanks, I got the Q60 yesterday. Plugged it all in last night... works great.
...I can't believe I didn't remember that
I must have been as happy then to have an 060 as I am now to find out I still have one.

Sorry I can't help with the Q40 timings though.

Mark


User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by Peter »

Mark Swift wrote: Wed Dec 18, 2024 9:04 pm I must have been as happy then to have an 060 as I am now to find out I still have one.
Hehe, very good as it still seems to work fine! :D
How did you manage to get a full size picture? Still a CRT monitor?
Mark Swift wrote: Wed Dec 18, 2024 9:04 pm Sorry I can't help with the Q40 timings though.
Nobody else responded, so I temporarily built a Q40 myself from a Q60 board:
Q-Top Index 40 MHz Q40
Q-Top Index 40 MHz Q40
In this benchmark, the Q40 is 11% faster than the Qzero with SRAM.
Which I see within tolerance to a 40 MHz 68040 for QL purposes. :D


User avatar
ql_freak
Super Gold Card
Posts: 509
Joined: Sun Jan 18, 2015 1:29 am

Re: Qzero with SRAM extension reaching 40 MHz 68040

Post by ql_freak »

Peter wrote: Thu Dec 19, 2024 12:24 am In this benchmark, the Q40 is 11% faster than the Qzero with SRAM.
Which I see within tolerance to a 40 MHz 68040 for QL purposes. :D
Am I right, that a QZero is not available (as e.g. Q68, thank you Derek!)?

What would it cost to build a batch of QZero?


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply