From: Smith on
Hello all



I need to run an old firmware for a Siemens SAB 80C537 microcontroller unit
(MCU). The MCU is now obsolete (it's from the late 1980s).



The firmware is compiled from several thousand rows of assembly language. It
would take a long time to understand the code and re-program it in C.



So I'm thinking of using an 8051 IP-core for a FPGA and run the firmware
code without any changes to the code.



Any one here had any luck with this kind of problem?




From: Tilmann Reh on
Smith schrieb:

> I need to run an old firmware for a Siemens SAB 80C537 microcontroller unit
> (MCU). The MCU is now obsolete (it's from the late 1980s).
>
> The firmware is compiled from several thousand rows of assembly language. It
> would take a long time to understand the code and re-program it in C.
>
> So I'm thinking of using an 8051 IP-core for a FPGA and run the firmware
> code without any changes to the code.

Unless you have an FPGA implementation of /exactly/ the 537, it probably
won't work. Remember that this MCU also contains very many special
function registers that most probably are used by the software, but not
covered by the available, more "generic", IP cores.

Several thousand lines of 8051 assembly, however, don't appear too much
to port. If you have the sources (as it sounds), you can probably find
the SFR-relevant code sections rather easily and port the application
(still in assembly language) to your new implementation on any current
8051 - or an IP-core in an FPGA.

Unless you have an FPGA in your new design anyway, I would however
suggest to look for a new flash-based 8051 MCU. It will probably be less
porting expense. Have a closer look /why/ the 537 was choosen for this
application - was it the number of ports, or any special peripheral
hardware function? Get a modern chip that fits these requirements best.

"Without any changes to the code" is not possible IMHO.

Tilmann
From: Stefan Brröring on
Do you need one 80537, a few, or lots of MCUs?
From: D Yuniskis on
Smith wrote:
> I need to run an old firmware for a Siemens SAB 80C537 microcontroller unit
> (MCU). The MCU is now obsolete (it's from the late 1980s).
>
> The firmware is compiled from several thousand rows of assembly language. It
> would take a long time to understand the code and re-program it in C.
>
> So I'm thinking of using an 8051 IP-core for a FPGA and run the firmware
> code without any changes to the code.

http://www.opencores.com/project,8051

Note that you still have a lot of road ahead of you, should
you go down this path. Recall that you will also need to
design the various "integrated I/Os" in that '51 variant.
And, *hope* there are no subtle timing exploits used in
the code.

> Any one here had any luck with this kind of problem?

"Several thousand rows (?)" of assembly language isn't a
particularly big design. *If* you have the sources
*and* the schematics *and* knowledge of the application
domain, this would probably be easier to reimplement
from scratch.

If you *don't* have the sources, but *do* have the other
two items, you can mechanically reconstruct them and
back-annotate as appropriate (to add semantic value).

If you have only knowledge of the application domain,
then you have to deduce the hardware requirements as
you are back-annotating. Your knowledge of what the
device is likely *trying* to do gives you the foundation
for these deductions.

This last case is the most challenging though it is still
do-able. When I bid reverse-engineering jobs like this,
I figure on generating commented source code at a rate of
about 2-4KB/week. So, a 16K image is only a month or two
from start to finish. (If the image was created by a
*compiler*, my throughput goes up dramatically!)
From: Rich Webb on
On Mon, 19 Apr 2010 15:53:25 +0200, "Smith" <smith(a)donotwantmail.com>
wrote:

>Hello all
>
>
>
>I need to run an old firmware for a Siemens SAB 80C537 microcontroller unit
>(MCU). The MCU is now obsolete (it's from the late 1980s).
>
>
>
>The firmware is compiled from several thousand rows of assembly language. It
>would take a long time to understand the code and re-program it in C.
>
>
>
>So I'm thinking of using an 8051 IP-core for a FPGA and run the firmware
>code without any changes to the code.

There are lots and lots of MCS-51 microcontrollers still on the market.
Silicon Labs, Atmel, and Infineon among many others. I'd look there
first, before committing to instantiating an FPGA core.

--
Rich Webb Norfolk, VA