6502.org
http://forum.6502.org/

Starting with ATF1508
http://forum.6502.org/viewtopic.php?f=10&t=3193
Page 1 of 1

Author:  Druzyek [ Thu Feb 12, 2015 8:33 am ]
Post subject:  Starting with ATF1508

I have an ATF1508 I want to experiment with for a 6502 project. I tried the WinCUPL program and simulator but they are both really buggy and unpleasant to use. I would like to just solder a few LEDs and switches to a board to test on real hardware. Other than the 4 JTAG pins, is there anything I need to break out (OE1, PD1, GCLR, etc)? Does anything else need to be pulled up or down? Unfortunately, the datasheet doesn't have much to say about the other pins. Also, if I want to group together 8 pins in the code, does it matter which 8 I use?

Author:  Aslak3 [ Thu Feb 12, 2015 12:03 pm ]
Post subject:  Re: Starting with ATF1508

I'm interested in looking at Atmel programmable logic (the 5V FPGAs, not really the CPLDs) but got put off by the software support. It's a shame because it looks like nice hardware. :(

So no answers, but share your frustration.

Author:  BigDumbDinosaur [ Thu Feb 12, 2015 5:57 pm ]
Post subject:  Re: Starting with ATF1508

Unfortunately, as you guys noted, Atmel's software leaves something to be desired. WinCUPL apparently was little more than a windowized port of the the old DOS program produced by LSI before Atmel bought them out. I have documented numerous bugs and forwarded them to Atmel, but they apparently are tone-deaf about this stuff. Perhaps if enough people complain to them they might be motivated to fix their software. The contact I have there is a gentleman named Alan Wong. His E-mail address is alan.wong@atmel.com. If you contact him don't hesitate to attach the CUPL source file that is causing you grief.

Author:  BigDumbDinosaur [ Thu Feb 12, 2015 6:04 pm ]
Post subject:  Re: Starting with ATF1508

Druzyek wrote:
I have an ATF1508 I want to experiment with for a 6502 project. I tried the WinCUPL program and simulator but they are both really buggy and unpleasant to use. I would like to just solder a few LEDs and switches to a board to test on real hardware. Other than the 4 JTAG pins, is there anything I need to break out (OE1, PD1, GCLR, etc)? Does anything else need to be pulled up or down? Unfortunately, the datasheet doesn't have much to say about the other pins. Also, if I want to group together 8 pins in the code, does it matter which 8 I use?

Please have a look at the attached, which is how I have the ATF1508as connected in my yet-to-be-built POC V2. It should answer some of your questions.

Attachment:
File comment: ATF1508as Example
cpld_example.gif
cpld_example.gif [ 45.92 KiB | Viewed 2984 times ]

Author:  nyef [ Thu Feb 12, 2015 8:56 pm ]
Post subject:  Re: Starting with ATF1508

BigDumbDinosaur wrote:
Unfortunately, as you guys noted, Atmel's software leaves something to be desired. WinCUPL apparently was little more than a windowized port of the the old DOS program produced by LSI before Atmel bought them out. I have documented numerous bugs and forwarded them to Atmel, but they apparently are tone-deaf about this stuff. Perhaps if enough people complain to them they might be motivated to fix their software. The contact I have there is a gentleman named Alan Wong. His E-mail address is alan.wong@atmel.com. If you contact him don't hesitate to attach the CUPL source file that is causing you grief.

Maybe a reverse-engineering effort is called for, presuming that the license terms allow for it? I know that my issue with considering Atmel programmable logic is purely a matter of their software being essentially unusable for me.

Author:  Druzyek [ Mon Feb 16, 2015 1:03 am ]
Post subject:  Re: Starting with ATF1508

Quote:
Please have a look at the attached, which is how I have the ATF1508as connected in my yet-to-be-built POC V2. It should answer some of your questions.
Thanks! That clears a few things up. Do you have capacitors on all the various Vcc lines? Also, do you know if the JTAG pins run from VccINT or VccIO? I would like to get away with programming at 3.3v so I don't need a level shifter.

Quote:
Maybe a reverse-engineering effort is called for, presuming that the license terms allow for it?
Judging by the error messages it (constantly) pop up, I'm pretty sure it is a Visual Basic (pre .NET of course) application. I know people have worked on decompilers before if you wanted to go that route.

Also, do you have any idea how many resources it would take up to store 20-30 bytes of ROM code in the CPLD? I want to run from an SD card and I hate to waste the board space of an 8k ROM for a few dozen bytes of bootloader code. I could even use one of those 20k EEPROM in TO-92 package for a bootloader if the CPLD can bitbang a few bytes out of it at start up. A 256 byte EEPROM in DIP package would work but I can't find anything under 8k.

Author:  nyef [ Mon Feb 16, 2015 1:20 am ]
Post subject:  Re: Starting with ATF1508

Druzyek wrote:
Quote:
Maybe a reverse-engineering effort is called for, presuming that the license terms allow for it?
Judging by the error messages it (constantly) pop up, I'm pretty sure it is a Visual Basic (pre .NET of course) application. I know people have worked on decompilers before if you wanted to go that route.

I was more thinking "black box". The program apparently produces "bitstream" files or something like that given some logic description as input. Feed in a bunch of test designs, get a bunch of compiled bitstreams, do a bit of a correlation analysis...

Author:  GARTHWILSON [ Mon Feb 16, 2015 1:38 am ]
Post subject:  Re: Starting with ATF1508

Quote:
A 256 byte EEPROM in DIP package would work but I can't find anything under 8k.

If having the CPLD do bit-banging is ok (since you were talking about one in a TO-92), then is the I²C 24cXX family of EEPROMs (all available in 8-pin DIP) ok? It goes all the way down to 16 bytes in the 24C00. The only differences I remember offhand across the entire family are in addressing, where the 24c00, 24c01, and 24c02 have a single address byte, then above that it goes to two address bytes. I have not looked at how the densest ones in the family (128K and 256K bytes) address them. They're not very complicated though. I've used the ones up to 32KB several times. If I²C is too slow, you can use the 93cXX family of Microwire EEPROMs (also in 8-pin DIP). The similar SPI family is 25cXX which you'll probably find in much faster speeds than Microwire.

Author:  BigDumbDinosaur [ Mon Feb 16, 2015 3:31 am ]
Post subject:  Re: Starting with ATF1508

Druzyek wrote:
Quote:
Please have a look at the attached, which is how I have the ATF1508as connected in my yet-to-be-built POC V2. It should answer some of your questions.
Thanks! That clears a few things up. Do you have capacitors on all the various Vcc lines?

Yes. They should be placed as close to the Vcc pins as practicable. I use 0.1µF 50 volt X7R MLCC caps.

Quote:
Also, do you know if the JTAG pins run from VccINT or VccIO? I would like to get away with programming at 3.3v so I don't need a level shifter.

The JTAG pins have to be driven at 5 volts for programming. See attached data sheet.

Quote:
Also, do you have any idea how many resources it would take up to store 20-30 bytes of ROM code in the CPLD?

Thirty bytes would require at least 240 latches. I don't know if the 1508 can support that many. The only way to found out is to write minimal code that creates the required latches and I/O statements, and try simulating it in WinCUPL.

Attachments:
File comment: Atmel ATF1508AS CPLD Data Sheet
atmel_atf1508as.pdf [690.1 KiB]
Downloaded 154 times

Author:  Dr Jefyll [ Mon Feb 16, 2015 3:53 pm ]
Post subject:  Re: Starting with ATF1508

BigDumbDinosaur wrote:
Thirty bytes would require at least 240 latches. I don't know if the 1508 can support that many. The only way to found out is to write minimal code that creates the required latches and I/O statements, and try simulating it in WinCUPL.

Thanks for the datasheet, BDD. And, as you say, writing some test code may be a useful step. PLDs are very general in their scope of application, and it can be hard to make the leap from what the datasheet says to a specific usage one might have in mind.

It's true a ROM will consume significant CPLD resources, but your "240 latches" estimate is misguided as no actual latches are required. A ROM's output is combinatorial -- determined entirely by currently prevailing inputs, and not dependent on any stored information (as might be contained in a latch).

I'm no expert on ATF1508 but luckily that's not necessary to describe, logically, what a ROM does. A good place to start is to imagine a ROM that's one bit wide, not eight. The equation will be a Sum of Products -- ie; it describes an OR gate each of whose inputs comes from an AND gate. For every ROM location we want to contain a "0" we do nothing. For every ROM location we want to contain a "1" we include a Product Term (an AND gate) that says, "Hey! -- right now all the address inputs match my address!" The Product Terms get summed (ORed) to produce the result.

Sorry I don't know the WinCUPL syntax. But a byte-wide ROM can be described by eight instances of such a Sum-of-Products equation. In a practical case you'll also need a Chip-Select input to control the tri-state outputs.

cheers, & HTH
Jeff
Attachment:
ROM logic .gif
ROM logic .gif [ 3.74 KiB | Viewed 2852 times ]
PS- here's a one-bit wide ROM with 8 locations, addressed by A2, A1 and A0. In this example locations 0, 1, 4 and 7 contain ones; the remaining locations contain zero.

Author:  MichaelM [ Mon Feb 16, 2015 7:02 pm ]
Post subject:  Re: Starting with ATF1508

I agree with Dr Jefyll with regards to the method for representing the contents of a ROM in a CPLD like the ATF1508 being discussed. I wrote a GIST on GitHUB a few years ago that might be of interest. It describes a technique that utilizes the Sum-Of-Products logic in a CPLD to store the contents of a small ROM. Optimization/reduction of the equations is left to the tool, i.e. ISE or WinCUPL. That GIST is decribed here, and it references a control ROM for a microprogrammed FIFO described here. The completed source for the microprogrammed FIFO is located on GitHUB.

Author:  Druzyek [ Mon Feb 16, 2015 11:51 pm ]
Post subject:  Re: Starting with ATF1508

Quote:
If having the CPLD do bit-banging is ok (since you were talking about one in a TO-92), then is the I²C 24cXX family of EEPROMs (all available in 8-pin DIP) ok?
That does sound good but if it doesn't have parallel access, I might as well stick with the TO-92 package to save space unless it's protocol is much more complicated.

Quote:
A ROM's output is combinatorial -- determined entirely by currently prevailing inputs, and not dependent on any stored information
That makes sense.

Quote:
It describes a technique that utilizes the Sum-Of-Products logic in a CPLD to store the contents of a small ROM.
Do you have an idea of how many bytes you were able to squeeze in to your design? I'm wondering if 30 bytes is out of the question with the other address decoding I want to do.

Author:  MichaelM [ Tue Feb 17, 2015 12:16 am ]
Post subject:  Re: Starting with ATF1508

Druzyek:

If you've followed the links in my earlier reply, then you'll see that the example "ROM" that I was referring to has 16 locations of 14 bits. In a direct mapping to registers, the "ROM" would require 224 FFs. Using the technique that Dr Jefyll and I suggest, and described in the Verilog file that I linked to, I was able to map the "ROM" into a XC9536 CPLD as shown in the following JPEG:
Attachment:
File comment: Mapping Verilog ROM Description into Sum-Of-Products (PLA) CPLD.
PLA_Test.JPG
PLA_Test.JPG [ 120.95 KiB | Viewed 2869 times ]

Author:  Dr Jefyll [ Tue Feb 17, 2015 2:24 am ]
Post subject:  Re: Starting with ATF1508

Thanks, Michael. It's also interesting to note that the same Sum of Products logic can alternatively be implemented using a diode matrix, as mentioned in two posts here.

GARTHWILSON wrote:
If having the CPLD do bit-banging is ok (since you were talking about one in a TO-92), then is the I²C 24cXX family of EEPROMs (all available in 8-pin DIP) ok?
An EEPROM in a TO-92 -- is that what's implied here? I like the sound of that, even though the 8-pin DIP is already pretty small. :) Either way, the CPLD could convert the serial bitstream into bytes to be written to RAM. The price tag in resources wouldn't be very great, and you'd come out ahead except for a very small ROM.

Author:  GARTHWILSON [ Tue Feb 17, 2015 2:49 am ]
Post subject:  Re: Starting with ATF1508

I expect the EEPROM in TO-92 is 1-Wire which is much slower than even I²C and has timing requirements that must be adhered to. Still, it's interesting.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/