Forum Discussion
12 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- Hello, I have a PLD that has a program loaded onto it, and the code has been lost. --- Quote End --- How complicated is the code? Do you have a specification for what the code is supposed to do? Is it worth reproducing it? --- Quote Start --- Is it possible to use Max+Plus to load the vhdl code from the chip so that the code can be used to program other PLD's? --- Quote End --- If the code is for a device where the image is stored off-chip in a configuration memory, eg., an EPC2, then I believe it would be possible to read the image back (not the VHDL, just the bits in the device), since that is what the verify operation does. I suspect the same thing is possible with the MAX PLDs as well. However, I don't think it is directly supported in any of the tools ... I don't recall seeing a 'copy image to file' option in any of the programmer tools, however, you might be able to use the Jam STAPL player to implement image readback. But you need to decide whether the effort to implement image readback is greater than re-implementing the design that you've lost the source code for. I would recommend gathering the requirements for the design, then writing the code again, and then check the code into a code repository! :) Cheers, Dave - Altera_Forum
Honored Contributor
Even if you could read the bit file back from the flash, you'd have one hell of a job trying to reverse engineer it. Like Dave says, it doesnt store the source, only the bit file.
Basically, without the source code, you're scuppered - Altera_Forum
Honored Contributor
IIRC, MAX and MAX II CPLDs don't allow the bitstream to be read back.
- Altera_Forum
Honored Contributor
--- Quote Start --- IIRC, MAX and MAX II CPLDs don't allow the bitstream to be read back. --- Quote End --- They do, if protection isn't set. - Altera_Forum
Honored Contributor
Ok, after doing some more searching, I found an old compilation report.
Would information such as what is shown below be able to be used to recover the code? -- Node name is 'AD2' = ':246' -- Equation name is 'AD2', type is output AD2 = LCELL( _EQ005 $ GND); _EQ005 = A1 & !_LC105 & T02 & T04 # _LC105 & _LC126; - Altera_Forum
Honored Contributor
Yes, but it'll be a pain in the arse, but not quite as bad as the bit-stream. All its telling you whats inside each LUT, and what it connects to. Good luck working that circuit out. You'd probably spend as much time re-writing the code, if not a bit less.
- Altera_Forum
Honored Contributor
Ok, thanks for the help.
- Altera_Forum
Honored Contributor
Hmm, can .acf files be used to program PLDs?
- Altera_Forum
Honored Contributor
--- Quote Start --- can .acf files be used to program PLDs? --- Quote End --- No. These files are 'assignment and constraints files' (or something like that). They contain the pin assignments and other features. This is similar information to what is stored in the Quartus settings files (.qsf). If you can find an .sof, .pof, or perhaps a Jam STAPL file .jam, you might be ok. How complex is the design? Its a PLD, so it can't have that much logic. Just re-write the code. Cheers, Dave - Altera_Forum
Honored Contributor
I have the .pof file. I would rewrite the code but the problem is that it was written 18 years ago by someone else. I'm just the middleman in this whole thing so I'm not even sure what the code does.