SPICE File Creation Program

The first program is designed to create a SPICE file of either type of network with an array of input voltages. There are a number of options that are specified at the start:

The input voltage array is computed by the function ImageInput, which takes indices into the array as an argument and returns the required voltage. By changing this function, different input signals can be produced. This function is called by main to produce the input array. The two files header.cir and footer.cir are inserted at the start and end of the file.

The program has a makefile, so compilation should be possible simply by typing make on the command line. The executable file is called cctmake. The program produces the SPICE file on standard output, so it should be invoked by redirecting output to a file, such as:

cctmake > 2d.cir

Matthew Exon 2004-05-23