To PLD or not to PLD
When I start something interesting, I tend to overdo it. I originally contemplated using standard gates for my glue logic. But then chose to go the EEPLD (Electrically Erasable Programmable Logic Device) route. Wow, was I ambitious? Not only I was to build the 6502 single-board computer from the ground up, but I had to also get to know PLDs up close and personal at the same time. Well, it turns out it's not all that hard, if you find the right tutorials on the web, and if you have a precise memory map defined.
I had this really particular memory map planned. But for my second iteration of the SBC, I opted to go simply and work my way up.
The map, for now, is 32K ROM, 16K IO space, and 16K RAM. This will change in the future. And this is the beauty of PLDs, there is no need to rewire anything. It's just the software that needs changing.
I chose the ATF22V10C, a G22V10 equivalent, because of it's many input and output options: 12 dedicated inputs, and 10 configurable input/output.
PartNo ATF22V10C ;
Date 8/13/2020 ;
Revision 01 ;
Designer The Micro Hobbyist ;
Company Self ;
Assembly 6502 mainboard logic ;
Location U105 ;
Device G22V10;
/* *************** INPUT PINS *********************/
PIN 1 = CLK; /* Clock */
PIN 2 = A15;
PIN 3 = A14;
PIN 4 = A13;
PIN 5 = A12;
PIN 6 = A11;
PIN 9 = IRQ0; /* VIA IRQ */
PIN 10 = IRQ1; /* ACIA IRQ */
PIN 11 = IRQ2; /* Future expansion */
PIN 13 = RW; /* Read Write */
/* *************** OUTPUT PINS *********************/
PIN 23 = !ROM; /* ROM select */
PIN 22 = !RAM; /* RAM select */
PIN 21 = !RTC; /* Realtime Clock select */
PIN 20 = !VIA; /* Parallel select */
PIN 19 = !ACIA; /* Serial select */
PIN 14 = !OE; /* Output Enable, or !Read */
PIN 15 = IRQ; /* IRQ merge */
/* *************** EQUATIONS *********************/
ROM = A15;
RAM = CLK & !A15 & !A14;
RTC = CLK & !A15 & A14 & !A13 & !A12 & !A11;
VIA = !A15 & A14 & A13 & !A12 & !A11;
ACIA = !A15 & A14 & !A13 & !A12 & A11;
OE = RW;
IRQ = IRQ0 & IRQ1 & IRQ2;
Comments
Post a Comment