PROGRAMMABLE TECHNOLOGIES WEB SITE

A scientific study of the problems of digital engineering for space flight systems,
with a view to their practical solution.


KPP - A VHDL Pre-Processor

 

kpp.zip

This file contains KPP - a pre-processor, similar to CPP, for VHDL applications.   It provides many standard functions such as #def, #undef, #ifdef, #include, etc.   It also provides for loops and some other features.  The program will run on Win '95, Win '98, and Win NT.  For this version, use the default directory for installation.   Authored by Ingrid Brill (aka "Summer 2").

Here's some information from the included help file:

define <variable> {number}:    Causes the variable to be defined, or exist, in the program.

If number is included, the variable is defined as that number throughout the rest of the program.

Note: The variable will not be seen as a defined variable in #ifdef or #ifndef statements.

#undef <variable>:    Causes the variable to be be undefined, or not exist, in the program.

#include <filename>:    Replaces itself with the contents of the file filename (which are then also processed in the same fashion as the original code).

Nested #includes are allowed.

#ifdef <variable>:    Performs the code below if the variable is defined.

Must always be followed by either an #else or an #endif.

Does not work when double nested.

#ifndef <variable>:    Performs the code below if the variable is not defined.

Must always be followed by either an #else or an #endif.

Does not work when double nested.

#else:    Must always have either an #ifdef or #ifndef preceding it.

Performs the code below if the preceding #ifdef or #ifndef statement was false.

Does not work when double nested.

#endif:    Needs to follow either an #ifdef, #ifndef, or an #else.

#for <variable> = x to y:         Loops through the code below, letting variable equal all the numbers between x and y, with an increment of 1.

Must always be followed by an #endfor.

Works when nested.

#endfor:    Needs to follow a #for.

--comment:    Two dashes always precede a comment.


Home
Last Revised: January 09, 2002
Digital Engineering Institute
Web Grunt: Richard Katz