My 1st CPLD project using the Xilinx XC9536

By RetroTechie

Paragon (1563)

RetroTechie's picture

28-04-2010, 19:47

Title says it all - for those of you who are considering the use of a CPLD or FPGA (programmable logic) in your electronics ventures, I've documented my 1st steps into this area:

http://bitcycle.org/electronics/1st_CPLD_project/

Obviously I'm hardly qualified to write a 'tuturial' of sorts since a lot of this stuff is still new to me, but it should give a nice overview of the things I ran into, and things I've tried that did or didn't work (always good to know). Or give you an idea what you'd need / what you'd be getting yourself into. And: I'm running Ubuntu here, including the CPLD development tools. I have yet to check those out, but running those tools (under Linux) definately works. :)

Very MSX-relevant I think, I shouldn't have to tell you that 1chipMSX, Erikie's SD interface, etc. are based on similar tech from Altera. Also I've seen some Lattice CPLD's here & there, on several of Leonardo Padial's creations I believe...

If you have any questions: please read the available docs first - there's a lot of stuff out there, I've put in some useful links, and I'm no expert here. But I'll be happy to add anything that isn't answered if you read carefully. If OTOH you are familiar with this stuff & spot an error somewhere: I welcome your feedback (either here or through e-mail).

P.S. Cross-posting this on World of Spectrum forum... :murdock: (maybe there'll be interesting comments there)

Login or register to post comments

By RetroTechie

Paragon (1563)

RetroTechie's picture

30-04-2010, 00:54

CoolRunner-II inputs are not 5V-tolerant, a big disadvantage for use in MSX hardware... Oh and guaranteed for ~1,000 program/erase cycles, a large number but something you could hit on a development board (vs. ~10,000 for the XC9500 family).

Nice for low-power applications, but for first experiments combination of low-voltage + high speed (max. clock ~250 MHz.) is a disadvantage - XC9500 (or -XL) family is easier to use & just as cheap. Not that price matters much for these low-end thingies btw. Smile2

By usuario_msx2

Paladin (755)

usuario_msx2's picture

30-04-2010, 08:59

I'm agree with you Retrotechie Wink

By Leo

Paragon (1236)

Leo's picture

22-05-2010, 16:28

any new experi;ent results with this cpld , like cartridge for msx ?

By RetroTechie

Paragon (1563)

RetroTechie's picture

23-05-2010, 13:22

No... new versions of both Ubuntu & ISE WebPACK have been released, and I'd like to confirm that they work with my hardware too. Also I'm considering moving to Debian, Ubuntu is nice but it's too much focussed on new features, vs. actually fixing bugs. For example I reported an Ubuntu-specific bug in Firefox, it was quickly confirmed by multiple people, 2 major releases further & still not fixed AFAIK - rather annoying. Crazy

Have been going through my hardware collection a bit, re-wiring some joysticks to be MSX-compatible. Next up are my ZX81's (didn't know I had 5 of those... LOL! some working, some not, keyboard in bad shape on all of them). And I'd like to try some ZX81-style video generation (b&w composite video, no dedicated videochip of any kind) with the CPLD. Something like CPLD + image stored in EPROM -> TV screen. If I'm gonna do any MSX projects, then probably some custom mods / addons for personal use.

But I'll try to document as much as I can, to make it easier for you guys to get into this kind of thing too. The tech itself has great potential. Smile2

By RetroTechie

Paragon (1563)

RetroTechie's picture

07-06-2010, 20:46

Today I tested those newer software versions:

Used a fresh install of Ubuntu 10.04 (i386 desktop edition), and installed WebPACK 12.1 on it. The 3rd party USB / parallel port driver seems to have been updated to support WebPACK 12, so I used current version of that driver too.

WebPACK install went smooth (eating almost 8 GB. diskspace...), and getting things to work uses the same procedure as before. Programming tool (iMPACT) runs, cable is detected & iMPACT is able to talk to the CPLD on the other end. That is: able to identify / erase / program device etc. No other tests done, and procedure for a 64-bit Linux system might be somewhat different.

I suppose few of you will be messing with CPLD's (and even fewer will do that under Linux), but for those who do it's good to know what works, before attempting an install yourself... Smile2
Btw. webpage updated with this information.

By Leo

Paragon (1236)

Leo's picture

07-06-2010, 23:07

thanks for sharing. i had tried webpack 9 on linux ( dont remember distro if fedora mandrake or xandros or all them ...) with no success with jtag cable from digilent ( 14 usd , for usb to jtag , nice).
so i get impact running always on windows...Tongue

By RetroTechie

Paragon (1563)

RetroTechie's picture

11-06-2010, 22:05

And another addition to the 'tried it, works' list: Debian testing (squeeze). This hit several bumps along the way... :x But in the end, various actions like device ID / blank check / checksum etc. were performed successfully. I also ran the project navigator, poked around in some of its functions, and aquired a -free- license that the software keeps nagging about.

FYI: Debian is often regarded as a stable distribution that has very old/stale versions of software in it. That's only true for the stable release though: the 'testing' distribution contains relatively current software, just a little behind the bleeding edge (unstable, aka sid), & on par with most other Linux distro's. For example: Debian install I tested on, has kernel 2.6.32, KDE 4.4 and Firefox (known as Iceweasel on Debian) 3.5.9, all of which are up-to-date versions. Btw: there's several other popular Linux distro's (eg. Knoppix) that use Debian testing to build from.

So for Linux users this takes a lot of guess-work out of the equation: use one of the big / well-maintained or Fedora / SUSE-derived distro's and you should be fine, even though Xilinx doesn't have them on the "supported" list. Which is good to know since installing OS'es and giant software packs like ISE WebPACK can eat lots of time...

I'll slow down now where my distro-hopping is concerned... B-) latest additions/details (+screenshot) are here.

i had tried webpack 9 on linux ( dont remember distro if fedora mandrake or xandros or all them ...) with no success with jtag cable from digilent ( 14 usd , for usb to jtag , nice).
USB works different from parallel cable... (driver components, cable firmware etc) so maybe that was the problem. Also there's /dev permissions to worry about, maybe things went wrong there?

I'd prefer an USB cable, but parallel cable works, is cheaper & I know what's inside (don't like blackboxes). I'd only shell out the money for an USB cable if I wanted to connect to small machine (without parallel port), like Mini-ITX machine or netbook. Don't have either of those ATM so it isn't important for me...