Thanks for the responses.
BigEd wrote:
As I understand the situation, then, it's your FPGA which outputs the clock, and the noise happens when the two octal transceivers for the address bus start driving. The noise is seen at the receiver - the CPU, the 6510, but isn't at the original transmitter, the FPGA.
Yes, that's correct. Although, I think there are two observations that I shuold separate: 1) ringing after clock edges and 2) noise after switching transceivers to output. Even though they both might ultimately be the same issue (fast edges), I thought I would tackle one at a time.
Martin A wrote:
If I'm reading that scope picture correctly, the highs at the clock input is 3.2v ish. Isn't that a little low for the clcok inputs?
Yes, you're right. I recently bypassed the transceiver I was using for PHI, BA, CAS, RAS and AEC signals on my prototype board. When they came from the transcevier, they were 5V but I saw even worse ringing than I do now. I have no control over the slew rate/drive from the transceiver like I do from the fpga. It seems 3.3V is still enough to register HIGH and it appears to make no difference in terms of stability.
BigEd wrote:
I don't know offhand what the LVC transceivers are like, electrically, but it might be that they are too fast: they switch too quickly with very fast edges, which challenge a 1MHz design like the C64.
Yes, I think you're right. The fast edges are causing the ringing after the clock edges I'm seeing on the scope.
As an experiment, I turned off address bus direction switching (so never output) and bypassed the transceiver for outputs PHI, BA, CAS, RAS & AEC. I set the slew rate to QUIETIO which is the slowest available on the Spartan6. Then I captured the PHI for 2ma, 4ma and 8ma drives. Here is what things look like under that setup:
The ringing gets worse as drive goes up but I think it's the rise/fall time that's the issue.
Here is a comparison of real chip vs fpga rise/fall.
REAL (why is voltage around 3V using a real VICII???)
FPGA with slowest slew rate/lowest drive available
I don't have any control over slew rate from the transceivers and things looked even worse from there. I was getting crazy spikes at the edges on RAS/CAS signals and without the transceivers it looks a little better.
Is there something I can do to slow the edge rates? Any particular values you would suggest for series resistors? I'm not sure if lowering current will have that much of an impact though.
BigEd wrote:
If the problem is switching too early, perhaps you can find a way to turn those transceivers on just a little later (or even to stagger the timing of the two chips.)
I tried this today. Normally, the address direction is switched along with AEC. I narrowed the window where the transceiver is driving outputs to make sure there was no bus contention. So direction change looks like this now (instead of following AEC):
When AEC is low, the CPU should not be driving the address bus and I think I gave enough slack there to make sure the VIC actually owns the bus.
The noise just seemed to move later in the cycle slightly but did not change so I don't *think* its bus contention. I think it's fast edges and lots of switching as you suggested.
Rob Finch wrote:
However, it looks like the noise is not crossing the threshold for 0-1 or 1-0 and you say the circuit is working in a C64 but crashes with more complex demos. Does it crash consistently at specific points in the demos, or is it random?
Yes, most of the time the swing isn't large enough to cause any issues. When I do get a JAM, it's usually in the same location in the demos I've been testing. So I think what might be happening is that the demos just happen to cause a lot of lines to switch at that point and it gets to be too much. That's just my guess though. I thought of hooking up my logic analyser as you suggested but haven't gotten around to it yet.
(It's also worth noting that I've also managed to get these same demos to crash on a real 6569. They really seem to push things to the limit.)
Rob Finch wrote:
Are all 256 rows refreshed?
DRAM refresh seems to work okay. I can leave the computer on for hours and it doesn't look like anything is lost. I'm fairly certain the refresh counter is correct. I have a check in my VICE/simulator hook that would warn me if the output address does not match VICE at every half cycle so I would get a warning. It is cycling through all
256 rows. I ran Galencia with unlimited lives for over an hour the other day (ship just keeps respawning) and it kept running okay.
Rob Finch wrote:
[url]ist.uwaterloo.ca/~schepers/MJK/ascii/VIC-Article.txt[/url]
Yep, that doc was my bible for this project! That and VICE code....