Running the preprocessor

When you create your ROM you may include the ROM preprocessor code in the same file as your FHDL code. The ROM preprocessor code must begin with a statement of the following form.
my_rom: rom
The ROM preprocessor code must end with the following statement.
endrom
The "rom" and "endrom" statements replace the "circuit" and "endcircuit" statements used in FHDL code. The ROM preprocessor expects all input to be supplied from the standard input and produces all output on the standard output. Furthermore, all non-rom code is passed unchanged from the input to the output, so ROM preprocessor code can be mixed with FHDL in the same file. More than one ROM may be specified in the same file. The following command invokes the ROM preprocessor. (This command is invoked automatically if the fhdl command with the "-n" option is used.)
romasm <testit.rom >testit.ckt
The output of the rom preprocessor may also be directly piped into the FHDL compiler as follows.
romasm <testit.rom | fhdl >testit.c
If an include library is required, specify it as follows (rom.stuff is the name of a directory containing your include files).
romasm rom.stuff <testit.rom | fhdl >testit.c