Christian Iseli writes:> [...] a student here has written a compiler that> translates a subset of C (only one data type, functions, for loops and> conditionals) into a netlist for ViewLogic (a wirelist file) [...]
[...]> The interest to describe circuitry in C lies, for me, in the fact of> being able to simulate it (or better said, to emulate it) as part of a> larger C++ (or C) program. That's why this compiler came into being.

Interesting. As part of an ESPRIT project, I've been producing a compiler
for the Function Block graphical language described by IEC1131-3 (the
project has also produced an X-based editor for writing such programs). In
addition to producing code for a fictitious industrial controller, the
compiler generates C which can be used for simulation. I've found that
the most rewarding means of providing this simulation to be to use the
generated C to implement a new Tcl/Tk command, "iec_scan", which performs
forcing of inputs, execution of a single scan of the program, and monitoring
of outputs. This method makes it *really* easy to produce an impressive
simulation.