6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 5:30 am

All times are UTC




Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Thu Mar 24, 2022 3:27 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
I believe Ben Eater's configuration can run up to 24MHz and therefore G-Pascal can be accelerated accordingly. How to do 24MHz without major hardware/software surgery is the question.

I believe the weak link is EEPROM. Yes, wait state can be added for EEPROM access but that also slow down the whole system, so here is a proposal:
Have fast 64K RAM enabled for the entire 64K memory space but RAM's output enable is asserted only at lower half of the memory space. EEPROM occupies the upper 32K with wait state inserted for 24MHz operation. EEPROM's output enable is asserted at power up while RAM's output enable in the upper 32K memory space is disabled. A small bootstrap routine in EEPROM is executed at powerup that copies EEPROM to itself (must use EEPROM that's not affected by writing to self such as W27C512, SST39SF010). This operation writes EEPROM contents to the shadow RAM. After self-write is done, the bootstrap routine set a flip flop that disable EEPROM output enable and enable RAM output enable and we are now running in zero-wait fast RAM.

Thoughts?


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 7:26 pm 
Offline

Joined: Wed Aug 21, 2019 6:10 pm
Posts: 217
For that use, If using a 74xx163 counter circuit for the clock, you could run the "normal mode" high bit straight from the latch to the counter (P0 for /2, P1 for /3), and just set it high in the part of the startup/coldstart code that comes after copying the ROM andturning off ROM select.

I can see that as a way to run a board based on a W65C02 or W65816 board at 16MHz, although starting at 5.33MHz. The WDC are reportedly able to handle it, even if there was not the market segment to justify WDC getting them retested for 16MHz labelling. Which 6502 are you expecting to run at 24MHz?


Last edited by BruceRMcF on Thu Mar 24, 2022 11:56 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 9:09 pm 
Offline
User avatar

Joined: Wed Mar 09, 2022 9:08 pm
Posts: 18
plasmo wrote:
The 4-line LCD display worked even at 12MHz; I noticed it needs local echoback and use line feed instead of carriage return.


It is gratifying that someone else got it to work. Did you try the assembler?

I mention the need to use local echo here here.

As for linefeeds, I'm used to Linux these days. In any case Windows sends carriage-return/linefeed and I just ignore the carriage-returns.

There may be issues with the 4-line LCD. I assumed that people had the one on Ben's board, and I'm not sure how well the addressing goes past the second line. Perhaps you can report any issues you have.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 9:16 pm 
Offline
User avatar

Joined: Wed Mar 09, 2022 9:08 pm
Posts: 18
plasmo wrote:
After self-write is done, the bootstrap routine set a flip flop that disable EEPROM output enable and enable RAM output enable and we are now running in zero-wait fast RAM.

Thoughts?


Interesting idea. I already suggested a small change that disables writing to the EEPROM.

I don't have a 64 KB RAM, any suggestions for an appropriate one?


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 24, 2022 10:24 pm 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
Nick Gammon wrote:
I don't have a 64 KB RAM, any suggestions for an appropriate one?

Any 128k ram with A16 tied to ground (or or the supply)


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 2:42 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
There are a number of fast 64K RAM in skinny DIP format as described in this post. Or ground one of the address line as suggested by Martin A.

I'm thinking of overclocking the standard 14MHz W65C02 to 24MHz Enough people had done this successfully that I'm pretty comfortable with the overclocking approach.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 5:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
BruceRMcF wrote:
The WDC are reportedly able to handle it, even if there was not the market segment to justify WDC getting them retested for 16MHz labelling.

WDC qualifies production at 20 MHz, i.e., production parts must perform at that clock rate to be considered good product. All currently-shipping parts are made with 0.6µ geometry dice and will easily run beyond 20 MHz if powered at 5 volts. We have had reports of the WDC 65C02 being cranked up to the 30 MHz range—highly unlikely such a thing would be successful with the older 65C02s.

My POC V1.2 unit, which is 100 percent discrete logic, can run at 20 MHz with timing headroom to spare. POC V1.3, the unit I am currently running, is also discrete logic and is stable at 16 MHz. The “ceiling” for that unit is around 18 MHz due to bank latching prop delay through the logic. In both units, ROM and I/O are wait-stated using high-phase clock stretching.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 9:59 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
> WDC qualifies production at 20 MHz, i.e., production parts must perform at that clock rate to be considered good product

Worth noting, I think, that this is testing, not characterisation. As you say, with a full power supply voltage and a reasonable operating temperature, a device will normally perform better than specification. But there's a reason why we operate with a margin relative to test - both industry and hobbyists do it - and that 20MHz is a figure from which one would expect to back off.

It's also worth noting - and most of us know this well - at increasing speeds, the performance of peripherals and glue logic become ever more important. To run a system at 20MHz demands much faster glue than to run at 14MHz. (Not to mention solid power distribution and bypass.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 12:57 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
I ran an experiment with faster RAM (25nS 128KB CY7C109) and one wait state for flash. I added a serial port in CPLD so I can communicate with 6502 as I increase the CPU clock. I also patched in a small program to talk to the CPLD serial port and a command to transfer control to G-Pascal program.

At 24MHz I can talk to 6502 via CPLD serial port but G-Pascal serial port and LCD display are not functioning.
At 18.4MHz G-Pascal serial port and LCD display are functioning but not at 20.3MHz.

My conclusion is the VIA can not be overclocked above 18MHz but if the VIA functions are replaced by CPLD, 24MHz operation is still possible so the notion of copying flash into RAM and operating in RAM is still viable. Executing in RAM has the advantage of uploading new software to test it out before burning into flash.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 6:17 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
BigEd wrote:
Worth noting, I think, that this is testing, not characterisation.

Correct. It’s in the same vein as proof-testing a boiler at a pressure higher than its designed rating. Testing proves the boiler’s integrity (or lack thereof) but doesn't imply that it’s okay to operate it beyond its maximum rated working pressure.

I should also clarify that my above statement about testing production parts at 20 MHz applies to microprocessors, not peripherals. I don’t know for a fact that WDC tests the 65C21, 65C22 and 65C51 at 20 MHz. As always, YMMV.

Quote:
It's also worth noting - and most of us know this well - at increasing speeds, the performance of peripherals and glue logic become ever more important. To run a system at 20MHz demands much faster glue than to run at 14MHz. (Not to mention solid power distribution and bypass.)

Yep! We have topics on wait-stating and construction methods that anyone intent on pushing the clock limits should read.

plasmo wrote:
At 24MHz I can talk to 6502 via CPLD serial port but G-Pascal serial port and LCD display are not functioning.
At 18.4MHz G-Pascal serial port and LCD display are functioning but not at 20.3MHz.

My conclusion is the VIA can not be overclocked above 18MHz

Since current WDC VIAs are produced to 0.6µ geometry, I see no reason why one of them shouldn’t be able to run as fast an MPU. Is it possible other circuit factors are limiting the maximum speed? You could try wait-stating, but doing that with clock stretching will cause the VIA’s timer drift unless it is done in the right way (as Jeff reminded me :D).

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


Last edited by BigDumbDinosaur on Sat Mar 26, 2022 1:48 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2022 9:50 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigDumbDinosaur wrote:
You could try wait-stating, but doing that with clock stretching will cause the VIA’s timer drift.
The following post features a clock stretcher that allows no-drift VIA timer operation. I would've thought you'd remember this circuit, BDD! :wink:

RDY vs CLOCK STRETCHING. Includes 2 very simple circuits.

_________________
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: Sat Mar 26, 2022 1:47 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
You could try wait-stating, but doing that with clock stretching will cause the VIA’s timer drift.
The following post features a clock stretcher that allows no-drift VIA timer operation. I would've thought you'd remember this circuit, BDD! :wink:

RDY vs CLOCK STRETCHING. Includes 2 very simple circuits.

Yeah...I recall it now but for some reason, didn't recall it at the time of my post. This old age cr*p is for the birds! :evil: :twisted: :roll: :| :cry: :oops:

Or, as my wife claims, my head is so full of bits and bytes all the available memory has been used up. :D

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 26, 2022 3:34 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 704
Location: North Tejas
BigDumbDinosaur wrote:
This old age cr*p is for the birds! :evil: :twisted: :roll: :| :cry: :oops:

Or, as my wife claims, my head is so full of bits and bytes all the available memory has been used up. :D


My problem is fragmentation...


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 26, 2022 3:58 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
BigDumbDinosaur wrote:
Since current WDC VIAs are produced to 0.6µ geometry, I see no reason why one of them shouldn’t be able to run as fast an MPU. Is it possible other circuit factors are limiting the maximum speed? You could try wait-stating, but doing that with clock stretching will cause the VIA’s timer drift unless it is done in the right way (as Jeff reminded me :D).


Good call. I added a wait state and added another ground return to the VIA prototype board. Now the VIA will respond with correct sign on message most of the time but it won't respond correctly to serial input and the LCD display is flaky. I'm so far past the rated frequency that signal returns and signal loads can easily affect its operation.

So it is note worthy that Ben Eater's original design can be sped up to 12MHz with faster flash (such as W27C512) and RAM. Adding wait state logic and more solid pc board design potentially can bring it to 24MHz operation.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 26, 2022 5:25 am 
Offline
User avatar

Joined: Wed Mar 09, 2022 9:08 pm
Posts: 18
I got my breadboard system to run at 5 MHz but not 8 MHz. I strongly suspect the speed of the EEPROM is the limiting factor there.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 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 14 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:  
cron