Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - alanh

106
Project development, ideas, and suggestions / Re: XT/IDE CPLD Implementation Technical Discussion Thread
That is a cut down version of the JR-IDE board which I have running at home.  It's the same IDE related sub-set of the circuit just moved to an ISA form board and card edge with pins reassigned for routing ease.  I like it because the BOM count and total kit price is very low.

My target this weekend is have DOS booting off the HD by Sunday.  I'm chasing some other problems with some of the extra features on the JR-IDE version that are slowing me down.  And I'm attempting to at least re-write a basic BIOS in Watcom C so it's more maintainable by more people yet still as efficient as the Universal XT-IDE BIOS 1.15.  My tentative schedule is to finish prove-out this weekend, make board changes during this upcoming week, and send P2 of JR-IDE and P1 of the board above to fab (Dorkbot PDX) by next weekend.
113
Project development, ideas, and suggestions / Re: XT-IDE adapter with CPLD builds
[quote author="FoolDupleX"]You may start with the D0-D15 lines on the IDE connector. D0 for example. Even if this is not the true reason for the problem you observed, it si always good to have an idea of the quality of the signals. It has a direct influence on the speed that can be achieved reliably.[/quote]

Annex C of the ATA-4 spec sheds a lot of light on this.  I would think at an effective transition rate of no more than 200-300 KHz, signal conditioning shouldn't be necessary.
114
Project development, ideas, and suggestions / Re: XT-IDE adapter with CPLD builds
Icurrently have an ISA card with a large CPLD (2k luts) and a small FPGA (5k luts) connected to it - along with 3 4MB SPI flashes, 32MB SDR SDRAM, 1MB SRAM, 2 RS-232 drivers, a Super I/O chip via LPC, RTC, a FTDI VNC2 w/ 2 OTB USB ports, temp sensor, eeprom, and a whole host of other goodies.  It's the perfect test bed for PC/ISA proof of concepts.  But my focus right now is JR-IDE which closely parallels this effort.  I'd be nice to cooperate on some of this instead of duplicating effort as my next project is a 32 MB ISA Conventional/EMS/XMS/ROM board (P1 spin hopefully early next month).

As far as this project, my overall concern is cost and assembly-ability.. if that's a word.  The CPLD version can be the coolest thing in the world, but if the cumulative component costs get too high, it dampens the enthusiasm.  I used the Atmel parts because they are 1/3rd to 1/8th the cost of equivalent XC9572s (don't even get me started on Altera).  I also used 39SF0x0 flash parts since they are generally cheaper and more available than equivalent 27xx or 28xx [ee]PROMs.

XC9572s are fine though.  The high price may be worth it if the project serves as a gate way for more people getting turned on to HDL and standard tools like ISE, Quartus II and Diamond.  Atmel is stingy with Prochip Designer licenses and WinCUPL is a steaming pile of sh*t but at least free.

I would also recommend changing the JTAG header to match one of the many many parallel port programming cables in eBay with a 2x5 .1" header.  People can buy them assembled and shipped from Asia for under $15.

And in a clean two IC and 1 header or CF slot design, I still don't understand the preference towards SMT when everything is available through hole.
115
Project development, ideas, and suggestions / Re: XT/IDE CPLD Implementation Technical Discussion Thread
Here's a fragment of the JR-IDE CUPL code:

Code: [Select]
Pin 12 = IDE_A0;
Pin 15 = IDE_A1;
Pin 10 = IDE_A2;
Pin 16 = !IDE_RD;
Pin 17 = !IDE_WR;

Pin 79 = !MEMWR;
Pin 80 = !MEMRD;
Pin 75 = !IOWR;
Pin 74 = !IORD;


Pin 11 = !CFG1;
Pin  8 = !CFG2;

Pin  6 = !IDE_CE0;
Pin  9 = !IDE_CE1;



WIN_DEC = A19 & A18 & !A17 & !A16 & !(A15 $ CFG2) & !(A14 $ CFG1);
SUB_DEC = WIN_DEC & A13 & A12 & A11 & A10;

field SUBADDR = [A9..0];
IDE_WIN = SUB_DEC & SUBADDR:[0..1F];

IDE_CE0 = IDE_WIN & !A4 & ((MEMRD & !A0) # (MEMWR & A0));
IDE_CE1 = IDE_WIN &  A4 & ((MEMRD & !A0) # (MEMWR & A0));


Pinnode = [DL7..0];

DL7.t = IDE_WIN & !A0 & ((MEMWR & (DL7 $ D7)) # (MEMRD & (DL7 $ IDE_D15)));
DL6.t = IDE_WIN & !A0 & ((MEMWR & (DL6 $ D6)) # (MEMRD & (DL6 $ IDE_D14)));
DL5.t = IDE_WIN & !A0 & ((MEMWR & (DL5 $ D5)) # (MEMRD & (DL5 $ IDE_D13)));
DL4.t = IDE_WIN & !A0 & ((MEMWR & (DL4 $ D4)) # (MEMRD & (DL4 $ IDE_D12)));
DL3.t = IDE_WIN & !A0 & ((MEMWR & (DL3 $ D3)) # (MEMRD & (DL3 $ IDE_D11)));
DL2.t = IDE_WIN & !A0 & ((MEMWR & (DL2 $ D2)) # (MEMRD & (DL2 $ IDE_D10)));
DL1.t = IDE_WIN & !A0 & ((MEMWR & (DL1 $ D1)) # (MEMRD & (DL1 $ IDE_D9)));
DL0.t = IDE_WIN & !A0 & ((MEMWR & (DL0 $ D0)) # (MEMRD & (DL0 $ IDE_D8)));

[DL7..0].ce = 'b'1;
[DL7..0].ck = CLK;
[DL7..0].ar = RESET;

/* Mux'd ROM lines are already qualified with ROM enable */
IDE_D15 = D7;
IDE_D14 = D6;
IDE_D13 = D5;
IDE_D12 = D4;
IDE_D11 = D3;
IDE_D10 = D2;
IDE_D9  = (IDE_WIN &  D1) # (!IDE_WIN & ROM_A18);
IDE_D8  = (IDE_WIN &  D0) # (!IDE_WIN & ROM_A15);
IDE_D7  = (IDE_WIN & DL7) # (!IDE_WIN & ROM_A17);
IDE_D6  = (IDE_WIN & DL6) # (!IDE_WIN & ROM_A14);
IDE_D5  = (IDE_WIN & DL5) # (!IDE_WIN & ROM_A16);
IDE_D4  = DL4;
IDE_D3  = DL3;
IDE_D2  = DL2;
IDE_D1  = DL1;
IDE_D0  = DL0;

[IDE_D15].oe  = MEMWR;
[IDE_D14].oe  = MEMWR;
[IDE_D13].oe  = MEMWR;
[IDE_D12].oe  = MEMWR;
[IDE_D11].oe  = MEMWR;
[IDE_D10].oe  = MEMWR;
[IDE_D9].oe  = MEMWR # !IDE_WIN;
[IDE_D8].oe  = MEMWR # !IDE_WIN;
[IDE_D7].oe  = MEMWR # !IDE_WIN;
[IDE_D6].oe  = MEMWR # !IDE_WIN;
[IDE_D5].oe  = MEMWR # !IDE_WIN;
[IDE_D4].oe  = MEMWR;
[IDE_D3].oe  = MEMWR;
[IDE_D2].oe  = MEMWR;
[IDE_D1].oe  = MEMWR;
[IDE_D0].oe  = MEMWR;

IDE_A0 = A1;
IDE_A1 = A2;
IDE_A2 = A3;
IDE_RD = MEMRD;
IDE_WR = MEMWR;


D0 = (A0 & DL0) # (!A0 & IDE_D0);
D1 = (A0 & DL1) # (!A0 & IDE_D1);
D2 = (A0 & DL2) # (!A0 & IDE_D2);
D3 = (A0 & DL3) # (!A0 & IDE_D3);
D4 = (A0 & DL4) # (!A0 & IDE_D4);
D5 = (A0 & DL5) # (!A0 & IDE_D5);
D6 = (A0 & DL6) # (!A0 & IDE_D6);
D7 = (A0 & DL7) # (!A0 & IDE_D7);

[D7..0].oe = MEMRD & IDE_WIN
116
Project development, ideas, and suggestions / Re: XT/IDE CPLD Implementation Technical Discussion Thread
The way I went about it on the JR-IDE, was to shift the address lines up in code A3..1 -> IDE_A2..0.  The latches are contained within the PLD.  A read from an even address activates the appropriate IDE CS (based on A4) and returns the lower IDE lines on the ISA data lines and a common 8-bit latch grabs the uppers.  An odd read returns the latch values.  That way 8-bit reads and 16-bit reads function the same and correctly.  Natural IDE register ordering is preserved (only the x86 address offsets get multiplied by 2).  This basically what Chuck intended but it was easier just to rework two wires and reorder the register offsets in code.

ATM for writes, writes to even addresses go to the same common latch only.  Writes to odd addresses activate the appropriate IDE CS (again based on A4) and present the ISA address lines on the upper IDE bus data lines and the latch contents on the lower.

I currently have all writes working this way as I'm running out of cells.  The JR-IDE does much more than just IDE and I'm using a rather small PLD.  However the above behavior could easily be restricted to just the data register (A4..1 = b'0000) and writes to other registers could happen directly with either a non-deterministic upper IDE byte or zeros.  The current method isn't that bad  as adding an extra bus cycle for setting things like the sector address is a small price for the extra benefit to sector loads.

The IDE registers are also memory mapped on the JR-IDE board.  Though that may be moot since I believe most PC clones add the same waits for 8-bit memory as 8-bit I/O (not 100% sure though).  I don't have an option BIOS fully written yet so I can't benchmark atm.  That will hopefully happen next week as I'm currently working on a nice framework for OWC.

I'll post the CPLD code I'm using for all of the above later this evening once I get home from work.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01442403448session_write_close ( )...(null):0
20.01482535072ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01482535848Database_MySQL->query( ).../DatabaseHandler.php:119
40.08112674608Database_MySQL->error( ).../Db-mysql.class.php:273