linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geir Frode Raanes <geirfrs@invalid.ed.ntnu.no>
To: "Kerl, John" <John.Kerl@Avnet.com>
Cc: "'linuxppc-embedded@lists.linuxppc.org'"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: RE: custom mpc8240 student project (long)
Date: Fri, 22 Feb 2002 10:32:26 +0100 (CET)	[thread overview]
Message-ID: <20020222084929.O34054-100000@invalid.ed.ntnu.no> (raw)
In-Reply-To: <C08678384BE7D311B4D70004ACA371050B7632E4@amer22.avnet.com>


On Thu, 21 Feb 2002, Kerl, John wrote:

>
> I don't want to scare anyone off ... JTAG *is* slow, painful,
> and fraught with hazards -- *if* you try to write your own
> software to bit-bang the JTAG pins over, say, a parallel port.

Now, the parallel port is as we all know parallel.
JTAG is, as we all know, synchronous serial.

To interface the former to the latter, one would normally
place a shift register with clock control inbetween. But
the clock control can be complex enough to justify replacing the
shift register and clock control with a single microcontroller
with a SPI port. The SPI port basically constitutes of a shift
register with clock control which we can misuse as such.
An AVR AT90S4433 would suffice. It also offer an HW UART if
serial communication is preferable to the parallel port.

One needs one full 8 bit port free to read an external octal
latch/register or FIFO, which other side will be hooked up to
the parallel port. Basically two chips and perhaps some glue.

Preferabely use an 9 bit wide FIFO like the 9x64 word deep
74HC7030. The 9'th bit can be connected to an control
line of the parallel port to distinguish between control
and data in the FIFO. The other end of the 9'th bit can
then be routed to an interrupt pin on the microcontroller
to avoid SW polling.

> #2, the bit rate out the parallel port is abysmal.  Another
> poster on this list cited 40 KB in 12 minutes; our experience

Legacy parallel port perform @ 100 KByte/s. This is about
the saturation level of the microcontroller too. It is also
as fast than the SPI port will go, wich tops out below Fosc/4
or 8MHz/4 = 2MBit/s = 256 KByte/s. But datapushing at 100 KB/s
leaves a headroom of ~64 instructions per byte. Tight.

> #1, you don't write any C code; you get the BSDL files from the
> part vendors, and the board's netlist from the board vendor.

What I would like to know is wether this BSDL file can be used
to reversengineer the functionality of the internal TRAP logic.
We really don't want to do boundary scan in the true meaning of
the words, but rather we want to do what BDM4GDB does for us on
the XPC8xx series CPUs - control the core. I do HW, not really SW.

This is all about control - the manufactures should not be allowed
to place a NDA on this information. Redirecting customers to 3'd
party vendors of debug equipment effectively means customer
filtration. "If your are to small to afford the contiousely
astronomical cost of 3'd party tools, then you're also too
small for us." Need I remind you that the same melody can
be applied to GCC and LinuxPPC vs. 3'd party too...?

> #3, socketed flash tends to wear out -- we've had a lot of
> frustration with metal fatigue on the flash pins and/or socket
> pins.  When you use JTAG, you aren't wearing out your flash
> pins by popping them in & out of sockets, in & out of the flash
> programmer, dropping them, etc.

Zero Force Sockets? But really, reprogramming a flash is not the
right way to do debugging. One needs the good, old EPROM emulator.

It is really not that hard to make - works much the same way as the
JTAG dongle above, but parallel in both ends. Use either some dual
port SRAM - or - (larger) single sided SRAM plus bus mastering
capabilities between the MCU and the CPU (PowerPC.) The bus
mastering is not used for anything else than throwing the CPU
off the bus so that the MCU can update/patch the SRAM.

The easiest and most flexible solution is the dual ported SRAM
version, the cheapest is the single sided SRAM + bus mastering.
But GDB server stubs has to reside in the (DP)SRAM too. Reverse
channel communication can also be done through the same (DP)SRAM.

The open source community could really use such an beast, given
the current NDA state of JTAG. The dual ported SRAM version is
even CPU independant - EPROM/Flash chips looks the same regardless
of platform. Hmmm. Anyone want to do the GDB server part if I do
the hardware?


--
  ******************************************************
  Never ever underestimate the power of human stupidity.
  -Robert Anson Heinlein

		GeirFRS@invalid.ed.ntnu.no
  ******************************************************


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2002-02-22  9:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-21 20:12 custom mpc8240 student project (long) Kerl, John
2002-02-21 20:32 ` Jim Thompson
2002-02-21 22:40   ` Ron Bianco
2002-02-22  9:32 ` Geir Frode Raanes [this message]
2002-02-22 13:09   ` Jerry Van Baren
2002-02-23 19:16     ` Dan Malek
2002-02-25 12:18     ` Geir Frode Raanes
2002-02-27 11:46       ` Christian Pellegrin
  -- strict thread matches above, loose matches on Subject: below --
2002-02-22 18:33 Kerl, John
2002-02-22 20:51 ` Wolfgang Denk
2002-02-22  1:11 Dustin Byford
2002-02-22  1:07 Dustin Byford
     [not found] <7E8519F1A7C0D211B0D200A0C93AA60F08447D20@ntmail.iskratel.si>
2002-02-18 21:17 ` Dustin Byford
2002-02-18 21:44   ` Wolfgang Denk
     [not found]     ` <auto-000008693306@zipmail.com>
2002-02-18 22:32       ` Wolfgang Denk
2002-02-19 11:40       ` Jerry Van Baren
2002-02-19 16:53         ` Bob Piatek
2002-02-20  2:32       ` Greg Griffes
2002-02-18 10:33 Dustin Byford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020222084929.O34054-100000@invalid.ed.ntnu.no \
    --to=geirfrs@invalid.ed.ntnu.no \
    --cc=John.Kerl@Avnet.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).