Electronics > Projects, Designs, and Technical Stuff
Not very ABLE to do ABEL... GAL 16V8
(1/1)
NivagSwerdna:
I am struggling with my very first GAL design...
--- Code: ---MODULE test2
A15 pin 1;
A14 pin 2;
A13 pin 4;
A12 pin 5;
A11 pin 6;
ROM_ENABLE_B pin 9;
ROM_ENABLE_C pin 11;
ROM_ENABLE_D pin 17;
ROM_ENABLE_E pin 14;
ROM_ENABLE_F pin 13;
ROM_CHIP_DISABLE pin 19;
H,L,X = 1,0,.X.;
Address = [A15,A14,A13,A12, A11,X,X,X, X,X,X,X, X,X,X,X];
ROM_RANGE_B, ROM_RANGE_C, ROM_RANGE_D, ROM_RANGE_LOW_E, ROM_RANGE_F node;
ROM_RANGE node;
ROM_CHIP_ENABLE node;
equations
ROM_RANGE_B = ((Address >= ^hB000) & (Address <= ^hbfff)) & ROM_ENABLE_B;
ROM_RANGE_C = ((Address >= ^hC000) & (Address <= ^hCFFF)) & ROM_ENABLE_C;
ROM_RANGE_D = ((Address >= ^hD000) & (Address <= ^hDFFF)) & ROM_ENABLE_D;
ROM_RANGE_LOW_E = ((Address >= ^hE000) & (Address <= ^hE7FF)) & ROM_ENABLE_E;
ROM_RANGE_F = ((Address >= ^hF000) & (Address <= ^hFFFF)) & ROM_ENABLE_F;
ROM_RANGE = ROM_RANGE_B # ROM_RANGE_C # ROM_RANGE_D # ROM_RANGE_LOW_E # ROM_RANGE_F;
ROM_CHIP_ENABLE = ROM_RANGE;
ROM_CHIP_DISABLE = !ROM_CHIP_ENABLE;
END
--- End code ---
The trouble is that I end up with a design that has the ! of what I wanted...
--- Code: ---
P16V8AS
+---------\ /---------+
| \ / |
| ----- |
A15 | 1 20 | Vcc
| |
A14 | 2 19 | !ROM_CHIP_DISABLE
| |
| 3 18 |
| |
A13 | 4 17 | ROM_ENABLE_D
| |
A12 | 5 16 |
| |
A11 | 6 15 |
| |
| 7 14 | ROM_ENABLE_E
| |
| 8 13 | ROM_ENABLE_F
| |
ROM_ENABLE_B | 9 12 |
| |
GND | 10 11 | ROM_ENABLE_C
| |
| |
`---------------------------'
--- End code ---
i.e. I get !ROM_CHIP_DISABLE on pin 19 but I wanted ROM_CHIP_DISABLE
Any clues? something to do with istype? something to do with my assumptions about how a GAL would work!??
NivagSwerdna:
I tried something simpler...
--- Code: ---MODULE test2
IN1 pin;
IN2 pin;
IN3 pin;
IN4 pin;
OUT1 pin;
OUT2 pin;
OUT3 pin;
OUT4 pin;
equations
OUT1 = IN1;
OUT2 = IN2;
OUT3 = IN3;
OUT4 = IN4;
END
--- End code ---
and the compiler showed me....
--- Code: ---
P16V8AS
+---------\ /---------+
| \ / |
| ----- |
IN1 | 1 20 | Vcc
| |
IN2 | 2 19 | !OUT2
| |
IN3 | 3 18 | !OUT1
| |
IN4 | 4 17 |
| |
| 5 16 | !OUT4
| |
| 6 15 | !OUT3
| |
| 7 14 |
| |
| 8 13 |
| |
| 9 12 |
| |
GND | 10 11 |
| |
| |
`---------------------------'
SIGNATURE: N/A
--- End code ---
which looked wrong... but i burnt it into a chip and tried it...
so weirdly the outputs don't actually seem to be inverted. Now I am really confused!!!
:(
NivagSwerdna:
I think maybe it is actually working... just the "Chip Report" .... "P16V8AS Chip Diagram"... is misleading. Maybe ! means something different there???
Navigation
[0] Message Index
Go to full version