6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:21 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: GAL compiler
PostPosted: Sat Mar 21, 2015 6:34 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Hi all

I've recently bought some 22V10B-15LLP GALs and a Genius G540 programmer.
The only thing I lack now is a compiler of some sort.

Can any recommend a decent but free or cheap compiler and are there any real gotchas that I should be aware of?


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sat Mar 21, 2015 7:44 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
Hi all

I've recently bought some 22V10B-15LLP GALs and a Genius G540 programmer.
The only thing I lack now is a compiler of some sort.

Can any recommend a decent but free or cheap compiler and are there any real gotchas that I should be aware of?

Try downloading Atmel's WinCUPL for a start.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sat Mar 21, 2015 8:19 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Cool. Thanks BDD.
I notice that the devices listed are only Atmel (no great surprise!). I assume I can select an ATF22V10B for the Lattice 22V10B chips that I have?


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sat Mar 21, 2015 9:42 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Well my first experiment has not succeeded lol. Pin 2 & 3 are supposed to get ANDed together and give the output on pin 23. I attached an LED with a seris 1K5 resistor drawing 2mA to pin 23 ... and it lights up. No matter then input on pins 2 & 3. Must be doing something wrong. Time for some experiments.

Here's the file so far!

Code:
Name       6502;
Partno     Lattice22V10B;
Date       21/03/15;
Revision   01;
Designer   XXXXX;
Company    shalewyn.com;
Assembly   XXXXX;
Location   XXXXX;
Device     g22v10;

/*
 * Inputs
 */

Pin 2 = a;
Pin 3 = b;

/*
 * Outputs
 */

Pin 23 = c;


c = a & b;


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sat Mar 21, 2015 11:40 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
Well my first experiment has not succeeded lol. Pin 2 & 3 are supposed to get ANDed together and give the output on pin 23. I attached an LED with a seris 1K5 resistor drawing 2mA to pin 23 ... and it lights up. No matter then input on pins 2 & 3. Must be doing something wrong. Time for some experiments.

Here's the file so far!

Code:
Name       6502;
Partno     Lattice22V10B;
Date       21/03/15;
Revision   01;
Designer   XXXXX;
Company    shalewyn.com;
Assembly   XXXXX;
Location   XXXXX;
Device     g22v10;

/*
 * Inputs
 */

Pin 2 = a;
Pin 3 = b;

/*
 * Outputs
 */

Pin 23 = c;


c = a & b;

I don't see anything wrong with that code. Are you sure your burner was correctly set up? Also, have you tried a different GAL, just in case the first one is defective?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sat Mar 21, 2015 11:41 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
Cool. Thanks BDD.
I notice that the devices listed are only Atmel (no great surprise!). I assume I can select an ATF22V10B for the Lattice 22V10B chips that I have?

Generally speaking, a 22V10 is a 22V10. The suffixes are supposed to mean the same thing but you might want to compare data sheets to be sure.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sun Mar 22, 2015 9:01 am 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Thanks again, BDD.

I've found the problem. The ZIF socket (as reported by others) is utter rubbish. Half the time it doesn't fully connect with the GAL.
The other issue is that there a number of stages which the software goes through:
ERASE
BLANK
PROGRAM
VERIFY
ENCRYPT

I disabled Encrypt and now it works fine. For anyone who has this not-so-high-quality programmer, this is done by doing the following:
1) Go into the drop-down SET menu
2) Click Set Programming Sequence
3) In the right hand panel, click on Encrypt
4) Click Delete button
5) Click OK

This programmer and its manual are laughably bad. :roll:

During my sojourn looking for a solution for the above via google (to no avail - I used the trial and error method ultimately), I did notice that there aren't many English video tutorials on GAL programming (for any programmer) and trying to find examples of GAL scripts also very difficult.

I think GAL & PALs really are dead/dying...


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sun Mar 22, 2015 9:44 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
WinCUPL installs a load of examples along with the executable and this describes the syntax and special suffixes

http://ecee.colorado.edu/~mcclurel/Atme ... oc0737.pdf

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Sun Mar 22, 2015 6:53 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
The ZIF socket (as reported by others) is utter rubbish. Half the time it doesn't fully connect with the GAL.

I had the same issue with my TOPS853 programmer. Replacing the ZIF socket was tedious and time-consuming but did solve the problem. Now the 853 is reliable and gets used for burning EPROMs for hobby purposes. I have a different (more expensive) programmer whose software is better designed and supports many more devices. However, it is more cumbersome to use, so I haven't actually put it to work all that often.

Quote:
I disabled Encrypt and now it works fine.

Not sure what the "encrypt" step would accomplish, unless this is a step that blows the security fuse in the GAL.

Quote:
This programmer and its manual are laughably bad. :roll:

Unfortunately, that's often the case when the price is low.

Quote:
I think GAL & PALs really are dead/dying...

Atmel seems to be the only vendor currently producing these devices. They are problematic to program because of Atmel's idiosyncratic algorithms. There are still a lot of Lattice devices readily available, as when Lattice announced the discontinuation of their GAL series, some liquidators placed last-time-buy orders for many thousands of them.

Although it's tempting to reach for a CPLD or FPGA for complex logic, many of the designs that we kick around here can be realized with GALs.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 12:56 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Quote:
Quote:
I think GAL & PALs really are dead/dying...

Atmel seems to be the only vendor currently producing these devices. They are problematic to program because of Atmel's idiosyncratic algorithms. There are still a lot of Lattice devices readily available, as when Lattice announced the discontinuation of their GAL series, some liquidators placed last-time-buy orders for many thousands of them.

Although it's tempting to reach for a CPLD or FPGA for complex logic, many of the designs that we kick around here can be realized with GALs.


I was avoiding Atmel as I've read of the issues some people hvae with them (particularly with the G540). Where I can, I'll stick to the Lattice ones.

With regard to CPLD and FPGA, aren't they quite expensive to implement? And don't they need to be loaded from E(E)PROM/PROM each time your circuit is turned on? I haven't really looked at these previously, but if they're not a complete pain to use I might invest - just out of curiousity :).


Last edited by banedon on Mon Mar 23, 2015 12:58 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 12:58 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
BitWise wrote:
WinCUPL installs a load of examples along with the executable and this describes the syntax and special suffixes

http://ecee.colorado.edu/~mcclurel/Atme ... oc0737.pdf


Cheers, bitwise. I did spot the manual, but it was more an observation on the lack of external content. Mostly this was on youtube and other such sites where you normally find a ton of video guides.


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 5:21 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
With regard to CPLD and FPGA, aren't they quite expensive to implement?

Not sure what you mean by expensive to implement. You do need hardware and software to program a CPLD, but it can be done on the cheap. Programming software is often available at no charge.

Quote:
And don't they need to be loaded from E(E)PROM/PROM each time your circuit is turned on?

A CPLD stores the logic burned into it, the same as an EEPROM. An FPGA does not store the logic, so it has to be loaded from a non-volatile source, e.g., an EPROM, at system power-up.

Quote:
I haven't really looked at these previously, but if they're not a complete pain to use I might invest - just out of curiousity :).

Once you get familiar with the programming tools and the general workflow, the development process is relatively painless.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 6:08 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigDumbDinosaur wrote:
An FPGA does not store the logic, so it has to be loaded from a non-volatile source, e.g., an EPROM, at system power-up.
That's often true, but it's not a defining chacteristic of FPGAs. A quick check of the Wikipedia FPGA article shows that Microsemi's ProAsic 3 and Lattice's XP2 devices store their configuration internally in nonvolatile flash memory. A less casual search would probably reveal other examples.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 9:34 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
An FPGA does not store the logic, so it has to be loaded from a non-volatile source, e.g., an EPROM, at system power-up.
That's often true, but it's not a defining chacteristic of FPGAs. A quick check of the Wikipedia FPGA article shows that Microsemi's ProAsic 3 and Lattice's XP2 devices store their configuration internally in nonvolatile flash memory. A less casual search would probably reveal other examples.

I was generalizing, of course. :shock:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: GAL compiler
PostPosted: Mon Mar 23, 2015 10:09 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
I notice that most CPLD don't come in a DIP package. How do you deal with PLCC when wire wrapping? I haven't seen any ww PLCC sockets...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: