6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:19 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sun Aug 08, 2021 3:20 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
Hi, All.

So, i've been trying to implement a DMA controller using PIC microcontrollers. Anyway, while doing unrelated reading, I came across an article on Hackaday (https://hackaday.com/2021/08/05/raspberry-pi-pico-used-as-a-transputer/) about using Pi Picos to control four-way, high-speed communications in an emulated "Transputer" set-up. Apparently, the PIO is quite fast and flexible. Which lead me to wonder whether one might be able to implement a DMA controller using the Pi Pico?

Hoglet (Dave) has already explored the bones of this issue, i.e., interfacing the PIO with the 65c02 bus: https://github.com/hoglet67/pico_bus6502

Of course, there is the matter of voltage - the Pico is a 3.3v tolerant device.

Anyway, just putting it out there. Thoughts? Is this workable? If so, what would the mechanics look like? Hardware setup? Software setup?

Regards,

Jon

PS There is also the possibility of using the FlexIO on a Teensy 4.0 or 4.1, but I can't seem to find much documentation on that.


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 08, 2021 3:34 pm 
Offline

Joined: Sun Jun 29, 2014 5:42 am
Posts: 352
Are you thinking of the DMA model where the 65C02 continues running during the DMA transfer?


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 08, 2021 3:58 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
hoglet wrote:
Are you thinking of the DMA model where the 65C02 continues running during the DMA transfer?


Not any particular mode, though I saw some discussion here about cycle-stealing. But, no, in any DMA mode, whatsoever.

Jon


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 08, 2021 6:43 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
I think hoglet was referring to using the dead bus cycles found in some instructions, as referred to in the "The secret, hidden, transparent 6502 DMA channel" topic. That way there is no slowing of the processor. No cycles are "stolen."

_________________
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: Sun Aug 08, 2021 7:32 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
GARTHWILSON wrote:
I think he was referring to using the dead bus cycles found in some instructions, as referred to in the "The secret, hidden, transparent 6502 DMA channel" topic. That way there is no slowing of the processor. No cycles are "stolen."

Got it.

I don’t see any threads on using a Pico, yet, to do this. What do you think?

Jon


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 09, 2021 6:29 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
Jmstein7 wrote:
GARTHWILSON wrote:
I think he was referring to using the dead bus cycles found in some instructions, as referred to in the "The secret, hidden, transparent 6502 DMA channel" topic. That way there is no slowing of the processor. No cycles are "stolen."

Got it.

I don’t see any threads on using a Pico, yet, to do this. What do you think?

Jon


You have just under half a clock cycle to Tristate the 6502 (BE pin on the WDC ones), output an address + data + strobes to the RAM (write) or just address + strobe for read.

This is a "solved" problem in that reading at least is how it was done for video on the Apple II and many others at the time, so the question is; is the Pico fast enough to do this transaction using its PIO engines? You have under 0.5µS per transaction at 1Mhz...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 09, 2021 8:22 am 
Offline

Joined: Sun Jun 29, 2014 5:42 am
Posts: 352
It's hard to offer advice here without a few more constraints, or a better understanding of your motivations and/or end goals.

If you run the 6502 slow enough, it might well be possible to implement a DMA engine using a Pico (using the PIO state machines and/or one of the ARM cores). Especially as the Pico is readily overclockable to in excess of 250MHz.

The biggest constraint might be the limited pin count on the Pico - it has only 26 general purpose I/O. A 6502 DMA engine would typically need a few more than this (PHI2, A15..0, D7..0, RnW, Rdy, BE is 28).

However, it all depends on what your end goal is.

For example, a 65C02 running at 25MHz with no DMA engine will almost certainly out perform a 65C02 running at 2MHz with a Pico-based DMA engine.

If your goal is to create a test-bed that allows you to experiment with different DMA engine designs, you would almost certainly be better off creating a 3.3V only system that conprised a W65C02, a small FPGA and 16-bit wide fast static RAM.

That's probably the approach I would take.

But like I say, it really all depends on what you want to achieve.

Dave


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 09, 2021 2:07 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
hoglet wrote:
It's hard to offer advice here without a few more constraints, or a better understanding of your motivations and/or end goals.

[...]

If your goal is to create a test-bed that allows you to experiment with different DMA engine designs, you would almost certainly be better off creating a 3.3V only system that conprised a W65C02, a small FPGA and 16-bit wide fast static RAM.

That's probably the approach I would take.

But like I say, it really all depends on what you want to achieve.

Dave


Dave,

That's precisely what I'm after - a generalized test platform for trying out and optimizing different, varied designs.

Jon


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

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