-------- SIMTEL20 VHDL Repository Prologue ------------ -- -- Unit name : Translation Aids for DoD/Intermetrics 1076 VDHL Shared Test Suite -- Version : See individual files contained herein. %W% %G% -- Author : Steve Grout -- : MCC -- : 3500 West Balcones Center Dr. -- : Austin, TX 78759 -- DDN Address : grout@mcc.com -- Copyright : See individual files contained herein. -- Date created : See individual files contained herein. -- Release date : July 1988 -- Last update : August 1988 -- Machine/System Analyzed/Simulated on: Not analyzed or simulated -- : VHDL Version - 1076-1987 IEEE Std. -- --------------------------------------------------------------- -- -- Keywords : test, analyzer, syntax, semantics, 1076, Intermetrics, DoD -- -- Abstract : -- This file consists of GNU-emacs editor keyboard macros -- to use in translating from 7.2 VHDL to version 1076-1987 IEEE Std VHDL -- language. -- We solicit comments, bugs, and corrections on these -- macros and will post updates back to this same -- distribution as soon as we get them. -- ------------------ Revision history --------------------------- -- -- DATE VERSION AUTHOR HISTORY -- August 1988 1.0 Editor: Steve Grout Original -- ------------------ Distribution and Copyright ----------------- -- -- This prologue must be included in all copies of this VHDL code. -- -- This description is copyright by the author. -- -- This description is released to the VHDL community. -- This description is released to the Public Domain (note: -- Hardware descriptions released to the Public Domain are not subject -- to copyright protection). -- Restrictions on use or distribution: NONE -- ------------------ Disclaimer --------------------------------- -- -- This VHDL description code and its documentation are provided -- "AS IS" and without any expressed or implied warranties whatsoever. -- No warranties as to performance, merchantability, or fitness -- for a particular purpose exist. -- -- Because of the diversity of conditions under which this code may be -- used, no warranty of fitness for a particular purpose is offered. -- The user is advised to evaluate the code thoroughly before relying on it. -- The user must assume the entire risk and liability of using this code. -- -- In no event shall any person or organization of people be -- held responsible for any direct, indirect, consequential -- or inconsequential damages or lost profits. -- -------------------END-PROLOGUE-------------------------------- -- cut off the above VHDL-SW header before using with GNU-emacs. ------------------------------------------------------------------------------ ;;; -*- mode: emacs-lisp -*- -- %W% %G% ;;; ************************************************************************ ;;; Copyright (C) 1988 Microelectronics and Computer Technology Corporation ;;; - VLSI CAD Program - %Y% ;;; ************************************************************************ ;;; File Contents: Aids For Translating 7.2 VHDL to IEEE 1076-1987 VHDL ;;; This file may be redistributed provided the above copyright notice ;;; appears on all copies and that the further free redistribution of this ;;; file is not in any way restricted by those who redistribute it. ;;; ;;; These gnuemacs aids are distributed 'as is', without warranties of any kind. ;;; ;;; This file is not part of any MCC proprietary or DoD VHDL software. ;;; ;;; Author: Steve Grout ;;; ;;; ********************************************************************** ;;; DESCRIPTION: Save this message as a file named "translate-72-to-1076.el". ;;; ;;; This file describes the generic changes that will be made ;;; using GNU-EMACS keyboard macro command definitions ;;; to convert ../VHD/CH*/*.vhd 7.2 files to ../VHD/CH*/*.vhdl 1076 files. ;;; Each section briefly describes what the 7.2 language construct WAS ;;; and what it should be in order to be proper 1076 VHDL. ;;; Each 'fset' expression was created as keyboard macro, named, ;;; inserted into this file, and bound to an available key. ;;; The 'BINDING - ACTION' table below summarizes the bindings ;;; and under the conditions this file is used by the author ;;; shows up as a 'reminder' buffer at the top of the screen. ;;; ;;; Most of the actual translation commands work in the current ;;; buffer window and are therefore independent of the current ;;; gnuemacs screen/windowing configuration. ;;; ;;; However a few commands (e.g., meta-c-shift-B, meta-c-shift-N) presume ;;; that the current gnuemacs window is about 120-chars by ;;; 55-lines in size, a *shell* buffer has been started, this ;;; file has both been loaded and is in a buffer, the chapter ;;; of interest (e.g., ../VHD/CH10/*) is in a dired buffer with ;;; the point at the file being edited, and the file of interest ;;; is a buffer, the shell window is cd'd to the chapter of interest, ;;; and that the command to VHDL analyze a file is 'va'. Also ;;; the shell assumes a UNIX 'csh'. ;;; ;;; This somewhat complicated setup allows for very ;;; fast editing, verification, and moving on to the next file. ;;; ;;; If all of that is too much to follow, then just ignore that ;;; part. (All of this is quite easy to CREATE but much more ;;; complicated to change...most of the time, a new keyboard was ;;; simply created to do the most correct action and took the ;;; place of the previous definition.) ;;; --jsgrout 5/5/88 ;;; ;;; Modification History ;;; -------------------------------------------------------------------- ;;; Cleaned up, added copyright boiler-plate, description, and posted ;;; to vhdl-sw@simtel20.arpa, info-vlsi@think.com, and comp.lis --jsgrout 7/14/88 ;;; ********************************************************************** ;;; ;;; -------------------------------------------------------------- ;;; BINDING: ACTION: ;;; -------------------------------------------------------------- ;;; ;;; meta-c-W Fix with-package ;;; meta-shift-B Fix with-package and add package body ;;; meta-shift-P Change package to package body ;;; meta-c-P Fix entity ports ;;; meta-c-A Fix architectural block ;;; meta-c-F Fix for-loop ;;; meta-c-shift-C Fix component declarations/instantiations ;;: meta-c-shift-Q fix standalone function ;;; meta-K Fix package containing a function ;;; meta-G fix-qualified-name - '(''..) ;;; meta-S Fix signal target list ;;; meta-A Fix attribute specification ;;; c-X c-T Fix attribute declaration ;;; meta-c-shift-Y create a mail message from current shell buffer ;;; meta-c-shift-D Move current test to ../VHD/Dead directory. ;;; meta-c-shift-N Save, rename, and edit next file ;;; meta-c-shift-B test file referenced by vhdl buffer, assuming ;;; standard translate window setup. ;;; meta-o h Update DoD header for 1076 update, sccs ;;; meta-shft-; Comment out line ;;; meta-; Uncomment out line ;;; ;;; ------------------------------------------------------------ ; ;;; ; make sure cant exit X-emacs unless I want to. ;;; If I type c-X C-X the worst I do is save buffers... (global-set-key "" 'save-some-buffers) ;;; ------------------------------------------------------------ ;1. Convert 'with package, ..use package' statements: ; WAS: ; with package ; ; use ; ; IS: ; -- with package ; ; use .all ; ; FUNCTION: fix-with-package ; BINDING: meta-c-W (fset 'fix-with-package "with-- use ;.alluse  ") (global-set-key "" 'fix-with-package) ; meta-c-W ;;; ------------------------------------------------------------ ;2. Convert Entity Port & Generic Statements: ; WAS: ; entity ( ) is ; generic ( ) ; IS: ; entity is ; generic ( < generic decls> ) ; ; port ( ) ; ; FUNCTION: fix-entity-ports ; BINDING: meta-c-P ; (fset 'fix-entity-ports "entity() port  ;generic(global-set-key "" 'fix-entity-ports) ; meta-c-P ;;; ------------------------------------------------------------ ;3. Convert Architectural bodies: ; WAS: ; architecture of is ; : block ; begin ; ... ; end block ; ; end ; ; IS: ; architecture of is ; -- : block ; begin ; ... ; -- end block ; ; end ; ; FUNCTION: fix-arch-block ; BINDING: meta-c-A ; (fset 'fix-arch-block "architecture(global-set-key "" 'fix-arch-block) ; meta-c-A ;;; ------------------------------------------------------------ ; WAS: ; for := loop .. end loop ; ; IS: ; for in loop .. end loop ; ; FUNCTION: fix-for-loop ; BINDING: meta-c-F (fset 'fix-for-loop "for:=(global-set-key "" 'fix-for-loop) ; meta-c-F ;;; ------------------------------------------------------------ ; 5. Comment out line VHDL-style ; WAS: ; ; ; IS: ; -- ; -- ; -- ; IS: ; ; ; FUNCTION: vhdl-uncomment-line ; BINDING: meta-; (fset 'vhdl-uncomment-line "--") (global-set-key "" 'vhdl-uncomment-line) ; meta-; ;;; ------------------------------------------------------------ ;1. Convert package statements to package-body statements: ; WAS: ; with package ; ; use ; ; package ; ; ; end ; ; IS: ; -- with package ; ; use .all ; ; package body ; ; ; end ; ; FUNCTION: fix-with-package-body ; BINDING: meta-shift-B (fset 'fix-with-package-body "with-- use (global-set-key "" 'fix-with-package-body) ; meta-shift-B ;;; ------------------------------------------------------------ ; WAS: ; (not applicable) ; IS: ; ; FUNCTION: after editing is complete, save the current buffer, ; kill the buffer, go back to the chapter buffer, ; rename the file to .vhdl, and begin editing the next file. ; BINDING: meta-c-shift-N (fset 'save-and-get-next-file "k o(global-set-key "" 'save-and-get-next-file); meta-c-shift-N ;;; ------------------------------------------------------------ ; WAS: ; package is ; ; end ; ; IS: ; use .all ; ; package body is ; ; end ; ; FUNCTION: Change from package declaration to package body ; BINDING: meta-shift-P (fset 'change-to-package-body "packagebody (global-set-key "" 'change-to-package-body); meta-shift-P ;;; ------------------------------------------------------------ ; WAS: ; package is ; ; ; end ; ; IS: ; use .all ; ; package is ; ; ; end ; ; use .all ; ; package body is ; ; ; end ; ; FUNCTION: fix package containing a function. ; BINDING: meta-shift-P (fset 'fix-package-function "package(global-set-key "" 'fix-package-function) ;;; ------------------------------------------------------------ ; FUNCTION: Save and run thru VHDL analyzer in next window. ; BINDING: meta-c-shift-B (fset 'test-vhdl-buffer "o(global-set-key "" 'test-vhdl-buffer); meta-c-shift-B ;;; ------------------------------------------------------------ ; WAS: ; Architecture of is ; ... ; component port ( ) ; ; begin ;