6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 4:16 pm

All times are UTC




Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Thu May 06, 2021 1:33 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1114
Location: Albuquerque NM USA
Aloha6502 wrote:
Hi. Has anyone ever designed a multiprocessor system using only the 6502 as the computing device for everything? That is, one 6502 dedicated to sound, one for video, one for running the main program, one for handling I/O, etc?

cluster of 6502 to handle disk, serial, I/O, keyboard, and video with serial or dual port memory as interprocessor communication should be quite do-able. The biggest challenge may be a decent performing (VGA or better) video. If you keep the video 6502 circuit simple, it is reasonable to overclock 65c02 to 25.175mhz to drive video output directly. Such video 6502 also has enough throughput left to receive serial data at 230400 baud. viewtopic.php?f=4&t=6517
Bill


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 3:37 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
BigEd wrote:
A VIA is a ready made way to have a couple of byte-wide ports with handshaking. But two other approaches spring to mind: simple octal TTL devices for simple byte-wide ports on the one hand, and FIFOs on the other.

Coordinating the tasks of the various subsystems needs to be right - you could lose a lot of time debugging that. It's much easier if the flow of data is unidirectional. For example, if the keyboard CPU only produces keystrokes (and doesn't need to be told to light LEDs), and if the graphics CPU only produces video (and is not queried for what's in the buffer or where the cursor is.)


Ok great. Thanks for highlighting the importance of unidirectional flow. I had thought about something similar too, just delegate the task to the subsystem, but didn't realize asking for feedback (say, to confirm the command finished) would incur much more complexity.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 7:48 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
BigDumbDinosaur wrote:
GARTHWILSON wrote:
I expect that the easier hardware solution would be to have the various computers connected only loosely through I/O, probably by synchronous-serial links, not trying to access the same bus and same memory. You would not need special clocking, or DMA, or dual-port RAM, or complicated bus management. Then you could have a mesh with each processor communicating with several around it.

Synchronous-serial would probably be too slow for I/O and video. A synchronous parallel bus arrangement using some VIAs might be more effective. Eight bits would be employed to pass data between MPUs, some bits would be used for clocking and some other bits could be used for selecting the slave MPU that is to respond and to indicate the transfer direction.

The VIA's SR allows shifting up to one bit every other phase-2 cycle, meaning 8Mb or 1MB per second at 16MHz; so although it's not as fast as a parallel interface running on DMA, it is approximately as fast as the processor can fetch it from an array in memory and feed it to the VIA in a loop, even without handshaking. The receiving end, if it is running at the same phase-2 speed, would need to be in a loop, not using an interrupt for each byte.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 8:20 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
So I read in the other thread it's possible to run the 65C02 at 25.175MHz?

Is this pretty "de facto standard" or only a few lucky chips? Officially I was told WDC rates the 65c02 at 14 MHz max.

What about the supporting RAM and ROM chips? And glue logic?

I haven't come across any newbie instructions (category of this sub-forum :) ) that use that high of a clock speed to give examples, so my concern is whether these chips (usually are obsolete by today's standards and bought/used by vintage hobbyists like us) won't burn up at that speed?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 8:49 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Aloha6502, 14MHz is a conservative guarantee that the processor can run and meet the timing margins across the whole temperature range at at least that speed.  Forum member Windfall has a 65816 running at 24MHz at 3.3V.  It's only guaranteed for 8MHz at 3.3V, so he's getting three times the guaranteed speed.  It makes me wonder what it could do at 5V!  [Edit, later:  Forum member "Plasmo" got one running at 40MHz @ 5.3V.]  WDC's data sheets have had tons of problems; but fortunately the reality is almost always a lot better than the data sheets let on, and the only way to find out what they can really do is test it ourselves.

In an online interview I saw, Bill Mensch said that even in the 1970's, to label a 6502 for a given speed, it had to work at twice that speed in their manual tester; so for example for a part to be labeled 1MHz, it had to run at 2MHz in the tester, and to be labeled 2MHz it had to run at 4MHz in the tester, etc.; so if one did fine up to 3.9MHz but started having problems at 4MHz, it could be labeled for 1MHz but not 2MHz.  He said they had ones running at 10MHz even in the 1970's.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 9:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
Aloha6502 wrote:
So I read in the other thread it's possible to run the 65C02 at 25.175MHz?

Is this pretty "de facto standard" or only a few lucky chips? Officially I was told WDC rates the 65c02 at 14 MHz max.

As Garth noted, WDC microprocessors can be overclocked well beyond the official 14 MHz rating. In the WDC data sheet for the 65C02, there is a graph that relates clock speed and supply voltage for production devices. Extrapolating that graph to 5.5 volts, which is within the design limits of the 65C02, suggests 25 MHz performance is attainable. As an aside, production devices must pass testing at 20 MHz, which implies that 20 MHz performance can be relied upon.

Quote:
What about the supporting RAM and ROM chips? And glue logic?

74AC and 74AHC glue logic has, in most cases, single-digit nanosecond prop time on five volts. A well-designed circuit using those devices should have no trouble keeping up with a 65C02 running at 20+ MHz.

SRAM is available in 10ns, which is more than fast enough for 20 MHz operation without wait-states. ROM is another matter. At 20 MHz and using a typical 70ns EPROM (fastest currently available from most distributor stock), two wait-states per ROM access would be required to avoid timing violations.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 11:11 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
As Spock would say, FASCINATING!

Thanks for all the undocumented tips guys!


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 11:13 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
BigDumbDinosaur wrote:
SRAM is available in 10ns, which is more than fast enough for 20 MHz operation without wait-states. ROM is another matter. At 20 MHz and using a typical 70ns EPROM (fastest currently available from most distributor stock), two wait-states per ROM access would be required to avoid timing violations.

So, maybe there can be a startup routine to copy certain parts of ROM into RAM and then run only from RAM addresses from that point on.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2021 11:54 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1114
Location: Albuquerque NM USA
Aloha6502 wrote:
So I read in the other thread it's possible to run the 65C02 at 25.175MHz?

Is this pretty "de facto standard" or only a few lucky chips? Officially I was told WDC rates the 65c02 at 14 MHz max.


My experience with overclocking W65C02 is based on one lot of 10 new W65C02 from Mouser. The same lot of parts are used across 4 SBC designs with different top speed depending on the designs. 24Mhz is the slowest for the more complex design to 29.5mhz for the simplest design. 65C02 may not be the limiting part in maximum clock; it could be other parts and even physical wiring. Different lot of parts and different designs will have different top speed. Video 6502 is closely related to CRC65 (viewtopic.php?f=6&t=6440) which is a simple design good to 29.5mhz, 7 out of 7 tries.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 12:00 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1114
Location: Albuquerque NM USA
Aloha6502 wrote:
BigDumbDinosaur wrote:
SRAM is available in 10ns, which is more than fast enough for 20 MHz operation without wait-states. ROM is another matter. At 20 MHz and using a typical 70ns EPROM (fastest currently available from most distributor stock), two wait-states per ROM access would be required to avoid timing violations.

So, maybe there can be a startup routine to copy certain parts of ROM into RAM and then run only from RAM addresses from that point on.

My recent design approach uses a small (32-64 bytes) ROM in CPLD which has 10-15ns access time and copies a bootstrap program resided in the CF disk to RAM and executes in RAM.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 5:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
Aloha6502 wrote:
So, maybe there can be a startup routine to copy certain parts of ROM into RAM and then run only from RAM addresses from that point on.

Yep! History repeating itself over and over. :D

What you are referring to is "ROM shadowing," a technique that goes back to the 1970s. In the old days, x86 machines could be configured to shadow not only the BIOS ROM, but the video ROM. Disabling shadowing would drastically slow down any software that accessed the BIOS API due to the wait-stating that occurred. Ditto for accesses to the video ROM. It especially became noticeable as clock speeds went into the double digits.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 6:50 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
BigDumbDinosaur wrote:
Aloha6502 wrote:
So, maybe there can be a startup routine to copy certain parts of ROM into RAM and then run only from RAM addresses from that point on.

Yep! History repeating itself over and over. :D

What you are referring to is "ROM shadowing," a technique that goes back to the 1970s. In the old days, x86 machines could be configured to shadow not only the BIOS ROM, but the video ROM. Disabling shadowing would drastically slow down any software that accessed the BIOS API due to the wait-stating that occurred. Ditto for accesses to the video ROM. It especially became noticeable as clock speeds went into the double digits.


Is this what all the "Zero Wait State" marketing was about in the 1980s?


Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 1:19 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Aloha6502 wrote:
Hi. Has anyone ever designed a multiprocessor system using only the 6502 as the computing device for everything? That is, one 6502 dedicated to sound, one for video, one for running the main program, one for handling I/O, etc? [...] And by the way, just to clarify, when I mention sound and video, I don't mean anything fancy. Just for human interface needs. [...] That is to say, the multiprocessing is not for speed. It is for replacing ASIC dependency. It also has an educational value (at least to me) to do all the stuff using 6502 assembly language and pushing the experimentation of hardware signal timings down to individual cycles.

Aloha, on Anycpu.org I posted regarding a dual-processor 6809 system, and the same ideas could easily transfer to a 6502 multiprocessor system.

Inter-processor communication couldn't be easier, as the two CPU's share access to main memory. And, in support of video, one of the processor sometimes functions as a DMA controller (avoiding the need for a dedicated chip), which also seems in line with your goals. Good news! If you adopt this approach I guarantee you will get some experience dealing with "hardware signal timings down to individual cycles." :lol:

Nowadays it makes more sense to use SRAM (not DRAM). A single SRAM chip would be sufficient. Its address inputs could be fed by a multiplexer that accepts addresses from the two 6502's. (Or you could have more than two, but that might be rather challenging.)

Another option (instead of a multiplexer) is to tie the two CPU address buses directly to each other (and to memory), and to drive the CPU Bus Enable inputs so that only only one CPU will output at a time, with the other CPU's address bus high impedance or "floating" until it gets its turn.

Besides eliminating the multiplexer, this approach also offers a potential mechanical advantage. If you wanted, you could save time and space by soldering one CPU directly on top of the other! :shock: Almost all the pins will connect together anyway, and the few that don't can be managed fairly easily by bending those pins outward on the upper CPU and adding individual flying leads in those cases.

(I seem to recall this "piggyback CPU" idea being mentioned elsewhere on this forum.)

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Fri May 07, 2021 2:01 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 1:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10976
Location: England
Hmm. I've just had a thought. Because the 6502 (and 6800 and 6809, perhaps) only needs active use of the bus for one half of the cycle, it's a common idea, often enough implemented, to have two CPUs sharing the same memory bus. So far so good.

So, if we had a chain of CPUs, each separated by a shared memory, the same odd/even timing could be used. The CPUs at the ends of the chain have only one memory, but it's still shared by the adjacent one. All the others have two memories, one to the left and the other to the right. Any mailboxes or semaphores or data buffers would of course be in the appropriate shared memory depending on which direction the relevant resource is to be found.

One might imagine the keyboard and disk drives at one end, and the video and sound at the other end, with application processing done in the middle, but it needn't be that way.

If the resource isn't directly attached, there would need to be store and forward. For sound, that might be too much latency (or jitter) but for keyboard or serial devices it might be fine.

And now I realise that a chequerboard has the same property: a 'white' CPU operating on one phase shares memory with 2, 3 or 4 neighbours all on the other phase.

We do need some isolation - bidirectional tristate buffers perhaps - but they are available in TTL. Previous sketches used dual port RAM, and we're able to avoid that.

I'd still guess that the major difficulty with this whole area of ideas lies not with the hardware, but with the software. Relatively sophisticated techniques and reasonably good discipline will be needed, or the thing will lock up, or drop or duplicate data.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 07, 2021 5:33 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
Dr Jefyll wrote:
Besides eliminating the multiplexer, this approach also offers a potential mechanical advantage. If you wanted, you could save time and space by soldering one CPU directly on top of the other! :shock: Almost all the pins will connect together anyway, and the few that don't can be managed fairly easily by bending those pins outward on the upper CPU and adding individual flying leads in those cases.

(I seem to recall this "piggyback CPU" idea being mentioned elsewhere on this forum.)

-- Jeff


This is very interesting, and I have come across it in some other places (for example, on one website discussing modifications to the HP-48 calculator by piggybacking RAM chips). However, in that case, the clock speed is trivial. In this case, I wonder if there will be heat problems?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to: