Running data lines through a CPLD - issues

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Running data lines through a CPLD - issues

Post by getafixx »

Hey guys,

I'm having issues when I try to run data signals through my CPLD. If I run the data lines directly from the ROM to the cart edge they work fine, but when running them to the CPLD and having the data input buffered directly to the data output THROUGH the CPLD, either with vhdl or schematic design, the cart stops working. Address lines work properly through the CPLD using the same methods, though.

Is there something that I need to do for handling data signals, as compared to address signals? I'm assuming it's because they're bi-directional, and I've got bi-directional buffers on them, but it makes no difference.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

Digital voltage logic thresholds, maybe?

e.g. the SNES is 5V CMOS, and requires voltages above 4V and below 1V to reliably read as digital 1 and digital 0.
The NES is 5V NMOS, and instead has TTL voltage thresholds (above ~2.5V and below 1V)
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: Running data lines through a CPLD - issues

Post by getafixx »

lidnariq wrote:Digital voltage logic thresholds, maybe?
How would this differ in an FPGA? I looked at my SD2SNES cart and all the pins from the RAM on there run to the FPGA, which tells me that it can be done, at least on an FPGA. I was wondering if this could be timing related because FPGA chips tend to have faster response times than a CPLD, but I'm not 100% sure.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

The FPGA on the sd2snes almost certainly has some voltage translation to make it compliant with the SNES's different signalling voltages.

What voltage are you running the CPLD at?
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: Running data lines through a CPLD - issues

Post by getafixx »

This is running in a 3V system using a 3V CPLD (XC95144XL). So voltage translation isn't required.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

Oh. Well. I don't suppose you happen to have an oscilloscope?
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: Running data lines through a CPLD - issues

Post by getafixx »

lidnariq wrote:Oh. Well. I don't suppose you happen to have an oscilloscope?
No, and I don't have access to one either unfortunately.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

Um. Random guess: are you tristating the data lines at the correct times?
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: Running data lines through a CPLD - issues

Post by getafixx »

I was just setting this up as straight through-put.

So in vhdl the part where I assign data_out looks like this:

data_out (15 downto 0) <= data_in (15 downto 0);

In schematic entry it was a 16 bit buffer, nothing more. I literally just want the signals to pass through the CPLD for PCB routing purposes.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

Is the ROM always supposed to drive the data bus? It's not shared with anything else?
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Running data lines through a CPLD - issues

Post by tepples »

The data bus is shared with at least WRAM, PPU registers, APU registers, battery RAM in the cartridge (if any), and the coprocessor (if any).
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Running data lines through a CPLD - issues

Post by lidnariq »

This isn't a SNES or NES; he said it's some 3V system.
User avatar
getafixx
Posts: 373
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: Running data lines through a CPLD - issues

Post by getafixx »

lidnariq wrote:Is the ROM always supposed to drive the data bus? It's not shared with anything else?
Yes the ROM is the only thing on that bus. That's why it's been stumping me, because there really is nothing in the way of it except the CPLD.

I guess I'll just play with it some more :)
Post Reply