This will, I hope, turn into a "Doh !" moment - but I'm currently stuck with what should have been simple logic inside an ATF1504.
I need to set the scene : I'm working on my 65816/Pico2 prototype - a spin-off from the original RP6502_Picocomputer. The Pico2 has been reworked to not stumble over the bank address moments when the clock is low, and has the full 32-byte vectors area for the 65816. Address decoding is done in the ATF1504, it is also capturing the bank address and setting external pins that correspond to each 64k bank (from 0 to 7). So far, so good.
I'm using the 'trick' that I discussed with BDD in a post about the ATF750C chip : pass PHI2 through an internal F/F and use it to latch the bank address : using the (short) propagation delay to get the BA a short while after PHI2 falls. Here's what I did to make it work : (CUPL language)
Code: Select all
PINNODE 45 = BA;
... some other logic...
BA.ck = CLK;
BA.d = !CLK;
/* Bank address decode */
Banks.le = BA.io; /* .io is the O/P of the F/F : should add a small prop delay */
BNK0.l = Data:'b' 000;
... and so-on for banks 2..7
Now to my question : You can see that RIA is being de-selected when PHI2 is high :how do I maintain my latch contents during PHI2 high, and only relatch the bank address at the next falling adge of PHI2 ?
Thanks, in advance !
(edit : modified the question for more clarity (hopefully))