-------- 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 - <name>'('<lit>'..) ;;; 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 <name> ; ; use <name>; ; IS: ; -- with package <name> ; ; use <name>.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 <name> ( <port list> ) is ; generic ( <generic decls> ) ; IS: ; entity <name> is ; generic ( < generic decls> ) ; ; port ( <port list> ) ; ; 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 <name> of <name> is ; <lable> : block ; begin ; ... ; end block ; ; end <name> ; ; IS: ; architecture <name> of <name> is ; -- <lable> : block ; begin ; ... ; -- end block ; ; end <name>; ; FUNCTION: fix-arch-block ; BINDING: meta-c-A ; (fset 'fix-arch-block "architectureææâ(global-set-key "" 'fix-arch-block) ; meta-c-A ;;; ------------------------------------------------------------ ; WAS: ; for <name> := <range> loop .. end loop ; ; IS: ; for <name> in <range> 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: ; <anything> ; <anything> ; IS: ; -- <anything> ; -- <anything ; FUNCTION: vhdl-comment-out-line ; BINDING: meta-shift-; (fset 'vhdl-comment-out-line "--") (global-set-key "º" 'vhdl-comment-out-line) ; meta-shift-; ;;; ------------------------------------------------------------ ; 6. Uncomment VHDL-style line ; WAS: ; --<anything> ; <anything> -- <anything> ; IS: ; <anything> ; <anything> <anything> ; 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 <name>; ; use <name>; ; package <name> ; ; <statements> ; end <name> ; ; IS: ; -- with package <name>; ; use <name>.all ; ; package body <name> ; ; <statements> ; end <name> ; ; 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 <name> is ; <package declarations which belong in package body> ; end <name> ; ; IS: ; use <name>.all ; ; package body <name> is ; <package body declarations, including FUNCTIONs> ; end <name> ; ; 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 <name> is ; <function> ; ; end <name> ; ; IS: ; use <name>.all ; ; package <name> is ; <function declaration> ; ; end <name> ; ; use <name>.all ; ; package body <name> is ; <function specification> ; ; end <name> ; ; 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 <name> of <name> is ; ... ; component <name> port ( <port list> ) ; ; begin ; <label>: <name> port ( (<portlist>), <portlist>) ; ; end <name> ; ; IS: ; Architecture <name> of <name> is ; ... ; component <name> port ( <port list> ) ; ; END COMPONENT ; ; begin ; <label>: <name> port MAP( <portlist> ) ; ; end <name> ; ; FUNCTION: Fix Component Declaration, Instantiations. ; BINDING: meta-c-shift-C (fset 'fix-components "componentport ); end component ;p port map ") (global-set-key "ƒ" 'fix-components); meta-c-shift-C ;;; ------------------------------------------------------------ ; WAS: ; function <name> ... ; ... ; end <name>; ; IS: ; use P.all ; ; package body P is ; function <name> ... ; ... ; end <name>; ; end P ; ; FUNCTION: fix-standalone-function ; BINDING: meta-c-shift-Q (fset 'fix-standalone-function "function(global-set-key "‘" 'fix-standalone-function) ; ;;; ------------------------------------------------------------ ; WAS: ; <Results for a given test.> ; IS: ; To: <project-leader> ; From: <Tester> ; Subject: Error not found during Acceptance Test ; Cc: <tester> ; --text follows this line-- ; file: <test file name> ; command: <command used to generate below results> ; <run time results for a given test.> ; ; FUNCTION: create a mail message from current shell buffer ; BINDING: meta-c-shift-Y (fset 'make-error-mail-message "(global-set-key "™" 'make-error-mail-message) ; ;;; ------------------------------------------------------------ ; WAS: ; <current acceptance file - not yet a proper 1076 test..> ; IS: ; <file no longer in its original Analyzer/VHD chapter directory.> ; FUNCTION: Move current test to ../VHD/Dead directory. ; BINDING: meta-c-shift-D (fset 'move-test-to-Dead-dir "³o(global-set-key "„" 'move-test-to-Dead-dir) ;;; ------------------------------------------------------------ ; WAS: ; <signal-list> <= waveform ; ; IS: ; ( <signal-list ) <= waveform ; ; FUNCTION: Fix signal target list ; BINDING: meta-S (fset 'fix-signal-target-list "æâ( <=) ") (global-set-key "ó" 'fix-signal-target-list) ;;; ------------------------------------------------------------ ; WAS: ; .. <name>'('<literal-charactar>'..) ; IS: ; .. <name> ' ('<literal-charactar>'..) ; FUNCTION: fix-qualified-name ; - a temporary fix for current analyzer bug. ; BINDING: meta-G (fset 'fix-qualified-name "'(' ") (global-set-key "ç" 'fix-qualified-name) ;;; ------------------------------------------------------------ ; WAS: ; for <attrname> of <entityclass> <entityname> use <expr> ; ; IS: ; attribute <attrname> of <entityname>:<entityclass> is <expr> ; ; FUNCTION: fix attribute specification ; BINDING: meta-a (fset 'fix-attribute-specification "for ÿattribute ô : äis") (global-set-key "á" 'fix-attribute-specification) ;;; ------------------------------------------------------------ ; WAS: ; attribute <name> of <entityclass> is <typemark> ; ; IS: ; attribute <name> : <typemark> ; ; FUNCTION: ; BINDING: (fset 'fix-attribute-declaration "attribute (global-set-key "" 'fix-attribute-declaration) ;;; ------------------------------------------------------------ ; WAS: <original DoD/Intermetrics test header> ; IS: Added SCCS fields and modification notice ; indicating updating of test to 1076 std at mcc.com ; FUNCTION: Update DoD test headers for sccs, 1076 change ; BINDING: (fset 'update-DoD-header "---------- File: %P%Original file name: -- Version : %W% - last modified %E% -- sccsid: -- %G% %W% -- -- Description:“^$-- -- Modification History: -- --------------------------------------------------------------------------- -- Updated to 1076-1987 VHDL, checked w/Recognizer. (Steve)Grout@mcc.com 20jun88 -- *************************************************************************** -- Begin test: >>> ") (global-set-key "ïh" 'update-DoD-header) ;;; ------------------------------------------------------------ (fset 'update-DoD-header-next "k bCH eïh") (global-set-key "ïn" 'update-DoD-header-next) ;;; ------------------------------------------------------------ ;;; The following are ;;; gnuemacs commands to setup a bunch of windows after ;;; restarting X-emacs. Note that there are key-bound ;;; macros for both 80x50 and 120x50 sized windows, with ;;; the default being a 120x50 size. ;;;; ;;; To start up a set of test translation windows, ;;; do the following: ;;;; ;;; 1. meta-x load-file ~/.emacs ;;; 2. meta-x load-file $VHDL_EMACS/init_vhdl ;; which defines where 'va' is. ;;; 3. meta-x dired $VHDL_TEST/Analyzer/VHD/ ;;; 4. meta-x load-file translate-72-to-1076.el ;;; and then edit that file as well ;;; 5. Go to the VHD dired buffer and ;;; movethe cursor to the desired chapter and type: ;;; meta-c-shift-T to start a window setup. ;;; 6. Once the chapter 'dired' comes up, ;;; move the mouse to the first file of interest ;;; and edit (with 'E') ;;; 7. Move to *shell* window, and give the command: ;;; % cd <chapter-name> ;;; 8. Now give the 'reset-test-window by typing: ;;; meta-c-shift-R ;;; ;;; Everything should now be up and in the proper ;;; configuration with your mouse in the file buffer ;;; ready to start/continue editting. ;;; ;;; Install via: ;;; meta-X load-file ;;; setup-test-windows.el ;;; ;;; Defined Keys: ;;; meta-c-shift-T: Setup test windows - do after startup of 'X-emacs &' ;;; (Assumes you have ONLY the VHD buffer up so far.) ;;; meta-c-shift-R: restart test windows - puts windows in normal format ;;; (Assumes you have ALL the buffers up already, including ;;; translate-72-to-1076.el, <chapter-buffer>, and *shell*.) ;;; meta-c-shift-L: reload VHDL conversion gnuemacs macros. ;;; meta-c-shift-B: Test the VHDL file in the current buffer, assuming ;;; standard translate window setup. ;;; ;;; Author: JSGRout 5/13/88 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (fset 'setup-80x50-test-window ; this sets up an 80X50 window ; "1bVHD ¸2translate-72-to-1076.el o±°2bCH07 o²°2oøshell øload-file translate-72-to-1076.el ") (fset 'setup-120x50-test-window ; this sets up a 120X50 window "1bVHD ¶¹5øshell bVHD translate-72-to-1076.el ob*shell* ooo±°2obVHD e¶2o.vhd $ooo.vhdoøload-file translate-72-to-1076.el ") (global-set-key "”" 'setup-120x50-test-window); Meta-c-shift-T: setup test windows (fset 'restart-80x50-test-window ; this restarts a 80x50 window set "1btranslate-72-to-1076.el ¼¸2o±°2bCH o²°2bCH ob*shell* ") ;(fset 'restart-120x50-test-window ; this restarts a 120x50 window set ; "1btranslate-72-to-1076.el ¶¹5ob*shell* ¾o¼152obCH ¶2obCH ooo(fset 'restart-120x50-test-window ; this restarts a 120x50 window set "1btranslate-72-to-1076.el ¶¹5ob*shell* ¾o¼152·±obCH ¶2obCH ooo (global-set-key "’" 'restart-120x50-test-window); Meta-c-shift-R: restart test windows (fset 'reload-test-macros "øload-file /cadillac-usr3/cad/vhdl/test/Analyzer/VHD/translate-72-to-1076.el ") (global-set-key "Œ" 'reload-test-macros); meta-c-shift-L: reload test macros <div align="center"><br /><script type="text/javascript"><!-- google_ad_client = "pub-7293844627074885"; //468x60, Created at 07. 11. 25 google_ad_slot = "8619794253"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /> </div>