Next: , Previous: Find command, Up: File commands


3.8.3 Chop command

Chop (or split) files at design unit.

     $ ghdl --chop files

GHDL reads files, and writes a file in the current directory for every design unit.

The filename of a design unit is build according to the unit. For an entity declaration, a package declaration or a configuration the file name is NAME.vhdl, where NAME is the name of the design unit. For a package body, the filename is NAME-body.vhdl. Finally, for an architecture ARCH of an entity ENTITY, the filename is ENTITY-ARCH.vhdl.

Since the input files are parsed, this command aborts in case of syntax error. The command aborts too if a file to be written already exists.

Comments between design units are stored into the most adequate files.

This command may be useful to split big files, if your computer has not enough memory to compile such files. The size of the executable is reduced too.