how many instructions is the 6510 able to do in 1 clock?

Let's talk about anything related to the 6502 microprocessor.
e2020
Posts: 17
Joined: 13 Apr 2011

how many instructions is the 6510 able to do in 1 clock?

Post by e2020 »

hello :D

I'm trying to get a basic understanding of the efficiency of this cpu - so this question came up:

is the 6510 able to do 1 multiply-add and 1 multiply per clock?
or more?


thanks in advance for your answer!
e2020
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

6502 multiplies require a program like the ones under "Integer math" on this page. The minimum instruction time on the 6502 (or 6510) is 2 clocks. The average number of clocks for 1 instruction is 4, as it is on the PIC16 microcontrollers (although the 6502's richer instruction set allows it to do a job in about half as many instructions as the PIC takes to do the same thing). This was in a day when most 8-bit processors required 12 or more clocks to carry out a single instruction. IIRC, the 68000 processor which had a multiply took something like 170 clocks to do a multiply. Now of course the high-end processors today just implement single-cycle-multiply hardware; but it takes a lot of silicon real estate to do it.

The 6502 is still getting made in huge quantities (hundreds of millions per year), and some running at over 200MHz, although they're going into custom ICs for dediccated control jobs that don't need single-cycle multiply. OTOH, the 6502 has better interrupt performance than a lot of the high-end processors too though. My 5MHz 6502 workbench computer does a 2048-point complex FFT in 16-bit fixed-point in about 5 seconds in Forth (not particularly optimized, and not assembly language). A big attraction to the 6502 is its performance-to-complexity ratio, and the simple bus structure.
e2020
Posts: 17
Joined: 13 Apr 2011

Post by e2020 »

thanks for your answer.

200MHz is fast for a 6502 - but not really fast compared to todays cpus - why aren't there 6502 running @ 3Ghz (3000 mhz) ?
please answer here
e2020
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Post by Arlet »

e2020 wrote:
why aren't there 6502 running @ 3Ghz (3000 mhz) ?
please answer here
What's the market for such a thing ? No good C compiler, small memory, and no cache. If you need high performance, there are plenty of CPUs already available.
ChuckT
Posts: 491
Joined: 20 May 2009

Post by ChuckT »

Arlet wrote:
e2020 wrote:
why aren't there 6502 running @ 3Ghz (3000 mhz) ?
please answer here
What's the market for such a thing ? No good C compiler, small memory, and no cache. If you need high performance, there are plenty of CPUs already available.
I've been asking myself this same question. The Wii 2 will be introduced making 6502 technology seem even older. I'm wondering if the Wii 2 will have HD support. What processors would you recommend?
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

It's been said before: ARM is a nice choice. It was somewhat inspired by 6502, so it will seem familiar enough if you want to program in assembly, and it's everywhere. And it's cheap, and it's fast. There are various dev boards, there's one or two HP calculators which can be re-purposed as such, there's LEGO mindstorms, there are various cheap NAS and wifi boxes to experiment with.
Last edited by BigEd on Fri Apr 15, 2011 4:30 pm, edited 1 time in total.
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Post by Arlet »

Agreed. I like ARMs. Easy to work with, low power, and available in a wide range of models. The smallest (ARM7) is tiny on a modern process, something like 0.3 mm^2, and much faster than a 6502 running on the same clock.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

Arlet wrote:
... available in a wide range of models...
No kidding: the beagleboard is $125, 720MHZ, POWERVR graphics, etc, etc, whereas STM32VL Discovery is 12.14 EUR, 24MHz, 64-pin module.

(Edit: also now the beagleboard-xM at 1GHz)
Last edited by BigEd on Fri Apr 15, 2011 4:45 pm, edited 1 time in total.
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Post by Arlet »

I've worked with the OMAP35xx... I still shudder at the 3500 page user manual :)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

I suppose we're saying there's a world of difference between a simple CPU core and a horrendous/wonderful system-on-chip surrounding it? (Edit: not meant to sound sarcastic...)
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Post by BigDumbDinosaur »

Arlet wrote:
e2020 wrote:
why aren't there 6502 running @ 3Ghz (3000 mhz) ?
please answer here
What's the market for such a thing ? No good C compiler, small memory, and no cache. If you need high performance, there are plenty of CPUs already available.
The basic 65xx design at 200 MHz (as found in custom ASICs) has greater throughput than an Intel architecture MPU at the same clock rate, especially when interrupt latency is considered. So it could be argued that the market isn't there because the 200 MHz iteration performs more than adequately in its intended task. I suspect that if a 65xx application were developed where higher performance was required someone would figure out how to make it go faster.

Something Mr. e2020 should think about is just what is getting accomplished at 3000 MHz. While the MPU core may be running that fast, the buses and memory subsystem are not. A contributing factor to the 65xx family's efficiency is the fact that the address and data buses are synchronous to the MPU clock, not a submultiple of it. If an AMD Athlon II system running at 3000 MHz were slowed down to 200 MHz, with a corresponding reduction in bus and memory subsystem speed, it wouldn't produce the throughput of a 65xx system running at the same clock rate.

Regarding memory, the 16 MB limit of the 65C816 may seem terribly small to some. However, I need to remind you that it wasn't all that long ago when 16 MB of memory was luxurious. My first UNIX box (c. 1988) ran on 2 MB of RAM and had little difficulty in supporting 16 simultaneous users (albiet with a fair amount of disk thrashing). I will say that it noticeably speeded up when I added another 2 MB to it. :) When I built my new AMD 486DX100 box in 1994, I started with 8 MB of RAM and it ran fine. So capacious memory in itself is not necessarily a particular advantage unless a system fully utilizes it.

As for the C compiler, there are several good ones for the 65xx family. WDC's own ProSDK has an excellent C compiler that is tailor-made for emitting efficient 65C816 native mode code. While ProSDK is pricey, its cost to a professional developer would not be an issue.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
ChuckT
Posts: 491
Joined: 20 May 2009

Post by ChuckT »

BigEd wrote:
Arlet wrote:
... available in a wide range of models...
No kidding: the beagleboard is $125, 720MHZ, POWERVR graphics, etc, etc, whereas STM32VL Discovery is 12.14 EUR, 24MHz, 64-pin module.

(Edit: also now the beagleboard-xM at 1GHz)
These things looked easy until I actually look into the development platform that is selling for the suggested retail price of $1150:

www.ti.com/orderzoom

I basically don't have that kind of money.

The manuals are written for engineers instead of average people.

ARM is nice but it costs several hundreds of dollars based on which version you want.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

ChuckT wrote:
...the development platform that is selling for the suggested retail price of $1150...
Hang on, that's a development platform. Yes, it's expensive, but it's for companies intending to design and sell product in volume. The kits I linked to are more suitable for one-off projects, and have more suitable prices. You can certainly get started with ARM for under $100.

(Edit: but indeed if you want hundreds of megahertz then you do need to spend a bit more)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

As this is already a bit of a meandering thread, I hope I'm not doing too much additional damage by mentioning this note - a company making an ARM-compatible core relaxed cycle-compatibility in their FPGA version to allow themselves to raise the clock speed from 40MHz to 60MHz. (It's not an ARM-licensed core, but they believe they've avoided patented elements.) (Page is dated 2001)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

There are plenty of considerations in the performance arena, some of which have already been mentioned. I mostly use my 2.4GHz PC for web access, photos that take a lot of memory compared to what a 6502 system would have, and video which takes a lot of processing power. But I hate the fact that sometimes when I type, the PC won't update the screen for a couple of seconds-- a problem we never had on the Commodore 64! My 5MHz 6502 workbench computer can do real-time work that the PC cannot do.
Last edited by GARTHWILSON on Fri Apr 15, 2011 7:00 pm, edited 1 time in total.
Post Reply