This distribution now includes a number of HTML files with embedded Prolog source code, a small filter program Make.java, a data directory with seven sample VHDL-87 files, and a test_data directory with six VHDL-93 files and six VHDL-AMS files (from the Validation Suite due to Tom Kazmierski from University of Southampton, U.K.). The VHDL formatter produces a readable text file from the parse tree representing a VHDL design. The current version of the system can be run in both UNIX environment and in Windows2000/XP environment as long as SWI-Prolog and Java 2 are available.
To generate and test the parser, set the environment variable PATH to enable access to executables such as javac, java, plwin, plcon, etc.
To compile and test the parser: % javac Make.java; java Make
To delete only generated prolog files: % java Make clean
To delete all generated files (incl. parser/classes): % java Make clean_all
To get all the options: % java Make help
To browse the parser design document: % netscape START.html
To extract the tutorial example: % java Make tutorial.html
This tutorial will take you step by step through the process of writing and executing simple queries about the VHDL designs read in by the parser.
To read an arbitrary VHDL file (e.g. mine.vhdl):
UNIX % vhdl97_parser DOS> plcon -x vhdl97_parser ?- vhdl_read(mine). ?- listing(design_unit). . . .
A preliminary version of the Design Browser with a Graphical User Interface written in Java 2 (Gui.java) that uses a search engine written in Prolog (search_engine.prolog) has been included in the distribution. A short description of its implementation and use by Tianrong Hu is in browser.html.
To compile and run the Browser using Java, type "javac Gui.java" followed by "java Gui" at the UNIX-shell prompt or the MS-DOS command prompt. As of February, 2002, the VHDL-AMS Parser and Pretty-Printer system has been upgraded for SWI-Prolog version 5.0 and tested on Intel PC running Windows 2000/XP, AMD PC running Linux Mandrake version 8.1, and UltraSPARC 10 Workstation running Solaris 8. The experimental GUI, in contrast, has not been adequately tested after the upgrade.