Free/open source alternative to WinCUPL? - Page 1
Forum section: electronics / general

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 12:56:50 am
content: I'm very new to programmable logic and am looking at Atmel's ATF15xx line as my project still deals with 5v logic. While I am grateful that Atmel provides WinCUPL free of charge, it is old, clunky, lacking in documentation and is in severe need of an update. I barely managed to scrape together some working code by troweling the depths of Google. Even the help files are corrupted. It appears that all Atmel has done is to ensure it runs on modern hardware and Windows.Are there any alternatives? My searching has turned up nothing.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 15, 2017, 01:16:27 am
content: Which ATF15xx are you thinking of using, and who supplies it?

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 01:22:37 am
content: ATF1502https://www.digikey.com/product-detail/en/microchip-technology/ATF1502ASL-25AU44/ATF1502ASL-25AU44-ND/1008388I was looking at the ATF750, but finding a programmer seems to be next to impossible.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 15, 2017, 03:16:38 am
content: Good find! Element has theATF1504AS-10JU44for NZ$6.21, but they describe it as being 3.6V max. Are their specs wrong, or do they have the wrong part number?The ATF15xx fitter manual says it is compatible with Atmel-WinCUPL, Prochip Designer, Protel design tools, Atmel-Synario and Atmel ABEL. WinCUPL appears to be the only free option.WinCUPL does the job OK, but CUPL is much less sophisticated than VHDL or Verilog - perfect for GALs and SPLDs, but not so good for more complex CPLDs. If you want to use a more modern HDL and design tools then it might be better to choose Xilinx or Altera chips such as the XC9536XL or EPM3032A (which are 3.3V but 5V TTL compatible). I have a few of these chips but so far haven't found a use for them.

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 03:36:18 am
content: The data sheet for both the 1502 and 1504 say it supports 3 or 5 volts on the IO pins. I considered using a more modern chip with external level shifters, but my desire in using a PLD is component reduction. I could do what I need with 74 series logic chips. The one chip solution looks very nice.It would be nice if Atmel(Microchip) would release the WinCUPL source to the open source community.

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 04:16:14 am
content: 5v logic compatibility and relatively low pin count. Other than that, I know next to nothing about CPLDs, and these fit my digikey search criteria.If you know of a more recent 5v compatible, low pin count CPLD with free design software and reasonably cheap programmers or, preferably, ISP, I'm open to considering it.This is for a Motorola 68030/68882 project, so outdated is pretty much the whole project.

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 05:58:53 am
content: While I appreciate the input, I don't think you understand how simple this design actually is. I need 8 inputs and 2 outputs. What I'm doing is generating the chip select signal for the 68881/2 and generating a bus error if the coprocessor is addressed while not in the system. This can be accomplished with a 74x521 comparator, a NAND gate, NOR gate and inverter, the last three can be found in SOT-23 packages. What you're suggesting is like killing an ant with a sledge hammer. Understand that the only reason I gave up on the ATF750 in a 24-pin DIP package was due to a lack of programmers. I consider the ATF15xx chip an upgrade and even that is overkill.Anyway, this thread was about the software, not chip selection.

author: tycz
author_rank: Regular Contributor
timestamp: July 15, 2017, 07:45:39 am
content: MarkS,Traditional CPLD (AND plane) is obsolete tech. The tools are old because there have been no new parts since the early 2000s. Atmel WinCUPL is not Atmel software, but rather a product from Logical Devices which has been restricted to work only with Atmel parts.If you are dead set on a programming CPLDs as some kind of history lesson then you'll find the Altera parts are more accessible. You can probably still buy MAX3000A parts from distributors, which are 3.3V but with 5V tolerant I/O. They can be programmed in AHDL which is quite similar to CUPL. You will need to download Quartus 13.0 (newer versions lack MAX3000A support) for tool set. Also get MAXII Plus 10.2 Baseline for its help containing the AHDL language reference.If you just want some simple 5V compatible programmable logic and learn some useful modern tools then I suggest you take blueskull's advice and look at Cypress PSOC parts. Particularly the 4200 series.

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 07:56:33 am
content: I was not aware that CPLDs were obsolete in general. That changes the discussion. It doesn't matter for my project, as most of the components are also obsolete, but it does change my focus.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 15, 2017, 08:04:47 am
content: Quote from: MarkS on July 15, 2017, 05:58:53 amIndeed, an ATF16V8 could do that with room to spare.For what you are doing I think WinCUPL will be fine. Compared to VHDL or Verilog, CUPL is much simpler. Just give each pin a name, provide a logic equation for each output, and you're done!Here's an example of an address decoder (taken from one of my Z80 projects). '&' means AND, '#' means OR, pins which are active low have a '!' in front of the name (eg. when pin 7 is low WR will be TRUE, and when RAME becomes TRUE pin 17 will be low). A pin becomes an output when it is the result of a logic equation.Code:/* ***************** INPUT PINS ************************/PIN 3 = A14 ; /* Z80 A14 */PIN 4 = A15 ; /* Z80 A15 */PIN 5 = !MREQ ; /* Z80 /MREQ */PIN 6 = !RD ; /* Z80 /RD */PIN 7 = !WR ; /* Z80 /WR *//* ***************** OUTPUT PINS ***********************/PIN 17 = !RAME ; /* 32k static RAM /CS */PIN 14 = !ROME ; /* 16k ROM /CS */RAME = MREQ&(RD#WR)&((A15&!A14)#(!A15&A14));ROME = MREQ&RD&A15&A14;Just one thing to watch for with WinCUPL. If you view an output file, close the window before recompiling - otherwise it will fail because your window has a lock on the file!CUPL tutorialQuoteYes. What's the point of using a CPLD if you need a bunch of regulators and level shifters to support it? However if you intend to interface to 3.3V logic (eg. SD Card) then a 3.3V regulator will be required anyway so it's not so onerous.QuoteAtmel seems to be the only manufacturer still making SPLDs and 5V CPLDs. Now that they are owned by Microchip, hopefully they will continue to provide them.

author: tycz
author_rank: Regular Contributor
timestamp: July 15, 2017, 08:13:26 am
content: Quote from: MarkS on July 15, 2017, 07:56:33 amTo make matters confusing, the term CPLD is now used to mean 'small flash FPGA' by marketing types.Quote from: blueskull on July 15, 2017, 07:50:52 amGood point. I've actually only used the PSOC 3 for logic replacement applications. I'm working on a PSOC 5 design at the moment, but the logic fabric is only being used for boring MCU peripherals this time.Quote from: blueskull on July 15, 2017, 07:50:52 amThat's because nobody wants them. The old parallel programming interface and very high power consumption make it pretty undesirable.

author: rstofer
author_rank: Super Contributor
timestamp: July 15, 2017, 08:10:58 pm
content: Have you got 55 ns to get the decode done?If so, a nice parallel flash device from Microchip can do the job and a programmer could be as simple as a 5V Arduino. Perhaps the SST32SF010A? DigiKey has stock.32 pin P-Dip is available but is 70 ns.https://www.digikey.com/products/en?keywords=sst39sf010

author: MarkS
author_rank: Unknown
timestamp: July 15, 2017, 08:16:02 pm
content: Quote from: rstofer on July 15, 2017, 08:10:58 pmI already considered that. 22 ns.

author: bingo600
author_rank: Super Contributor
timestamp: July 18, 2017, 05:52:26 pm
content: Xilinx XC9536 is till available on ebay (not the 'xl)AFAIK it's 5v compatilbe , but Vo is not full 5v/Bingo

author: JoeN
author_rank: Frequent Contributor
timestamp: July 22, 2017, 09:34:53 pm
content: Any function of 15 inputs, 8 outputs in 12ns or less for $1.83 ($1.23 in thousands):https://www.digikey.com/product-detail/en/idt-integrated-device-technology-inc/71256SA12YG8/800-1426-1-NDYou have a bunch of free uC pins to program it when your device comes up, right?

author: Sainttronics
author_rank: Contributor
timestamp: July 22, 2017, 10:00:04 pm
content: Hi, I was doing the same thing only a couple of weeks ago and ran into a problem with my programmer G540, which doesn't program the Atmel ATF22V10 and ATF16V8 devices. (see my post on this, its still a work in progress)So check your programmer before choosing your device.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 22, 2017, 11:03:25 pm
content: Quote from: JoeN on July 22, 2017, 09:34:53 pm12nS 32Kx8 SRAM that runs on 5V - sweet! But can you guarantee no output glitching when addresses change? And how do you get the data into it on power up?

author: MarkS
author_rank: Unknown
timestamp: July 23, 2017, 01:57:01 am
content: I wasn't aware that CPLDs were outdated tech when I posted this. I was planning on spending the ~$170 for the ATF15xx programmer available on DigiKey, as I thought I could get use out of this in the future. I've decided to go back to discrete logic for this project and will be buying a PsoC 5LP prototyping board from DigiKey to experiment with. They have a nice one that plugs into a USB port and is breadbaord compatible for $10.

author: amspire
author_rank: Super Contributor
timestamp: July 23, 2017, 02:25:30 am
content: Quote from: MarkS on July 15, 2017, 05:58:53 amI have some tubes of 10ns PEEL 18CV8's that I keep in case I will one day need some glue logic like this. ICT had a pretty elegant and simple 3.7MByte package called WinPLACE that you use to develop the code for these rewriteable devices. I have always found it good enough for the task. At the time, the 18CV8 were really great devices.If anyone wants a copy of WinPLACE, I can provide it, but the reality is I will probably never need to use 18CV8's again.The static current is something like 50mA which seems crazy today (there were slower zero current 18CV8s) and the code will not run on anything later then WindowsXP. I have a Windows NT4 VM on Virtualbox that I use to run it. I tried under Wine on Linux without luck and there is definitely no way to run it on Vista or later. Seems to be RAM allocation issues.

author: JoeN
author_rank: Frequent Contributor
timestamp: July 23, 2017, 05:22:07 am
content: Quote from: Bruce Abbott on July 22, 2017, 11:03:25 pmWell, I don't know the exact requirements of the system but one of the offered solutions by the OP himself was "This can be accomplished with a 74x521 comparator, a NAND gate, NOR gate and inverter" which is just another asynchronous circuit which can glitch itself I bet. Glitches are not deal-breakers as long as they are getting synchronized out somewhere by a clock signal and are gone by the time that clock arrives.As far as getting data into it, like I said, "You have a bunch of free uC pins to program it when your device comes up, right?". Hey, all you need are like 12 free pins and you are set, do it with the micro itself. Yeah, that is not going to be feasible in a lot of cases.I don't see why the OP's original idea is not the right one. That comparator is available and cheap (https://www.digikey.com/product-detail/en/texas-instruments/SN74F521NSR/296-42646-1-ND/5455911). The other gates are cheap. Why not?

author: MarkS
author_rank: Unknown
timestamp: July 23, 2017, 05:54:54 am
content: Quote from: JoeN on July 23, 2017, 05:22:07 amI only had two reasons for wanting to go with a CLPD in the first place: 1.) To have a 1-chip solution, and 2.) to learn programmable logic. The 74x521 and logic gates are actually specified in the 68881 user manual. Using SMD components, I can fit the comparator and SOT logic gates in the space of the CPLD and for a fraction of the price.

author: welterde
author_rank: Contributor
timestamp: July 23, 2017, 02:53:16 pm
content: If you don't mind working with really tiny SMD packagesGreenPAKchips might also be an option.Most of the chips appear to be 5V compatible and have rather low pin counts (6-18 gpio pins).They are only one-time programmable though and you have to buy their development kit to program them yourself (it includes a ZIF Socket for programming them).It is cheaper than the ATF15xx programmer though..As for development you can either use their software to graphically design your circuit, but there is also an opensource toolchain where you can use Verilog instead.

author: JoeN
author_rank: Frequent Contributor
timestamp: July 23, 2017, 07:33:34 pm
content: Quote from: welterde on July 23, 2017, 02:53:16 pmThat is a neat company. At least realize that they need to make their development tools and IC samples reasonably priced and available.