cbscpe wrote:
Hi banedon,
here some input to your design files.
Table is not well suited for your purpose, you should really use equations for that case. Also you need to be very careful when using variables with subscripts, like A12, A13, A14, A15 etc. WinCUPL now allocates a 32-bit chunk and places the bits according to the subsript. This said you should change your code.
FIELD Address = [A15..0];
sramA15n = Address:[0000..1FFF] & RW & !sbr0n & !sbr1n
# Address:[0000..1FFF]
if the address ranges you use do not require the address lines A0 to A11 WinCUPL will accept that there are no pins for these signals. Also your code gets much more readable as you now use the "real" addresses in the square backtes as they are seen by the CPU.
Then in your first post with in the first GAL the read and write signals must be qualified with PHI2
aRD = phi2 & !cpuRW;
aWR = phi2 & cpuRW;
you have no registered outputs (no flip flops used) so pin 1 is used as input and not as clock and you can use phi2 as normal input signal. As already said in a former response, pin 1 is only activated as clock input if you have registered outputs. And you should use the FIELD statement with the full 16-bit address, it makes your code clearer.
Cheers
Peter
Hi Peter
Thanks for your advice.
Given that TABLE is one of those commands that makes me want to uninstall WinCUPL, I was on the edge of doing as you're suggesting and splitting it all down, but I think I've now cracked it. I do notice that my solution and your are pretty much the same, except I'm using a TABLE.
The phi2 is there from before but you're right: I don't need it in the second GAL. I'll keep it there as I don't need the pin, but will get rid of it in the schematic and will ditch it if I need to re-purpose pin 1. I know (from you previous advice
) that I do not need to have that as PHI2.