Had some time today to play with WinCupl and the GAL22V10. Had a few doh! moments, but its working fine now with the GAL in place and it has reduced the size of the board now that I've got rid of the 74 logic. My wavegen only goes to 10MHz but its running stable at that speed, and im happy with that for now. I got 10 x GAL22V10 from Aliexpress for £7 so cant complain!
I also tried using the FIELD value for inputting addresses directly in WinCupl but it kept complaining about intermediate values.
Code:
Name decoder1 ;
PartNo 00 ;
Date 23/10/2020 ;
Revision 01 ;
Designer Engineer ;
Company Dean ;
Assembly None ;
Location ;
Device g22v10 ;
/* *************** INPUT PINS *********************/
PIN 1 = CLK ; /* */
PIN 2 = A15 ; /* */
PIN 3 = A14 ; /* */
PIN 4 = A13 ; /* */
PIN 5 = A12 ; /* */
PIN 6 = A11 ; /* */
PIN 7 = A10 ; /* */
PIN 8 = A9 ; /* */
PIN 9 = A8 ; /* */
/* *************** OUTPUT PINS *********************/
PIN 18 = !RAM_CS ; /* */
PIN 19 = !ROM_CS ; /* */
PIN 20 = !VIA_CS ; /* */
/* *************** EQUATIONS *********************/
ROM_CS = A15;
VIA_CS = !A15 & !A14 & !A13 & !A12 & !A11 & !A10 & A9 & !A8;
RAM_CS = CLK & !ROM_CS & !VIA_CS;