Well, I opted for a 22V10 for a single glue logic. The extra resources (over the 16V8) provide for qualified Read and Write signals for RAM/ROM and other (non-65XX) I/O devices. I also went with 32-byte wide I/O selects (5 of them). I'm now using a Maxim DS1511 Realtime clock, which does have 32-byte wide addressing, albeit only 18 are actually used.
Be sure to input your defines into WinCUPL and see if it compiles correctly and if the simulator works. I had some really odd issues in WinCUPL with the 16V8. I'm using this on an adapter which breaks up a single 32-byte wide I/O select to drive said 1511 RTC, and a Compact Flash IDE device (both selects) and an upper byte bidirectional latch. Finally got it to compile and sim correctly, but it was an odd one.
Getting the 22V10 to work in WinCUPL wasn't that difficult... so I can only think that there's something odd about the 16V8 with WinCUPL... but again, depending on what you're doing with it, it might change. For reference, here's my code for both:
Code:
Name Glue3 ;
PartNo 01 ;
Date 10/31/2017 ;
Revision 01 ;
Designer KM ;
Company Analogue Technologies ;
Assembly SBC2 ;
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 ; /* */
PIN 10 = A7 ; /* */
PIN 11 = A6 ; /* */
PIN 13 = A5 ; /* */
PIN 23 = RW ; /* */
/* *************** OUTPUT PINS *********************/
PIN 14 = !IO1 ; /* */
PIN 15 = !IO2 ; /* */
PIN 16 = !IO3 ; /* */
PIN 17 = !IO4 ; /* */
PIN 18 = !IO5 ; /* */
PIN 19 = !ROM ; /* */
PIN 20 = !RAM ; /* */
PIN 21 = !MWR ; /* */
PIN 22 = !MRD ; /* */
/** Declarations and Intermediate Variable Definitions **/
FIELD ADDRESS = [A15..0];
RAM = ADDRESS:['h'0000..7FFF];
IO1 = ADDRESS:['h'FE00..FE1F];
IO2 = ADDRESS:['h'FE20..FE3F];
IO3 = ADDRESS:['h'FE40..FE5F];
IO4 = ADDRESS:['h'FE60..FE7F];
IO5 = ADDRESS:['h'FE80..FE9F];
ROM = ADDRESS:['h'8000..FDFF]
# ADDRESS:['h'FEA0..FFFF];
/** Logic Equations **/
MWR = (CLK & !RW);
MRD = (CLK & RW);
Code:
Name IDE-RTC ;
PartNo 01 ;
Date 1/04/2020 ;
Revision 01 ;
Designer KM ;
Company Analogue Technologies ;
Assembly SBC2 ;
Location ;
Device G16V8MS ;
/* *************** INPUT PINS *********************/
PIN 1 = CLK ; /* */
PIN 2 = A0 ; /* */
PIN 3 = A1 ; /* */
PIN 4 = A2 ; /* */
PIN 5 = A3 ; /* */
PIN 6 = A4 ; /* */
PIN 7 = !MRD ; /* */
PIN 8 = !MWR ; /* */
PIN 9 = !SEL ; /* */
PIN 11 = !OC ; /* */
/* *************** OUTPUT PINS *********************/
PIN 18 = !UBWE ; /* */
PIN 16 = !UBRE ; /* */
PIN 19 = UBWL ; /* */
PIN 17 = UBRL ; /* */
PIN 12 = !CS0 ; /* */
PIN 13 = !CS1 ; /* */
PIN 15 = !RTC ; /* */
PIN 14 = !HBT ; /* */
/** Declarations and Intermediate Variables Definitions **/
FIELD ADDRESS = [A4..0];
RTC = SEL & ADDRESS:['h'00..13];
HBT = SEL & ADDRESS:['h'14..15];
CS1 = SEL & ADDRESS:['h'16..17];
CS0 = SEL & ADDRESS:['h'18..1F];
/** Logic Equations **/
UBWE = MWR & SEL & ADDRESS:['h'18..18];
UBRE = MRD & SEL & ADDRESS:['h'14..14];
UBWL = MWR & SEL & ADDRESS:['h'15..15];
UBRL = MRD & SEL & ADDRESS:['h'18..18];
Peter (cbscpe here) helped with redefining the address ranges, which made things more logical and simpler to grasp, for me at least.