6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 2:20 pm

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Nov 26, 2023 5:52 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Gordon's recent posts about W65C134 reminds me of my dual-port RAM based multi-6502 design. It is not so much a design than a sandbox to play and add more features. The basic idea is two 6502 sharing a 4K dual port RAM. The main 6502 processor set aside 4K RAM space for the dual port RAM, but the coprocessor only has 4K for program and data. an under-utilized CPLD provides the glue logic between these two processors. There are plenty of logic left in the CPLD to add more features, whatever those may be.

At reset the coprocessor is in reset waiting main processor to write to a magic location to release the reset. The 4K dual port RAM is mapped to both coprocessor's top 4K (reset, interrupt, NMI vectors) as well as the bottom 4K (zero page, stack). The main processor first writes reset vector, interrupt vectors to top of 4K and whatever application program; write to a magic location to release the reset; and communicate to coprocessor via dual port RAM and interrupts.

The board is not standalone; it is meant to plug into a RC6502 style connector as shown in the picture.

I don't have a specific application in mind, but I'm encouraged by what Gordon is able to do with W65C134. I thought a video coprocessor to drive BadApple may be interesting; it can also bit-bang SPI, serial, I2C, PS2,so on.
Bill


Attachments:
DPRAM65_r0_scm.pdf [35.49 KiB]
Downloaded 59 times
DSC_74931126_F.jpg
DSC_74931126_F.jpg [ 1.64 MiB | Viewed 15180 times ]
DSC_74951126.jpg
DSC_74951126.jpg [ 1.3 MiB | Viewed 15180 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 6:53 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Looks like a dangerous amount of fun, Bill! A sandbox like that is one big Solution Looking For A Problem! :P

FWIW, I'll share a little fantasy of my own. How often have we see a code sequence something like this:
Code:
LDA  (MyPointer)
INC  MyPointer
BNE $+2
INC MyPointer+1

Since we have two CPU's available, maybe the main CPU should do only the first instruction -- the LDA. Then it'd immediately hurry on to attend to other important business... and leave the helper CPU with the mundane task of updating the pointer for next time! (I guess this implies there'd be an interrupt issued to call attention to the chore.)

A pretty wacky idea, I admit. But in some circumstances the performance boost could pretty substantial... for example, if the pointer were being used at the heart of a Forth inner interpreter or as dispatch for some other Virtual Machine.

-- Jeff

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 7:12 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
facny concept, but DPRAM is usually pretty slow which would limit not only the Co-Processor's clock speed but also the overall bandwidth through it, plus they can be expensive if you're unlucky.
while it would make logic a bit more complicated, you could get away with using regular SRAM and some extra stuff to have an external Processor access it when the Co-Processor is paused.

the W24512AK-10 for example is a single 64kB 10ns SRAM chip that could be mapped to the whole 65C02's Address space, making decoding logic very very simple which could allow the CPU to run at insane speeds.
if you're using a CPLD you have more than enough room for logic that gives the main system some control, like sending an NMI to the Co-Processor, resetting it, or pausing it (ie pulling BE+RDY low) to allow access to it's memory through some tri-state buffers.
then you could also do some very minimal communication in the other direction, for example when the Co-Processor writes to address $0000 it sends an interrupt to the main system.
the whole thing could be done in 6 ICs (plus a clock), making for a very compact little card.

i did toy around with this exact idea before, with a 65816 based system that has slots for multiple of those "compute cards" that would each take up 1 bank in the 65816's memory space and some extra logic to capture every card's interrupt signal and stuff like that.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 9:33 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Oh good, lots of interesting ideas already.

"Big Solution Looking For A Problem" is exactly correct. I have to confess that this is not my first dual-port-ram-coprocessor design. There is one for Z80 for about 4 years now that looks the same. 6502.org has many innovative members and I am hopeful many interesting ideas will come. This particular dual port RAM (IDT7134) has several semaphore flags that I don't know how to use. NMI, IRQ, and RDY (perhaps I should include BE as well?) can be generated from main processor to coprocessor. I'm intrigued by the notion of programmable RDY that allows coprocessor to run programmable number of cycles. The CPLD is intentionally under-utilized to allow experimentation. I use this dual port RAM as video buffer for 25MHz Z80 and 6502, so I know it is fast enough to handle inter-processor communication up to 25MHz 6502.

IDT7134 is one of my "essential" IC that is used in many designs. It is inexpensive, $2 each in quantity, and I keep it stocked up at 50 pcs level. I hardly ever sell them so they are for my own tinkering; in fact, I need to order more.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 4:58 am 
Offline
User avatar

Joined: Tue Jul 17, 2018 9:58 am
Posts: 107
Location: Long Island, NY
Quote:
IDT7134 is one of my "essential" IC that is used in many designs. It is inexpensive, $2 each in quantity, and I keep it stocked up at 50 pcs level. I hardly ever sell them so they are for my own tinkering; in fact, I need to order more.


What speed of IDT7134 have you been using? I've been trying to source cheap 7134's but had terrible luck with getting actual working 20ns chips like I need. The listings I find don't list the speeds, so I get assorted bags where even some of the ones labelled for 20ns don't work. My success rate is low enough to justify buying them from Mouser for full price. :(


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 10:53 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 989
Location: Potsdam, DE
And mouser is listing their cheapest part at over twenty euros in bulk... :shock:

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 12:27 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
You can run two 6502 on the same (data) bus with 180° clock shift. Just switch the address on the shared RAM and you can use single port RAM instead of dual port.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 1:40 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Indeed, you just need to take a little care around the transitions, e.g. truncating the PHI2 clocks a bit and delaying write-enable until a while after the address bus transition takes place.


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 1:42 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Agumander wrote:
What speed of IDT7134 have you been using? I've been trying to source cheap 7134's but had terrible luck with getting actual working 20ns chips like I need. The listings I find don't list the speeds, so I get assorted bags where even some of the ones labelled for 20ns don't work. My success rate is low enough to justify buying them from Mouser for full price. :(

My source for IDT7134 is UTSource. The specific part is IDT71342LA35J so it is a 35nS part. It is involved mostly in video application with 25.175MHz clock. The video controller is reading it continuously from one port at 25MHz and Z80-class processor is reading/writing the other port. Lately I'm replacing Zx80 with 25MHz 6502 and find it capable of supporting 25MHz read/write which is effectively 20nS access time.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 1:45 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 989
Location: Potsdam, DE
I'm trying to get my head around how one can do this and still maintain the requirement for active chip select prior to ph2 rising to keep a 6522 happy - though in my case I'm using BE to actively disable the 6502 while a resistor-coupled address signal is supplied from the video circuit.

At the moment, my design has a 2.5MHz clock, so 200ns half-clock. I'm currently disabling BE for the first 100ns of the ph2 low, clearing it for the second half and for all of ph2 high - which ought to let everything run including a (non-essential) 6522; grabbing the video data as BE goes high. The ram is 45ns so it should have plenty of time, if the decoding is fast enough. I'll find out when I build it!

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 1:56 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
I flirted with Apple II style video using single port RAM and a CPLD to manage switching between video controller and 6502. It was 1-1/2 year ago so I need to revisit the design, but I recall the video portion is 25MHz, but I can only run 6502 at 12.6MHz.
Bill
Edit, my feeling is in case of dual 6502, single-port RAM may work with help of CPLD, but the speed may be limited.


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 3:00 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 989
Location: Potsdam, DE
I wonder if you just need a non-overlapping clock generator and quick enough ram? I vaguely remember the 6800 as needing such a beastie...

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 3:18 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
On the subject of a single RAM receiving its address alternately from two different CPUs, it might be worth considering using a FET-based bus switch as mux. There's a major advantage in regard to speed, because the usual notion of propagation delay (as with a conventional mux) doesn't apply. Instead, the signal path through the switch behaves very much as a resistor, on the order of 10 ohms or less. Based on the capacitance of the load (in this case the address inputs of the RAM), you do end up with an RC delay, but it'll be almost negligible -- just a fraction of a ns! :shock:

I'm attaching a screen shot from a 2004 TI selection guide. Various logic families are represented, and I find the "Mux/Demux" and "Bus Exchange" offerings especially intriguing... 8)

-- Jeff


Attachments:
bus switch selection.png
bus switch selection.png [ 43.36 KiB | Viewed 15056 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 3:23 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Oooh, I think a non-overlapping clock with significant dead zone is a very interesting idea!


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 3:28 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
fachat wrote:
You can run two 6502 on the same (data) bus with 180° clock shift. Just switch the address on the shared RAM and you can use single port RAM instead of dual port.


feel like the timings would be way too tight to do that between 2 seperate boards. plus that would requite both CPUs to run at the same speed, while DPRAM (or the compute card concept i mentioned) would allow both CPUs to run at different speeds. plus it wouldn't scale beyond 2 CPUs without slowing them down.

plasmo wrote:
My source for IDT7134 is UTSource


eyy, that's also where i get all my ATF150x CPLDs, IDT720x FIFOs, and 8/16kB IDT700x DPRAM chips from as well.
though my DPRAM chips are much slower at 55ns. so sadly i can't run them at high speeds, even for video stuff 12.5MHz is roughly the fastest i can go.
that's where a Co-Prcoessor with it's own fast single port SRAM would come in handy. then you could use slower DPRAM for the interface to the main system (or some FIFOs to take up less memory space)

.

wouldn't even having 2 non-overlapping clocks have the same scaling issues (ie having more than 2 CPUs on the same bus will reduce the speed of each individual CPU) as running 2 CPUs on 1 clock with opposite phases?


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

All times are UTC


Who is online

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