6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 9:26 pm

All times are UTC




Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
PostPosted: Sat Mar 09, 2013 3:10 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
Table 1 in http://patpend.net/technical/65816/65c816.txt might be useful.

Edit:
Code:
Table 1. G65SC802 and G65SC816 Compability

   Function                     G65SC802/816    G65SC02         NMOS 6502
                                 Emulation
Decimal Mode:
* After Interrupts              0 -> D          0 -> D          Not initialized
* N, Z Flags                    Valid           Valid           Undefined
* ADC, SBC                      No added cycle  Add 1 cycle     No added cycle

Read-Modify-Write:
* Absolute Indexed, No Page Crossing
                                7 cycles        6 cycles        7 cycles
* Write                         Last 2 cycles   Last cycle      Last 2 cycles
* Memory Lock                   Last 3 cycles   Last 2 cycles   Not available

Jump Indirect:
* Cycles                        5 cycles        6 cycles        5 cycles
* Jump Address, operand = xxFF  Correct         Correct         Invalid

Branch or Index Across Page Boundary
                                Read last       Read last       Read invalid
                                program byte    program byte    address

0 -> RDY During Write   G65SC802: Ignored       Processor       Ignored until
                                until read      stops           read
                        G65SC816: Processor
                                stops

Write During Reset              No              Yes             No

Unused Opcodes                  No operation    No operation    Undefined

Phi1 (OUT), Phi2 (OUT), /SO, SYNC Signals
                                Available with  Available       Available
                                G65SC802 only



Last edited by BigEd on Fri Dec 12, 2014 5:58 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 10, 2013 9:44 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8491
Location: Midwestern USA
Arlet wrote:
However, looking at the behaviour of the '816, I can't understand why they changed the perfectly fine 'C02 workarounds, and changed it back into bad address cycles, but protected by VDA/VPA, basically requiring the hardware designer to take into account those two additional signals in hardware addressing. They could have simply kept the 'C02 behavior, and added the VDA/VPA as additional signals. This would have allowed to make those signals optional, simplifying addressing for those designs that didn't care. Given that decision, I can see where they thought doing the same for the '802 was a good idea.

Actually, there's a perverse logic to the presence of VDA and VPA. Collectively, these signals tell the circuit logic when the address bus is valid. Individually, they tell the circuit what it is the MPU is doing. One could easily implement a von Neumann or a Harvard architecture merely by correct usage of these signals. Another possibility is cycle-steal DMA by doing a DMA op when both VDA and VPA are false.

——————————————————————————————————————
EDIT: Cogitation leads me to believe that cycle steal DMA is a pipe dream. There are too few instructions with dead cycles, especially instructions that are most commonly used.

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


Last edited by BigDumbDinosaur on Mon Mar 17, 2014 9:31 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 10, 2013 11:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
There's another possible (but unlikely) situation that could cause problems even though it cannot be considered a bug. If the last byte of a page is a RTS or RTI instruction and the first byte of the next page is I/O, the latter gets read in the second cycle of the RTS or RTI instruction.

_________________
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: Tue Dec 17, 2013 4:25 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Attachment:
Western_Design_Center_0913.pdf [109.36 KiB]
Downloaded 176 times
Courtesy of Mouser, I received the above Product Change Notification today. It informs us that, "The W65C816S6 (currently manufactured on a 0.6μm process at Sanyo) has been transitioned to a 0.6μm process currently being used at TSMC for the W65Cxx family."

GARTHWILSON wrote:
I emailed Bill Mensch many years ago about ambiguities in this part of the data sheet, showing, IIRC, that the part could meet the specifications and yet not work anywhere near as fast as the speed rating. He said in his response, again IIRC, that he didn't have the answer, but that the parts do work beyond their specified speed, and recommended that I experiment if I wanted better info. (Despite the way I make it sound here, he was very gracious about it but admitted he was not able to give definitive answers.) Since then I've had the ambition to experiment with delay lines like Data Delay Devices makes and move the timing of especially the 573's E input forward and back a ns or two at a time relative to the phase-2 to the rest of the system and watch the current (indicating bus contention) and see where the whole thing would run the fastest. There would be other timings that could be experimented with similarly.
The Product Change Notification implies there'll be no change in timing, since the '816 data sheet it cites is the same Sept 13, 2010 version we're already familiar with. Also the Sanyo and TSMC are both 0.6μm processes. Nevertheless, if anyone ever does get around to some actual timing tests like those Garth suggested, it'll be worth noting whether it was the Sanyo or TSMC product that was tested.

-- 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: Tue Dec 17, 2013 5:56 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8491
Location: Midwestern USA
Dr Jefyll wrote:
Attachment:
Western_Design_Center_0913.pdf
Courtesy of Mouser, I received the above Product Change Notification today.

I got that same PCN as well. Perhaps the foundry switch is merely a cost consideration and nothing more. It doesn't sound as though the process itself has changed.

WDC has to publish ECNs and PCNs because some of their products are certified for medical usage.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 18, 2013 1:41 am 
Offline

Joined: Sun Jan 13, 2013 11:13 am
Posts: 10
BigDumbDinosaur wrote:
I got that same PCN as well. Perhaps the foundry switch is merely a cost consideration and nothing more. It doesn't sound as though the process itself has changed.


This is very likely the case, TSMC are probably able to bring 300mm wafers and other cost benefits. There is a good chance that the process change might bring incidental performance improvements, even though the node size isn't changing. But fab cost would be the driver.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 01, 2014 7:47 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
In another thread...
GARTHWILSON wrote:
I suspect the issue of bus contention in the beginning of phase 1 on the '816 is pretty insignificant, since otherwise they couldn't get away with putting only a single ground pin and a single power-supply pin on the DIP version. The inductance of the one pin would have rendered things non-op, especially at higher speeds.
Garth, your reference to speed seems unclear. I hope we're in agreement that the presence or absence of contention is determined by turn-on and turn-off times -- ie; the turn-on and turn-off times of the CPU tri-state data bus drivers as compared to those of the memory & IO devices (or the bus transceiver). These times are specified in ns., not in relation to clock rate. Since clock rate doesn't affect driver turn-on and turn-off times, I submit that a change in clock rate can neither create nor eliminate contention in any given example.

To some that may sound odd, so let's look at the beginning of phase 1 as an example. If the previous cycle was a read then at the beginning of phase 1 the bus gets handed over from memory back to the CPU. Each individual memory-to-CPU handover is an event with potential for contention. The deciding factor, of course, is whether the memory IC "lets go" of the bus before the CPU commences to drive it. IOW the deciding factor is the driver turn-on and turn-off times -- which are delays measured in ns.

If we lower or raise the system clock rate, that'll change repetition rate of the bus handovers, but it doesn't change the severity of the contention each time. So, for example: if all that changes is the oscillator frequency, a system that is free of contention at 1 Mhz will also be free of it at 20 MHz. On the flip side, a system that has a contention problem at 20 Mhz will also have the problem at 1 MHz. Instead of getting 20 million nasty current spikes per second, you get 1 million -- each just as nasty as one of the 20 MHz spikes. :(

GARTHWILSON wrote:
Unfortunately there's no minimum spec. on tBAS
Right -- I mentioned this in the lead post. Another driver turn-on/turn-off figure that's missing from WDC specs is the maximum for tDHR. The omissions aren't trivial. Lacking these figures, we're unable to make a comparison with memory turn-on/turn-off times. To protect against contention we have only seat-of-the-pants reckoning.

On a positive note, how can we assess the situation, and how can we improve it? Some actual experiments would be helpful, assuming the right things are measured. It would also be informative to test '816 samples from different foundries, since the driver turn-on/turn-off times may well be affected by the new process.

I hope it's clear I'm not forecasting doom & gloom -- my comments are in support of understanding the contention issue. The problem might be pretty insignificant, as Garth says. We know that successful '816 systems exist. The question is, to what extent is success reliant on good PCB design and solid supply bypassing -- IOW, contention tolerance? AFAIK nobody's tried to run an '816 on a breadboard. :roll:

BigDumbDinosaur wrote:
The most fool-proof solution is the use of a data bus transceiver as you suggested, which is a straightforward method [...]
I agree that a data bus transceiver is a good idea, for two reasons.
  • it's easier to make the CPU play nicely with one device (the transceiver) than with several (RAM, ROM, peripherals).
  • swapping out the transceiver and replacing it with one from a different logic family is one of the most effective tactics at our disposal. The best transceiver is not necessarily the fastest or the slowest, but the one whose turn-on/turn-off times are similar to those of the '816.

BigDumbDinosaur wrote:
[...] (74AC245 recommended if Ø2 will exceed 8 MHz, 74ABT245 recommended if Ø2 will exceed 14 MHz).
Is this recommendation your own advice, or based on WDC doc? It seems at odds with two of my points above. If there's authoritative information I've overlooked I'd be grateful if you can direct me to it.

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  
PostPosted: Sat Mar 01, 2014 8:28 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Quote:
In another thread...
GARTHWILSON wrote:
I suspect the issue of bus contention in the beginning of phase 1 on the '816 is pretty insignificant, since otherwise they couldn't get away with putting only a single ground pin and a single power-supply pin on the DIP version. The inductance of the one pin would have rendered things non-op, especially at higher speeds.
Garth, your reference to speed seems unclear. I hope we're in agreement that the presence or absence of contention is determined by turn-on and turn-off times -- ie; the turn-on and turn-off times of the CPU tri-state data bus drivers as compared to those of the memory & IO devices (or the bus transceiver). These times are specified in ns., not in relation to clock rate. Since clock rate doesn't affect driver turn-on and turn-off times, I submit that a change in clock rate can neither create nor eliminate contention in any given example.

Right, the contention can happen all the way down to audible frequencies; but the ground bounce and ringing resulting from the current spike on the Vss and Vdd lines does die out if you give it long enough, which is why you might get away with with it at lower frequencies. Even if it's a nasty spike, still, as long as the processor doesn't crash from it, the data states will eventually settle in to whatever they were supposed to be before the next relevant clock edge.

Quote:
I hope it's clear I'm not forecasting doom & gloom -- my comments are in support of understanding the contention issue. The problem might be pretty insignificant, as Garth says. We know that successful '816 systems exist. The question is, to what extent is success reliant on good PCB design and solid supply bypassing -- IOW, contention tolerance? AFAIK nobody's tried to run an '816 on a breadboard. :roll:

Sam Falvo did, and had big problems from his big hoops of wire talking to each other like overlapping coils, and the transitions in his phase-2 input were not fast enough to be immune to the other stuff coupled in there. That's my take on what happened. If it takes too long for the transition, other signals inductively coupled in can make it look like more than one transition, and too fast to operate on.

Although BDD recommends programmable logic to hit the higher rates, I think programmable logic was still pretty slow in the days of the 20MHz SuprCPU C64 add-on-- maybe 15ns or even 25ns. I remember it was very slow back then, yet this add-on it worked at 20MHz. I have not seen its circuit to know what they used there.

As for BDD's recommendation to always use VDA and VPA, I seem to remember that that came from his using non-65xx hardware that could not handle back-to-back writes (like in a RMW operation) where the first write had invalid data and the second one was the desired data. Is that correct? I'm trying to remember what search terms I might use to review where we left off on that. (Edit: It's in the preceding pages of this topic. I believe that's correct, and there's also the matter of when you have I/O and RAM in the same page, which is rare.) Something like a 65c22 does not have any trouble with back-to-back writes. His use of the non-65-family UART is pefectly valid of course, but we should understand when VDA & VPA usage is essential and when it's not. The hidden DMA is an attraction for using VDA and VPA.

_________________
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: Sat Mar 01, 2014 3:27 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
(I was disappointed to see on a recent datasheet the bus release time for a slow EEPROM was not well-characterised: for a device with access time 450ns the release time was specced as min 0ns and max 100ns. In their defence, it's not easy to characterise release time - you need another driver and to measure contention, or measure current into a load. On the positive side, I'd say that turning off the drivers is a very simple and direct operation for the chip to perform, so release times should be pretty low in practice. Instrumenting a real '816 system could be illuminating. The bank address outputs are readily arranged to be 00, so reading FF or perhaps opcode EE would arrange for a near worst-case.)


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 01, 2014 7:24 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8491
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
[...] (74AC245 recommended if Ø2 will exceed 8 MHz, 74ABT245 recommended if Ø2 will exceed 14 MHz).
Is this recommendation your own advice, or based on WDC doc? It seems at odds with two of my points above. If there's authoritative information I've overlooked I'd be grateful if you can direct me to it.

Those are my recommendations, which are based on the fact that the bus transceiver's prop time will result in the state of the data bus being skewed relative to the states of Ø2 and RWB. As Ø2 approaches the maximum, said skew will likely become critical in trying to make a clean transition from capturing the bank address, during which time the transceiver is (should be) in the high-Z state, to data read/write.

Consider that the worst-case prop time for the 74ABT245 is 4.6ns input to output, which number assumes that the 74ABT245 is already in the active state. However, during Ø2 low, the transceiver must be in the high-Z state to avoid contention as the '816 emits the bank address. When Ø2 goes high, the 74ABT245 must switch from high-Z to active, and since that high-Z to active transition time is 6.3ns worst-case, which is nearly 25 percent of the available Ø2 high time at 20 MHz, it becomes clear that the transceiver needs to be as fast as possible if the device at the other end of the wire is going to see data in a timely fashion.

At 7.2ns, the active to high-Z worst-case time of the 74ABT245 is slightly longer than the high-Z to active time, but still quick enough to assure that the data bus is unencumbered before the next bank address is emitted by the '816.

Note that the transceiver's data direction input also has to be configured prior to data becoming valid. However, as RWB becomes valid about the same time that the address bus becomes valid, there is ample setup time for data direction.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 09, 2014 5:48 am 
Offline

Joined: Wed Feb 05, 2014 7:02 pm
Posts: 158
Dr Jefyll wrote:
GARTHWILSON wrote:
There would be other timings that could be experimented with similarly.
Yes, including the duty cycle on Phi2.
In my insanity- err, eagerness, I offered to be a guinea pig for testing a 14 MHz DIP '816 in a small design... if I can find a discrete part that is similar to the 8088's clock generator (which required a 33% duty cycle clock), I could test it and see what happens. But let me get the circuit built first :P.

Dr Jefyll wrote:
Even in light of this, my speculation is that modern RAMs could be connected directly to the '816's D7-D0 -- ie, without a transceiver. But there would be benefits from including the transceiver anyway, such as relieving some of the capacitive loading seen by the CPU.
I thought the circuit shown in the datasheet that demuxes the data and address buses served as a transceiver/buffer already (ignoring propagation delay)?

Also, I apologize in advance for the stupid question, but... this bus cycle diagram doesn't apply immediately after reset, correct? Otherwise during the first cycle PHI2 is low after reset, the '816 could in theory be reading garbage value from the data bus, since it didn't output an address during the previous cycle when PHI2 was high (while reset was still occurring).


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 09, 2014 6:35 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
cr1901 wrote:
I thought the circuit shown in the datasheet that demuxes the data and address buses served as a transceiver/buffer already (ignoring propagation delay)?

It does, but that's only for the bank byte, not the data or A0...A15.

Quote:
Also, I apologize in advance for the stupid question, but... this bus cycle diagram doesn't apply immediately after reset, correct? Otherwise during the first cycle PHI2 is low after reset, the '816 could in theory be reading garbage value from the data bus, since it didn't output an address during the previous cycle when PHI2 was high (while reset was still occurring).

I have not experimented with releasing the RST\ line in different parts of the clock cycle to know if it puts a bank byte out in the first half of the first cycle after RST\ is released, but it wouldn't matter anyway, because the first couple of clock cycles are internal operations anyway, before the first bus transfers.

_________________
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: Mon Mar 17, 2014 5:37 am 
Offline

Joined: Wed Feb 05, 2014 7:02 pm
Posts: 158
Quote:
Stated another way, the dead time is zero even before a margin is subtracted for variability in logic and tri-state delays.
This "zero dead time" is in theory, correct (i.e. if the outputs/inputs from each clock cycle instantaneously appeared on the bus)?

In the DMA controller thread I started, Garth and I are going back and forth about timing, and basically:

I'm having trouble understanding how everything on the 65816 bus can happen in such a short time (particularly in less than one half-period, where there is no clock reference) and in the correct order, and reliably (i.e. hold time for data bus is sufficient, bus switches direction at the correct times). Right now, my questions CPU-side only, but they are relevant to this thread in examining timing.

In retrospect, I kind of threw my thread about DMA off track with my questions (I wish I could merge it with this thread), but for those interested in more timing discussion, page 2 and 3 are pertinent.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 06, 2014 9:32 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
8BIT wrote:
On my SBC-3 & 4, I used a CPLD to manage the latching of the bank address. This was a simple latch, equivalent to the 74573. It was transparent during PHI2 low, and latched when PHI2 was high. I didn't bother with any delays or shifting of PHI2. This worked flawlessly up to and beyond 14MHz as long as my bus loading was light. With more devices on the bus, lower speeds (8-12MHZ) worked well. My CPLD's were typically 15ns Xilinx 95108's.

As far as managing the databus, the tri-state buffers used in the CPLD also used PHI2 & R/W in addition to the address decoding logic to select the CPU, Memory, or IO as needed. No special attention to the PHI2 edges were needed.

SBC-3 went one step further in using the PHI2 low period to perform video data transfer.

I cannot say it did not cause bus contention, but I can say it didn't affect the operation of my two systems.

Daryl, what was the power supply current, and how did the data bus lines and the processor's power supply pins look on a fast 'scope? (You too BDD with the POC.)

_________________
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 Nov 06, 2014 12:56 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
I should have documented that, because now I cannot remember the current. I want to say around 350-400mA for the whole board. I don't have a fast enough scope to make useful measurements, so none were ever made.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


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

All times are UTC


Who is online

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