To revisit since I've gotten two questions about this thread in as many weeks -
When the ECU fails in the manner Guy's did, (I've seen 4 of these now; ALH only, so far) the car has drivability problems as well as:
White smoke
Boost control issues & codes
Timing control issues & codes
Inability to rev up & very easily stalled
MAF and/or EGR codes
These cars may or may not exhibit all of the symptoms, but if you're only seeing one or maybe two of these symptoms, the ECU is likely not the problem.
The above combination of symptoms can be caused by concurrent malfunction of the N75 (turbo actuator control solenoid), N18 (EGR valve control solenoid), and N108 (timing advance solenoid in pump). These solenoids are continuously pulsed via square wave controlled by the ECU. These solenoids all receive constant voltage and have a ground lead running to the ECU. The ECU controls the pulsing (duty cycle) by alternating the ground/open bias. Relating to the issue at hand, all three ground pins are neighbors at the ECU. Consult your wiring diagram for the full details, but the pertinent ECU side pins are in the area of pins 61, 62, 80, 81 and 82.
Obviously before condemning an ECU, proper due diligence should include testing continuity between problematic devices and their voltage source, grounds, leads, and all the general stuff (vacuum, timing, faulty solenoids, clogged intakes etc.) Basically, I don't want someone to read this, jump to conclusions, and go off spending a few hundred dollars getting the immo. deleted from their junkyard ECU, installing it, and still having smoke, low power, and timing issues because their '02 beat-hole with 200K miles on the clock has a leaky vacuum pump, crunchy VNT actuator, and a dealer timing belt job... Rule out the easy cheap stuff first!
If you have some evidence to support the supposition that the ECU's time has passed, keep in mind -
All non-immo EB & BK (98-99.5 Golf/Jetta4/Beetle) ECUs are drop in compatible with each other.
All immo2 BD, CP, and N ('00-'01 G/J/B) ECUs are compatible with each other, but before starting the car, channel 00 will need to be adapted in the instruments controller with VCDS (or equivalent) to "reset all factory defaults"
If your car uses an immo3 ('02-'03 G/J/B) FD or GN ECU, you'll need to have the immobilizer removed in order to get your car to run with a different ECU than it came equipped...find a chiptuner.
If you replace your ECU, make sure the replacement ECU is from the same immo version. There are subtle differences that can be problematic even if the immo is deleted...like glow plug control for example.
Please also keep in mind that this list of ECU suffixes is not complete. These are just the more common ones I remember off the cuff.