6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 7:52 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: W65C02 timing
PostPosted: Fri Mar 08, 2013 6:34 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
During my experiments with the W65C02, I've been looking at the timing, and I noticed that the datasheet seems very conservative compared to the real silicon.

I have been looking especially at the relationship between PHI2 and A0-A15,MLB,R/W,SYNC,VPB (the two waveforms at the top of the timing diagram in Figure 6-3 of the WDC datasheet, see screenshot below).

Now, from the falling edge on PHI2, there's a tAH (Address Hold) time specified for which the A0-A15 and control signals are still valid. This is min. 10 ns. But then the datasheet indicates a second transition on A0-A15 a little bit later. This is specified as tADS (Address Setup), with max time of 40 ns (at 3.3V operation).

It seems strange to have two separate transitions on these signals. I would expect a modern design to have registered outputs clocked by the global clock, that only change once. Perhaps they mean that there's only one transition, which occurs somewhere between tAH and tADS ? Still, why the huge gap ?

In practice, I see only one transition, and it occurs about 10 ns after the falling PHI2 edge. This makes a lot more sense, but of course, since the datasheet doesn't guarantee it, we can't really rely on it.

Has anybody else noticed this ? Any thoughts ?


Attachments:
timing.png
timing.png [ 15.31 KiB | Viewed 766 times ]
datasheet.png
datasheet.png [ 12.24 KiB | Viewed 766 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 2:52 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
I see tADS as the constraint which sets up the address for the next clock edge, and which is referenced to the preceding one. It might be clearer to subtract your cycle time, giving a negative number, and placing this address change prior to the clock edge.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 3:06 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
I was thinking too that a 'setup' time is typically used to constrain stability of a signal before a clock edge. But since the 6502 is generating this address, I can't make any sense of that interpretation.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 3:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
The CPU is striving to meet the setup of the address decode and receiving device - that's how I read it.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 3:20 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
So, basically what they're saying is that the old address is valid for at least 10 ns after the edge, and the new address is valid no later than 40 ns after the edge. In that case, timing is really sloppy :) If I'm right in guessing that these signals are registered on the falling phi2 clock, we're only talking about the propagation delays of the output drivers. Maybe the specs are valid for really heavy bus loading (then again, maybe not. Bus loading is specified at 35 pF max)

The reason I'm interested, is because it has a big effect on access time, which is now 70 ns. If it turns out address are valid earlier, the access time increases, allowing for example SDRAM as external memory, with enough time to set up row/column during the 6502 access time.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 4:04 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
Bear in mind that sometimes the low bits of the new address have only just been delivered to the data pins by the clock edge - they have to be passed across the chip.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 4:20 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Yes, but if they are registered outputs, it shouldn't matter how far they have to come before the clock edge (assuming I don't exceed maximum clock rate). Looking with my scope at the lower address bits, I can't see any jitter in the timing, even when running the entire test suite, all transitions on the address bus just go right through the same spot.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sat Mar 09, 2013 5:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
I seem to remember the path goes through three transparent latches but I can't remember which phases are used. You might well be right that this arrangement affects the cpu's setup constraint, and not the clock-to-q timing.


Top
 Profile  
Reply with quote  
 Post subject: Re: W65C02 timing
PostPosted: Sun Mar 10, 2013 4:03 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Arlet wrote:
So, basically what they're saying is that the old address is valid for at least 10 ns after the edge, and the new address is valid no later than 40 ns after the edge.
I'm with you. That does seem to be what the diagram is saying.

Arlet wrote:
In that case, timing is really sloppy :) If I'm right in guessing that these signals are registered on the falling phi2 clock, we're only talking about the propagation delays of the output drivers.
BigEd wrote:
I seem to remember the path goes through three transparent latches

I, too, wanted to mention transparent latches. Correct me if I'm wrong, but instead of using edge-triggered flip-flops I thought 65xx series chips operate by using their internal buses as transparent latches, driven "Phase-1, Phase-2" fashion so as to move data from place to place without creating a race condition. IOW, the address lines are not the output of an edge-triggered register, but are just a reproduction of whatever activity appears on an internal bus. If there's "sloppy timing" on the internal bus then that'd be reproduced on the address lines. Am I over-simplifying?

This still leaves the question of why sloppy timing might occur on the internal bus. My first thought is that the timing might vary according to selection of different address sources -- the Stack Pointer, the PC etc. But by running the Test Suite you're invoking all the options, and the 'scope shows no variability in the address lines' transitions. And yet, the people who wrote the timing specifications obviously were worried about variability. Is it plausible that their (apparently unjustified) concern pertains to selection of different sources on the internal bus?

cheers,
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  
 Post subject: Re: W65C02 timing
PostPosted: Sun Mar 10, 2013 7:20 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
My guess at this point is that the silicon has been upgraded. They now have both hard and soft cores in HDL, and it's a tiny design, so it should be fairly easy to move to a new manufacturing process with improved timing. Given the progress in the semiconductor industry, it would be hard to avoid that. And then somebody probably didn't feel like it was worth it to publish new timing diagrams.

As far as the technology, I highly doubt they still use transparent latches. They even have Verilog models for FPGA, and FPGA designers do everything they can to make you use flip flops instead.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


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: