-- -- Author: Robert C. Shock, Dept of CS & CEG Wright State University -- In cooperation with: WRDC/ELED WPAFB Dayton, OH -- UNIX INSTALLATION GUIDE for VHDL Style Tool Set The VHDL Style Tool Set is a set of shell scripts ( tools ) that operate on vhdl source code while preserving the property of compilation. The code below exemplifies a typical shell script. The script called vlower inputs vhdl source code files and changes each lexical unit except the comment to lower case. The call is: vlower source_file1 source_file2 ... The first section of vlower below echoes the letter specification to a temporary file /tmp/$$.tmp. Next, a for loop catenates the letter specification on /tmp/$$.tmp with an input source code. Finally, the output is directed to the name of the original input source code. Note the original format of the input file is lost. -- sample script -- #!/bin/sh # vlower # define letter specification echo lower_case -- identifier_reserved -to- lower_case > /tmp/$$.tmp echo lower_case -- identifier_not_reserved -to- lower_case >> /tmp/$$.tmp echo lower_case -- literal_abstract_decimal -to- lower_case >> /tmp/$$.tmp echo lower_case -- literal_abstract_based -to- lower_case >> /tmp/$$.tmp echo lower_case -- literal_bit_string -to- lower_case >> /tmp/$$.tmp echo unchanged_case -- literal_comment -to- unchanged_case, >> /tmp/$$.tmp for file do # copy to preserve protection of input files cp $file /tmp/$$tmp cat /tmp/$$.tmp /tmp/$$tmp | $bin_vhdl_tools/vhdl_letter_set_style.e > $file done rm /tmp/$$.tmp rm /tmp/$$tmp Section 1, called Directories, lists the names of files that belong to the directories. Section 2, called System defines symbols and paths Section 3, called Ada Compilation, lists the order of (ada ) compilation of the ada source code. Section 4, called Shell Scripts, defines each script 1 Directories 1.1 Create a system directory, labeled: bin_vhdl_tools 1.2 Place these tool procedures ( ada executable images ) in bin_vhdl_tools: vhdl_letter_set_style.e vhdl_scroll_set_style.e vhdl_shape_set_style.e vhdl_shape_type_standard.e vhdl_type_set_style.e 1.3 Place these text file in bin_vhdl_tools: postscript_header.file help.guide user.guide 1.4 These tool command files ( ie, unix shell scripts ) access the directory, bin_vhdl_tools, and must be placed in the user's path for shell script execution vletter vletter_set_style vlower vupper vscroll vscroll22 vscroll_set_style vsun vshape vshape94 vshape_set_style vlw vtype vtype_italics vtype_set_style help_vhdl_tools user_vhdl_guide vhdl_tools 2 System defined symbols 2.1 bin_vhdl_tools = path name to the system's directory that contains the ada programs executable images and certain text files ( see 1.2, 1.3 ) 2.2 PRINTERlw1 = system defined name of the laser printer for printing postscript code 3 Ada Compilation Notation: xxxx_.a package specification xxxx__.a package body or package specification + package body xxxx.a procedure UNIT: lexicon -- compile units IN ORDER io_unit_.a io_unit__.a transliterate_gn__.a -- compile these IN ORDER vhdl_lexicon_.a vhdl_name_.a vhdl_name_.a vhdl_build_.a vhdl_build_.a vhdl_lexicon__.a COMPILATION UNITS: letter_style, type_style, shape_style, scroll_style UNIT: letter_style -- Compile in order vhdl_lexicon_letter_style__.a -- compile in any order ( procedure ) vhdl_letter_set_style.a ( image is: vhdl_letter_set_style.e ) UNIT: shape_style -- Compile in order vhdl_lexicon_shape_style_.a vhdl_lexicon_shape_style__.a vhdl_separate_shape_style__.a -- Compile in any order ( procedures ) vhdl_shape_set_style.a ( image is: vhdl_shape_set_style.e ) UNIT: type_style -- Compile in order vhdl_lexicon_type_style__.a -- Compile in any order ( procedures ) vhdl_type_set_style.a ( image is: vhdl_type_set_style.e ) UNIT: scroll_style -- ASSUMPTION: these package are compliled: vhdl_lexicon_shape_style_.a vhdl_lexicon_shape_style__.a vhdl_separate_shape_style__.a -- Compile in any order ( procedure ) vhdl_scroll_set_style.a ( image is: vhdl_scroll_set_style.e ) SPECIAL UNIT: combined shape and type -- ASSUMPTION: these package are compliled: vhdl_lexicon_shape_style_.a vhdl_lexicon_shape_style__.a vhdl_separate_shape_style__.a vhdl_lexicon_type_style__.a -- Compile ( procedure ) vhdl_shape_type_standard.a ( image is: vhdl_shape_type_standard.e) 4 Shell Scripts The shell scripts are in an unix shar package called shell_scripts.shar.