• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:unit +defs:list

50 ;;   - Sensitivity list updating
246 ;; E L4/C5: this library unit is inaccessible
342 Each list entry specifies the following items for a compiler:
365 Unit-to-file name mapping: mapping of library unit names to names of files
367 To string : string a name is mapped to (\"\\1\" inserts the unit name,
369 Case adjustment : adjust case of inserted unit names
378 specification of the unit-to-file name mapping). Alternatively, an
404 in the choice list of option `vhdl-compiler' by restarting Emacs."
406 (list :tag "Compiler" :indent 2
422 (list :tag "Error message" :indent 4
427 (list :tag "File message" :indent 4
433 (list :tag "To string" :indent 4
450 :type (let ((alist vhdl-compiler-alist) list)
452 (setq list (cons (list 'const (caar alist)) list))
454 (append '(choice) (nreverse list)))
549 specific file and directory names from the list of sources (e.g. CVS
568 NOTE: Reflect the new setting in the choice list of option `vhdl-project'
571 (list :tag "Project" :indent 2
582 (list :tag "Compiler" :indent 6
583 ,(let ((alist vhdl-compiler-alist) list)
585 (setq list (cons (list 'const (caar alist)) list))
588 (nreverse list)))
618 :type (let ((alist vhdl-project-alist) list)
620 (setq list (cons (list 'const (caar alist)) list))
623 (nreverse list)))
677 :type '(list (choice :tag "Basic standard"
704 (vhdl-custom-set variable value 'vhdl-abbrev-list-init))
712 (vhdl-custom-set variable value 'vhdl-abbrev-list-init))
720 (vhdl-custom-set variable value 'vhdl-abbrev-list-init))
728 (vhdl-custom-set variable value 'vhdl-abbrev-list-init))
736 (vhdl-custom-set variable value 'vhdl-abbrev-list-init))
809 When deriving a file name from a VHDL unit name, case can be changed as
848 (defcustom vhdl-insert-empty-lines 'unit
857 (const :tag "Design units only" unit)
863 (defcustom vhdl-argument-list-indent nil
873 (defcustom vhdl-association-list-with-formals t
877 If nil, only a list of actual parameters is entered."
1074 VHDL models (templates) can be specified by the user in this list. They can be
1101 :type '(repeat (list :tag "Model" :indent 2
1608 :type '(repeat (list :tag "Face" :indent 2
1689 :type '(list (choice :tag "Design units"
1693 (list :tag "Hierarchy" :indent 2
1703 (defcustom vhdl-speedbar-jump-to-unit t
1704 "*Non-nil means jump to the design unit code when opened in a buffer.
1908 "*Association list of syntactic element symbols and indentation offsets.
1909 As described below, each cons cell in this list has the form:
1914 context of the line by generating a list of symbols called syntactic
1915 elements. This list can contain more than one syntactic element and
1916 the global variable `vhdl-syntactic-context' contains the context list
1917 for the line being indented. Each element in this list is actually a
1923 After the syntactic context list for a line is generated, `vhdl-mode'
1925 syntactic element in the list. First, it compares the syntactic
1929 list is the absolute offset for line being indented.
1943 Here is the current list of valid syntactic element symbols:
1954 arglist-intro -- the first line in an argument list
1955 arglist-cont -- subsequent argument list lines when no
1958 arglist-cont-nonempty -- subsequent argument list lines when at
1961 arglist-close -- the solo close paren of an argument list
1997 case, the VALUE is a list containing elements of the form:
2112 (list dirpart)))
2215 (cons (list (nth 0 elem) (nth 1 elem) "" (nth 2 elem)
2238 (cons (list (nth 0 elem) (nth 1 elem) "" "make -f \\1"
2281 (setq vhdl-project-file-name (list vhdl-project-file-name))
2355 result overlay-all-list overlay-intangible-list overlay
2362 (while overlay-intangible-list
2363 (overlay-put (car overlay-intangible-list) 'intangible t)
2364 (setq overlay-intangible-list
2365 (cdr overlay-intangible-list)))))))
2370 (setq overlay-all-list (overlay-lists))
2371 (setq overlay-all-list
2372 (append (car overlay-all-list) (cdr overlay-all-list)))
2373 (while overlay-all-list
2374 (setq overlay (car overlay-all-list))
2376 (setq overlay-intangible-list
2377 (cons overlay overlay-intangible-list))
2379 (setq overlay-all-list (cdr overlay-all-list))))
2433 (jka-compr-compression-info-list nil))
2442 (let ((dir-list (list (file-name-as-directory directory)))
2443 file-list)
2444 (setq file-list (vhdl-directory-files directory t "\\w.*"))
2445 (while file-list
2446 (when (file-directory-p (car file-list))
2447 (setq dir-list (append dir-list (vhdl-get-subdirs (car file-list)))))
2448 (setq file-list (cdr file-list)))
2449 dir-list))
2457 (defun vhdl-delete (elt list)
2459 (setq list (cons nil list))
2460 (let ((list1 list))
2463 (when list
2465 (cdr list))
2507 (defun vhdl-menu-split (list title)
2510 (if (> (length list) vhdl-menu-max-size)
2511 (let ((remain list)
2531 list))
2686 (define-key vhdl-mode-map "\M-\C-u" 'vhdl-backward-up-list)
2744 (define-key vhdl-mode-map "\C-c\C-a\C-l" 'vhdl-align-list)
2750 (define-key vhdl-mode-map "\C-c\C-f\C-l" 'vhdl-fill-list)
2751 (define-key vhdl-mode-map "\C-c\C-f\C-f" 'vhdl-fill-list)
2771 (define-key vhdl-mode-map "\C-c\C-u\C-s" 'vhdl-update-sensitivity-list-process)
2772 (define-key vhdl-mode-map "\C-c\C-u\M-s" 'vhdl-update-sensitivity-list-buffer)
2885 "Buffer local variable containing syntactic analysis list.")
3033 abbrev-list keyword)
3037 (setq abbrev-list
3038 (cons (list keyword ""
3041 abbrev-list)))
3043 abbrev-list)))))
3178 (let ((project-alist vhdl-project-alist) menu-list name)
3181 (setq menu-list
3184 menu-list))
3186 (setq menu-list
3188 (sort menu-list
3190 (nreverse menu-list)))
3191 (vhdl-menu-split menu-list "Project"))
3217 (let ((comp-alist vhdl-compiler-alist) menu-list name)
3220 (setq menu-list
3223 menu-list))
3225 (setq menu-list (nreverse menu-list))
3226 (vhdl-menu-split menu-list "Compiler"))
3308 (list
3345 (let ((model-alist vhdl-model-alist) menu-list model)
3348 (setq menu-list
3354 menu-list))
3356 (setq menu-list (nreverse menu-list))
3357 (vhdl-menu-split menu-list "Model"))
3364 ["Paste As Entity" vhdl-port-paste-entity vhdl-port-list]
3365 ["Paste As Component" vhdl-port-paste-component vhdl-port-list]
3367 :keys "C-c C-p C-i" :active vhdl-port-list]
3368 ["Paste As Signals" vhdl-port-paste-signals vhdl-port-list]
3369 ["Paste As Constants" vhdl-port-paste-constants vhdl-port-list]
3370 ["Paste As Generic Map" vhdl-port-paste-generic-map vhdl-port-list]
3371 ["Paste As Initializations" vhdl-port-paste-initializations vhdl-port-list]
3373 ["Paste As Testbench" vhdl-port-paste-testbench vhdl-port-list]
3376 :style toggle :selected vhdl-port-flattened :active vhdl-port-list]
3378 :style toggle :selected vhdl-port-reversed-direction :active vhdl-port-list])
3382 ["Place Component" vhdl-compose-place-component vhdl-port-list]
3390 ["Paste As Declaration" vhdl-subprog-paste-declaration vhdl-subprog-list]
3391 ["Paste As Body" vhdl-subprog-paste-body vhdl-subprog-list]
3392 ["Paste As Call" vhdl-subprog-paste-call vhdl-subprog-list]
3395 :style toggle :selected vhdl-subprog-flattened :active vhdl-subprog-list])
3440 ["List" vhdl-align-list t]
3449 ["List" vhdl-fill-list t]
3467 ["Sensitivity List" vhdl-update-sensitivity-list-process t]
3468 ["Sensitivity List Buffer" vhdl-update-sensitivity-list-buffer t])
3514 (let ((project-alist vhdl-project-alist) menu-list name)
3517 (setq menu-list
3522 menu-list))
3524 (setq menu-list (nreverse menu-list))
3525 (vhdl-menu-split menu-list "Project")))
3544 (let ((comp-alist vhdl-compiler-alist) menu-list name)
3547 (setq menu-list
3550 menu-list))
3552 (setq menu-list (nreverse menu-list))
3553 (vhdl-menu-split menu-list "Compler")))
3567 (list '87 (cadr vhdl-standard)))
3572 (list '93 (cadr vhdl-standard)))
3578 'vhdl-standard (list (car vhdl-standard)
3586 'vhdl-standard (list (car vhdl-standard)
3676 (customize-set-variable 'vhdl-insert-empty-lines 'unit)
3677 :style radio :selected (eq 'unit vhdl-insert-empty-lines)]
3682 (customize-set-variable 'vhdl-argument-list-indent
3683 (not vhdl-argument-list-indent))
3684 :style toggle :selected vhdl-argument-list-indent]
3686 (customize-set-variable 'vhdl-association-list-with-formals
3687 (not vhdl-association-list-with-formals))
3688 :style toggle :selected vhdl-association-list-with-formals]
3942 (customize-set-variable 'vhdl-speedbar-jump-to-unit
3943 (not vhdl-speedbar-jump-to-unit))
3944 :style toggle :selected vhdl-speedbar-jump-to-unit]
4031 (defvar vhdl-mode-menu-list (vhdl-create-mode-menu)
4037 (easy-menu-remove vhdl-mode-menu-list) ; for XEmacs
4038 (setq vhdl-mode-menu-list (vhdl-create-mode-menu))
4039 (easy-menu-add vhdl-mode-menu-list) ; for XEmacs
4041 "Menu keymap for VHDL Mode." vhdl-mode-menu-list))
4108 "Get list of VHDL source files in DIRECTORY or current directory."
4131 (file-list (vhdl-get-source-files))
4132 menu-list found)
4133 ;; Create list for menu
4135 (while file-list
4137 (setq menu-list (cons (vector (car file-list)
4138 (list 'find-file (car file-list)) t)
4139 menu-list))
4140 (setq file-list (cdr file-list)))
4141 (setq menu-list (vhdl-menu-split menu-list "Sources"))
4142 (when found (setq menu-list (cons "--" menu-list)))
4143 (setq menu-list (cons ["*Rescan*" vhdl-add-source-files-menu t] menu-list))
4144 (setq menu-list (cons "Sources" menu-list))
4146 (easy-menu-add menu-list)
4148 "VHDL source files menu" menu-list))
4260 according to option `vhdl-argument-list-indent'.
4274 indent. `C-c C-a C-l' aligns all lines belonging to a list enclosed by
4275 a pair of parentheses (e.g. port clause/map, argument list), and `C-c
4276 C-a C-d' all lines within the declarative part of a design unit. `C-c
4298 lines are maximally filled (block filling). `C-c C-f C-f' fills a list
4321 `vhdl-association-list-with-formals'. To include comments in pasting,
4340 association list with formals).
4392 multiple declarations of the same unit or missing primary units that are
4460 routine (`C-c M-k'). The library unit dependency information is
4474 for each primary library unit which allows selective compilation of this
4475 unit, its secondary units and its subhierarchy (example: compilation of
4589 - Sensitivity List: `C-c C-u C-s' updates the sensitivity list of the
4666 The `vhdl-mode-announce' mailing list informs about new VHDL Mode releases.
4667 The `vhdl-mode-victims' mailing list informs about new VHDL Mode beta
4729 (list
4751 (easy-menu-add vhdl-mode-menu-list) ; for XEmacs
4753 "Menu keymap for VHDL Mode." vhdl-mode-menu-list)
5103 (vhdl-abbrev-list-init))
5108 (defvar vhdl-abbrev-list nil
5111 (defun vhdl-abbrev-list-init ()
5112 (setq vhdl-abbrev-list
5114 (list vhdl-upper-case-keywords) vhdl-keywords
5115 (list vhdl-upper-case-types) vhdl-types
5116 (list vhdl-upper-case-attributes) vhdl-attributes
5117 (list vhdl-upper-case-enum-values) vhdl-enum-values
5118 (list vhdl-upper-case-constants) vhdl-constants
5119 (list nil) vhdl-functions
5120 (list nil) vhdl-packages)))
5202 "A simple macro to append the syntax in SYMBOL to the syntax list.
5208 "A simple macro to return check the syntax list.
5257 ;; on the syntactic analysis list for the current
5265 (list langelem offset current-prefix-arg)))
5292 (interactive (list (completing-read "Use which VHDL indentation style? "
5626 ;; procedure interface list, and is harmless in other
5628 ;; following search list so that we don't run into
5629 ;; semicolons in the function interface list.
6149 (defun vhdl-backward-up-list (&optional count limit)
6186 "Move backward to the beginning of a VHDL library unit.
6344 (backward-up-list 1)
6426 (defun vhdl-get-library-unit (bod placeholder)
6427 "If there is an enclosing library unit at BOD, with its \"begin\"
6428 keyword at PLACEHOLDER, then return the library unit type."
6483 ;; front of list
6579 placeholder lim library-unit
6586 ;; Move to the start of the previous library unit, and
6594 ;; If there is a previous library unit, and we are enclosed by
6597 (setq library-unit (vhdl-get-library-unit lim placeholder))
6598 (vhdl-add-syntax library-unit lim))
6688 ;; either in a subprogram argument (interface) list, or a
6698 ;; argument list.
6878 (backward-up-list 1)
6914 (backward-up-list 1)
7117 "Indent each line of the list starting just after point.
7147 ;; remove the library unit symbols
7154 (setq expurgated (append expurgated (list elt))))))
7226 (defun vhdl-do-list (function &optional spacing)
7227 "Apply FUNCTION to the lines of a list surrounded by a balanced group of
7238 (forward-list)
7246 (error "ERROR: Not within a list enclosed by a pair of parentheses"))))
7272 (defun vhdl-align-region-1 (begin end &optional spacing alignment-list indent)
7274 lines. The definition of `alignment-list' determines the matching
7279 (setq alignment-list (or alignment-list vhdl-align-alist))
7290 (let ((copy (copy-alist alignment-list)))
7415 ;; is argument list opening?
7418 ;; determine region for argument list
7448 (defun vhdl-align-list (&optional spacing)
7449 "Align the lines of a list surrounded by a balanced group of parentheses."
7451 (vhdl-do-list 'vhdl-align-region-groups spacing))
7459 "Align the lines within the declarative part of a design unit."
7472 (error "ERROR: Not within the declarative part of a design unit"))))
7487 comment-list start-list tmp-list start length
7502 (setq comment-list (cons (cons start length) comment-list)))
7504 (setq comment-list
7505 (sort comment-list (function (lambda (a b) (> (car a) (car b))))))
7507 (setq start-list (list (caar comment-list)))
7508 (setq comment-list (cdr comment-list))
7509 (while comment-list
7510 (unless (or (= (caar comment-list) (car start-list))
7511 (<= (+ (car start-list) (cdar comment-list))
7513 (setq start-list (cons (caar comment-list) start-list)))
7514 (setq comment-list (cdr comment-list)))
7534 (setq tmp-list start-list)
7551 (while (and tmp-list (< (car tmp-list) start))
7552 (setq tmp-list (cdr tmp-list)))
7553 (car tmp-list))))
7728 (defun vhdl-fill-list ()
7729 "Fill the lines of a list surrounded by a balanced group of parentheses."
7731 (vhdl-do-list 'vhdl-fill-region))
7744 ;; Sensitivity list update
7747 ;; - no sensitivity list is generated for processes with wait statements
7750 ;; 2. scan for all signals already in the sensitivity list (in order to catch
7752 ;; 3. signals from 1. and 2. form the list of visible signals
7757 ;; 6. replace sensitivity list by list of signals from 5.
7759 (defun vhdl-update-sensitivity-list-process ()
7760 "Update sensitivity list of current process."
7770 (message "Updating sensitivity list...")
7771 (vhdl-update-sensitivity-list)
7772 (message "Updating sensitivity list...done")))))
7774 (defun vhdl-update-sensitivity-list-buffer ()
7775 "Update sensitivity list of all processes in current buffer."
7783 (condition-case nil (vhdl-update-sensitivity-list) (error "")))
7786 (defun vhdl-update-sensitivity-list ()
7787 "Update sensitivity list."
7791 seq-region-list)
7793 ;; search for wait statement (no sensitivity list allowed)
7796 (error "ERROR: Process with wait statement, sensitivity list not generated"))
7797 ;; combinational process (update sensitivity list)
7801 ((visible-list (vhdl-get-visible-signals))
7803 (scan-regions-list
7826 ;; parameter list of procedure call
7831 name read-list sens-list signal-list
7833 ;; scan for signals in old sensitivity list
7844 (setq sens-list
7845 (cons (downcase (match-string 0)) sens-list))
7847 (setq signal-list (append visible-list sens-list))
7856 (setq seq-region-list (cons (cons end (point)) seq-region-list))
7859 (while scan-regions-list
7861 (while (and (setq beg (eval (nth 0 (car scan-regions-list))))
7862 (setq end (eval (nth 1 (car scan-regions-list)))))
7865 (and seq-region-list
7866 (let ((tmp-list seq-region-list))
7867 (while (and tmp-list
7868 (< (point) (caar tmp-list)))
7869 (setq tmp-list (cdr tmp-list)))
7870 (and tmp-list (< (point) (cdar tmp-list))))))
7877 (member (downcase name) signal-list))
7878 (unless (member-ignore-case name read-list)
7879 (setq read-list (cons name read-list))))
7881 (setq scan-regions-list (cdr scan-regions-list)))
7882 ;; update sensitivity list
7886 (when read-list
7888 (setq read-list (sort read-list 'string<))
7889 (when read-list
7891 (insert (car read-list))
7892 (setq read-list (cdr read-list))
7893 (while read-list
7895 (if (<= (+ (current-column) (length (car read-list)) 2)
7899 (insert (car read-list))
7900 (setq read-list (cdr read-list)))))))))
7904 (let (beg end signal-list entity-name file-name)
7936 (setq signal-list
7937 (cons (downcase (match-string 1)) signal-list))
7955 (setq signal-list
7956 (cons (downcase (match-string 1)) signal-list))
7960 (member (downcase (match-string 2)) signal-list))
7961 (setq signal-list
7962 (cons (downcase (match-string 1)) signal-list))
7981 (setq signal-list
7982 (cons (downcase (match-string 1)) signal-list))
7986 (member (downcase (match-string 2)) signal-list))
7987 (setq signal-list
7988 (cons (downcase (match-string 1)) signal-list))
7991 signal-list)))
8127 (list (vhdl-character-to-event next-input))))))
8129 (list (vhdl-character-to-event next-input)))
8245 (memq vhdl-insert-empty-lines '(unit all))))))
8359 (if (vhdl-template-field "[sensitivity list]" nil t)
8444 (vhdl-template-generic-list t t)
8447 (vhdl-template-port-list t)
8456 unit position)
8462 (setq unit (vhdl-template-field
8464 (setq unit (upcase (or unit "")))
8465 (cond ((equal unit "ENTITY")
8472 ((equal unit "CONFIGURATION")
8523 a configuration declaration if not within a design unit."
8607 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
8611 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
8623 (in-arglist (vhdl-in-argument-list-p)))
8715 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
8717 (when (vhdl-template-generic-list t)
8718 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")))
8721 (when (vhdl-template-port-list t)
8722 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")))
8838 (vhdl-template-argument-list t)
8879 (vhdl-template-generic-list nil))
8886 (t (vhdl-template-generic-list nil t))))))
8904 (vhdl-template-field "constituent list" ");")
8914 (vhdl-template-field "entity class list" ");")
9048 "Insert a map specification with association list."
9053 (if (not vhdl-association-list-with-formals)
9055 (concat (and optional "[") "association list" (and optional "]"))
9061 (if vhdl-argument-list-indent
9184 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
9188 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
9215 (vhdl-template-port-list nil))
9222 (t (vhdl-template-port-list nil))))))
9253 (vhdl-template-argument-list)
9299 (vhdl-template-field "[sensitivity list]" ")" t))
9359 (if (vhdl-in-argument-list-p)
9510 (in-arglist (vhdl-in-argument-list-p)))
9643 (in-arglist (vhdl-in-argument-list-p)))
9672 "[ON sensitivity list] [UNTIL condition] [FOR time expression]"
10061 (list (vhdl-character-to-event next-input)))))) ; pushback the char
10206 (defun vhdl-template-argument-list (&optional is-function)
10207 "Read from user a procedure or function argument list."
10213 (unless vhdl-argument-list-indent
10243 (defun vhdl-template-generic-list (optional &optional no-value)
10244 "Read from user a generic spec argument list."
10249 (unless vhdl-argument-list-indent
10263 (unless vhdl-argument-list-indent
10293 (defun vhdl-template-port-list (optional)
10294 "Read from user a port spec argument list."
10299 (unless vhdl-argument-list-indent
10315 (unless vhdl-argument-list-indent
10577 (defun vhdl-in-argument-list-p ()
10578 "Check if within an argument list."
10618 (list (vhdl-character-to-event ?\177))))))))
10743 ;; Template insertion from completion list
10748 (list (let ((completion-ignore-case t))
10757 (list (let ((completion-ignore-case t))
10766 (list (let ((completion-ignore-case t))
10786 (list (completing-read "Model name: " vhdl-model-alist))))
10867 (defvar vhdl-port-list nil
10869 ;; structure: (parenthesised expression means list of such entries)
10926 "Flatten port list so that only one generic/port exists per line.
10930 (if (not vhdl-port-list)
10933 (let ((new-vhdl-port-list (list (car vhdl-port-list)))
10934 (old-vhdl-port-list (cdr vhdl-port-list))
10935 old-port-list new-port-list old-port new-port names)
10936 ;; traverse port list and flatten entries
10937 (while (cdr old-vhdl-port-list)
10938 (setq old-port-list (car old-vhdl-port-list))
10939 (setq new-port-list nil)
10940 (while old-port-list
10941 (setq old-port (car old-port-list))
10944 (setq new-port (cons (if as-alist (car names) (list (car names)))
10946 (setq new-port-list (append new-port-list (list new-port)))
10948 (setq old-port-list (cdr old-port-list)))
10949 (setq old-vhdl-port-list (cdr old-vhdl-port-list))
10950 (setq new-vhdl-port-list (append new-vhdl-port-list
10951 (list new-port-list))))
10952 (setq vhdl-port-list
10953 (append new-vhdl-port-list (list old-vhdl-port-list))
10965 (if (not vhdl-port-list)
10968 (let ((port-list (nth 2 vhdl-port-list))
10970 ;; traverse port list and reverse directions
10971 (while port-list
10972 (setq port-dir-car (cddr (car port-list))
10978 (setq port-list (cdr port-list)))
10986 (let (parse-error end-of-list
10987 decl-type name generic-list port-list context-clause
11009 (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t))
11010 (while (not end-of-list)
11013 (setq names (list (match-string-no-properties 1)))
11016 (append names (list (match-string-no-properties 1)))))
11058 (setq end-of-list (vhdl-parse-string ")" t))
11064 ;; save everything in list
11065 (setq generic-list (append generic-list
11066 (list (list names type init
11074 (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t))
11075 (while (not end-of-list)
11082 (setq names (list (match-string-no-properties 1)))
11084 (setq names (append names (list (match-string-no-properties 1)))))
11108 (setq end-of-list (vhdl-parse-string ")" t))
11114 ;; save everything in list
11115 (setq port-list (append port-list
11116 (list (list names object direct type
11128 ; (list (cons (vhdl-work-library)
11135 (setq vhdl-port-list (list name generic-list port-list context-clause)
11142 (clause-list (nth 3 vhdl-port-list))
11144 (while clause-list
11145 (setq clause (car clause-list))
11154 (setq clause-list (cdr clause-list)))))
11159 (generic-list (nth 1 vhdl-port-list))
11160 list-margin start names generic)
11162 (when generic-list
11165 (unless vhdl-argument-list-indent
11167 (setq list-margin (current-column))
11168 (while generic-list
11169 (setq generic (car generic-list))
11172 (vhdl-paste-group-comment (nth 4 generic) list-margin))
11184 (unless (cdr generic-list) (insert ")"))
11189 (setq generic-list (cdr generic-list))
11190 (when generic-list (insert "\n") (indent-to list-margin)))
11197 (port-list (nth 2 vhdl-port-list))
11198 list-margin start names port)
11200 (when port-list
11203 (unless vhdl-argument-list-indent
11205 (setq list-margin (current-column))
11206 (while port-list
11207 (setq port (car port-list))
11210 (vhdl-paste-group-comment (nth 5 port) list-margin))
11224 (unless (cdr port-list) (insert ")"))
11229 (setq port-list (cdr port-list))
11230 (when port-list (insert "\n") (indent-to list-margin)))
11238 (name (nth 0 vhdl-port-list)))
11244 (when (nth 1 vhdl-port-list)
11246 (when (and (memq vhdl-insert-empty-lines '(unit all)) (eq kind 'entity))
11250 (when (nth 2 vhdl-port-list)
11252 (when (and (memq vhdl-insert-empty-lines '(unit all))
11258 (when (and (memq vhdl-insert-empty-lines '(unit all)) (eq kind 'entity))
11273 (if (not vhdl-port-list)
11275 (message "Pasting port as entity \"%s\"..." (car vhdl-port-list))
11277 (message "Pasting port as entity \"%s\"...done" (car vhdl-port-list))))
11282 (if (not vhdl-port-list)
11284 (message "Pasting port as component \"%s\"..." (car vhdl-port-list))
11286 (message "Pasting port as component \"%s\"...done" (car vhdl-port-list))))
11293 list-margin start generic
11294 (generic-list (nth 1 vhdl-port-list)))
11295 (when generic-list
11298 (if (not vhdl-association-list-with-formals)
11299 ;; paste list of actual generics
11300 (while generic-list
11302 (car (nth 0 (car generic-list)))
11303 (or (nth 2 (car generic-list)) " ")))
11304 (setq generic-list (cdr generic-list))
11305 (insert (if generic-list ", " ")"))
11306 (when (and (not generic-list) secondary
11307 (null (nth 2 vhdl-port-list)))
11309 (unless vhdl-argument-list-indent
11311 (setq list-margin (current-column))
11312 (while generic-list
11313 (setq generic (car generic-list))
11316 (vhdl-paste-group-comment (nth 4 generic) list-margin))
11322 (setq generic-list (cdr generic-list))
11323 (insert (if generic-list "," ")"))
11324 (when (and (not generic-list) secondary
11325 (null (nth 2 vhdl-port-list)))
11335 (when generic-list (insert "\n") (indent-to list-margin)))
11343 list-margin start port
11344 (port-list (nth 2 vhdl-port-list)))
11345 (when port-list
11348 (if (not vhdl-association-list-with-formals)
11349 ;; paste list of actual ports
11350 (while port-list
11352 (car (nth 0 (car port-list)))))
11353 (setq port-list (cdr port-list))
11354 (insert (if port-list ", " ")")))
11355 (unless vhdl-argument-list-indent
11357 (setq list-margin (current-column))
11358 (while port-list
11359 (setq port (car port-list))
11362 (vhdl-paste-group-comment (nth 5 port) list-margin))
11367 (setq port-list (cdr port-list))
11368 (insert (if port-list "," ");"))
11385 (when port-list (insert "\n") (indent-to list-margin)))
11393 (if (not vhdl-port-list)
11395 (let ((orig-vhdl-port-list vhdl-port-list))
11396 ;; flatten local copy of port list (must be flat for port mapping)
11410 (nth 0 vhdl-port-list)) n))
11416 (nth 0 vhdl-port-list)))))
11425 (insert (nth 0 vhdl-port-list))
11427 (insert (vhdl-work-library) "." (nth 0 vhdl-port-list)))
11428 (when (nth 1 vhdl-port-list)
11431 (when (nth 2 vhdl-port-list)
11434 (unless (or (nth 1 vhdl-port-list) (nth 2 vhdl-port-list))
11437 (setq vhdl-port-list orig-vhdl-port-list))))
11442 (if (not vhdl-port-list)
11444 (let ((orig-vhdl-port-list vhdl-port-list))
11446 ;; flatten local copy of port list (must be flat for constant initial.)
11451 (generic-list (nth 1 vhdl-port-list)))
11452 (when generic-list
11454 (while generic-list
11455 (setq generic (car generic-list))
11473 (setq generic-list (cdr generic-list))
11474 (when generic-list (insert "\n") (indent-to margin))))
11475 ;; align signal list
11479 (setq vhdl-port-list orig-vhdl-port-list))))
11484 (if (not vhdl-port-list)
11490 (port-list (nth 2 vhdl-port-list)))
11491 (when port-list
11493 (while port-list
11494 (setq port (car port-list))
11524 (setq port-list (cdr port-list))
11525 (when port-list (insert "\n") (indent-to margin)))
11526 ;; align signal list
11533 (if (not vhdl-port-list)
11535 (let ((orig-vhdl-port-list vhdl-port-list))
11537 ;; flatten local copy of port list (must be flat for signal initial.)
11542 (port-list (nth 2 vhdl-port-list)))
11543 (when port-list
11545 (while port-list
11546 (setq port (car port-list))
11554 (setq port-list (cdr port-list))
11555 (when (and port-list
11556 (equal "IN" (upcase (nth 2 (car port-list)))))
11558 ;; align signal list
11561 (setq vhdl-port-list orig-vhdl-port-list))))
11566 (if (not vhdl-port-list)
11570 (nth 0 vhdl-port-list)))
11596 (nth 0 vhdl-port-list) "\""))
11607 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
11619 (nth 0 vhdl-port-list))))
11640 (nth 0 vhdl-port-list) "\""))
11655 (when (nth 1 vhdl-port-list)
11690 (vhdl-replace-string vhdl-testbench-dut-name (nth 0 vhdl-port-list)) t)
11715 (defvar vhdl-subprog-list nil
11717 ;; structure: (parenthesised expression means list of such entries)
11726 "Flatten interface list so that only one parameter exists per line."
11728 (if (not vhdl-subprog-list)
11731 (let ((old-subprog-list (nth 2 vhdl-subprog-list))
11732 new-subprog-list old-subprog new-subprog names)
11733 ;; traverse parameter list and flatten entries
11734 (while old-subprog-list
11735 (setq old-subprog (car old-subprog-list))
11738 (setq new-subprog (cons (list (car names)) (cdr old-subprog)))
11739 (setq new-subprog-list (append new-subprog-list (list new-subprog)))
11741 (setq old-subprog-list (cdr old-subprog-list)))
11742 (setq vhdl-subprog-list
11743 (list (nth 0 vhdl-subprog-list) (nth 1 vhdl-subprog-list)
11744 new-subprog-list (nth 3 vhdl-subprog-list)
11745 (nth 4 vhdl-subprog-list) (nth 5 vhdl-subprog-list))
11753 (let (parse-error pos end-of-list
11754 name kind param-list object names direct type init
11773 (setq end-of-list (not (match-string 7)))
11775 ;; parse parameter list
11777 (setq end-of-list (or end-of-list
11779 (while (not end-of-list)
11786 (setq names (list (match-string-no-properties 1)))
11788 (setq names (append names (list (match-string-no-properties 1)))))
11835 (setq end-of-list (vhdl-parse-string ")\\s-*" t))
11861 ;; save everything in list
11862 (setq param-list (append param-list
11863 (list (list names object direct type init
11872 (setq vhdl-subprog-list
11873 (list name kind param-list return-type return-comment
11881 (param-list (nth 2 vhdl-subprog-list))
11882 list-margin start names param)
11885 (if (eq (nth 1 vhdl-subprog-list) 'procedure) "PROCEDURE " "FUNCTION "))
11886 (insert (nth 0 vhdl-subprog-list))
11887 (if (not param-list)
11890 ;; paste parameter list
11892 (unless vhdl-argument-list-indent
11894 (setq list-margin (current-column))
11895 (while param-list
11896 (setq param (car param-list))
11898 (when (memq vhdl-include-group-comments (list kind 'always))
11899 (vhdl-paste-group-comment (nth 6 param) list-margin))
11916 (if (cdr param-list)
11919 (when (null (nth 3 vhdl-subprog-list))
11924 (setq param-list (cdr param-list))
11925 (when param-list (insert "\n") (indent-to list-margin)))
11926 (when (nth 3 vhdl-subprog-list)
11927 (insert "\n") (indent-to list-margin)
11929 (when (memq vhdl-include-group-comments (list kind 'always))
11930 (vhdl-paste-group-comment (nth 5 vhdl-subprog-list) list-margin))
11932 (insert "return " (nth 3 vhdl-subprog-list))
11934 (when (and vhdl-include-port-comments (nth 4 vhdl-subprog-list))
11935 (vhdl-comment-insert-inline (nth 4 vhdl-subprog-list) t)))
11936 ;; align parameter list
11943 (if (eq (nth 1 vhdl-subprog-list) 'procedure) "PROCEDURE" "FUNCTION"))
11944 (nth 0 vhdl-subprog-list) margin))))
11949 (if (not vhdl-subprog-list)
11952 (car vhdl-subprog-list))
11956 (car vhdl-subprog-list))))
11961 (if (not vhdl-subprog-list)
11964 (car vhdl-subprog-list))
11968 (car vhdl-subprog-list))))
11973 (if (not vhdl-subprog-list)
11975 (let ((orig-vhdl-subprog-list vhdl-subprog-list)
11976 param-list margin list-margin param start)
11977 ;; flatten local copy of interface list (must be flat for parameter mapping)
11979 (setq param-list (nth 2 vhdl-subprog-list))
11983 (car vhdl-subprog-list))
11985 (insert (nth 0 vhdl-subprog-list))
11986 (if (not param-list)
11989 ;; paste parameter list
11991 (unless vhdl-argument-list-indent
11993 (setq list-margin (current-column))
11994 (while param-list
11995 (setq param (car param-list))
11998 (vhdl-paste-group-comment (nth 6 param) list-margin))
12001 (setq param-list (cdr param-list))
12002 (insert (if param-list "," ");"))
12006 (when param-list (insert "\n") (indent-to list-margin)))
12007 ;; align parameter list
12011 (car vhdl-subprog-list))
12012 (setq vhdl-subprog-list orig-vhdl-subprog-list))))
12025 "Try expanding abbreviations from `vhdl-abbrev-list'."
12028 (setq he-expand-list
12029 (let ((abbrev-list vhdl-abbrev-list)
12030 (sel-abbrev-list '()))
12031 (while abbrev-list
12032 (when (or (not (stringp (car abbrev-list)))
12034 (concat "^" he-search-string) (car abbrev-list)))
12035 (setq sel-abbrev-list
12036 (cons (car abbrev-list) sel-abbrev-list)))
12037 (setq abbrev-list (cdr abbrev-list)))
12038 (nreverse sel-abbrev-list))))
12039 (while (and he-expand-list
12040 (or (not (stringp (car he-expand-list)))
12041 (he-string-member (car he-expand-list) he-tried-table t)))
12042 ; (equal (car he-expand-list) he-search-string)))
12043 (unless (stringp (car he-expand-list))
12044 (setq vhdl-expand-upper-case (car he-expand-list)))
12045 (setq he-expand-list (cdr he-expand-list)))
12046 (if (null he-expand-list)
12051 (upcase (car he-expand-list))
12052 (car he-expand-list))
12054 (setq he-expand-list (cdr he-expand-list))
12057 (defun vhdl-he-list-beg ()
12062 (progn (backward-up-list 1)
12067 ;; override `he-list-beg' from `hippie-exp'
12069 (defalias 'he-list-beg 'vhdl-he-list-beg))
12081 '(try-expand-list
12082 try-expand-list-all-buffers)))
12191 (hippie-expand-try-functions-list
12318 (list (let ((completion-ignore-case t))
12350 (list (read-file-name
12384 (list (read-file-name
12411 (list (cons new-name project-entry))))
12416 (let ((file-name-list vhdl-project-file-name)
12417 file-list list-length)
12418 (while file-name-list
12419 (setq file-list
12420 (append file-list
12424 (cons "\\(.*\\) \\(.*\\)" (car file-name-list))
12426 (setq list-length (or list-length (length file-list)))
12427 (setq file-name-list (cdr file-name-list)))
12428 (while file-list
12429 (vhdl-import-project (expand-file-name (car file-list)) t
12430 (not (> list-length 0)))
12431 (setq list-length (1- list-length))
12432 (setq file-list (cdr file-list)))))
12542 (cons (list 'vhdl-mode vhdl-hs-start-regexp nil "--\\( \\|$\\)"
12587 (set-match-data (list start end))
12627 (list
12629 (list
12638 (list
12643 (list
12654 (list
12660 ;; highlight label and instantiated unit of component instantiations
12661 (list
12671 (list
12683 (list
12689 (list
12695 (list
12702 (list "^\\s-*library\\>"
12706 (list
12714 (list
12720 (list
12726 (list "\\(:[^=]\\)"
12742 (list "\\(=>\\)"
12755 (list "\\<\\(alias\\|for\\|group\\|quantity\\)\\s-+\\w+\\s-+\\(across\\|in\\|is\\)\\>"
12907 (list (list (concat "\\(^\\|[ \t(.']\\)\\(<"
12910 (list (concat "--\\s-*"
12914 (list "^#[ \t]*\\(\\w+\\)\\([ \t]+\\(\\w+\\)\\)?"
12920 (list
12921 (list (concat "'" vhdl-attributes-regexp)
12923 (list vhdl-types-regexp 1 'font-lock-type-face)
12924 (list vhdl-functions-regexp 1 'vhdl-font-lock-function-face)
12925 (list vhdl-packages-regexp 1 'vhdl-font-lock-function-face)
12926 (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face)
12927 (list vhdl-keywords-regexp 1 'font-lock-keyword-face)))
12943 (list (list vhdl-reserved-words-regexp 1
12963 (list
13032 ;; structure: (parenthesised expression means list of such entries)
13043 ;; structure: (parenthesised expression means list of such entries)
13052 ;; structure: (parenthesised expression means list of such entries)
13064 ;; structure: (parenthesised expression means list of such entries)
13069 ;; structure: (parenthesised expression means list of such entries)
13071 ;; (file-name (ent-list) (arch-list) (arch-ent-list) (conf-list)
13072 ;; (pack-list) (pack-body-list) (inst-list) (inst-ent-list))
13076 ;; structure: (parenthesised expression means list of such entries)
13079 (defvar vhdl-speedbar-shown-unit-alist nil
13083 (defvar vhdl-speedbar-shown-project-list nil
13086 (defvar vhdl-updated-project-list nil
13089 (defvar vhdl-modified-file-list nil
13099 (defun vhdl-get-end-of-unit ()
13100 "Return position of end of current unit."
13121 "Scan the context clause that preceeds a design unit."
13142 (file-list
13144 (list name)
13155 ent-alist conf-alist pack-alist ent-inst-list file-alist
13156 tmp-list tmp-entry no-files files-exist big-files)
13161 ent-inst-list (car (aget vhdl-ent-inst-alist key t))
13163 (when (and (not is-directory) (null file-list))
13165 (setq files-exist file-list)
13166 (when file-list
13167 (setq no-files (length file-list))
13173 file-tmp-list)
13174 (while file-list
13175 (unless (string-match file-exclude-regexp (car file-list))
13176 (setq file-tmp-list (cons (car file-list) file-tmp-list)))
13177 (setq file-list (cdr file-list)))
13178 (setq file-list (nreverse file-tmp-list))))
13180 (while file-list
13185 (/ (* 100 (- no-files (length file-list))) no-files) "%"))
13186 (let ((file-name (abbreviate-file-name (car file-list)))
13187 ent-list arch-list arch-ent-list conf-list
13188 pack-list pack-body-list inst-list inst-ent-list)
13211 (setq ent-list (cons ent-key ent-list))
13213 (list ent-name file-name (vhdl-current-line)
13232 (setq arch-list (cons arch-key arch-list)
13233 arch-ent-list (cons ent-key arch-ent-list))
13235 (list arch-name file-name (vhdl-current-line) nil
13238 (list (or (nth 0 ent-entry) ent-name)
13252 (end-of-unit (vhdl-get-end-of-unit))
13253 arch-key comp-conf-list inst-key-list
13263 (setq conf-list (cons conf-key conf-list))
13265 (while (re-search-forward "^[ \t]*for[ \t\n]+\\(\\w+\\([ \t\n]*,[ \t\n]*\\w+\\)*\\)[ \t\n]*:[ \t\n]*\\(\\w+\\)[ \t\n]+" end-of-unit t)
13267 inst-key-list (split-string
13280 (while inst-key-list
13281 (setq comp-conf-list
13282 (cons (list (car inst-key-list)
13286 comp-conf-list))
13287 (setq inst-key-list (cdr inst-key-list)))))
13289 (list conf-name file-name conf-line ent-key
13290 arch-key comp-conf-list lib-alist)))))
13299 (end-of-unit (vhdl-get-end-of-unit))
13311 (while (re-search-forward "^[ \t]*\\(component\\|function\\|procedure\\)[ \t\n]+\\(\\w+\\|\".*\"\\)" end-of-unit t)
13315 (cons (list (downcase comp-name) comp-name
13320 (cons (list (downcase func-name) func-name
13326 (setq pack-body-list (cons pack-key pack-body-list))
13327 (setq pack-list (cons pack-key pack-list)))
13331 (list (or (nth 0 pack-entry) pack-name)
13336 (list pack-name file-name pack-line
13355 (beg-of-unit (point))
13356 (end-of-unit (vhdl-get-end-of-unit))
13366 "\\(^[ \t]*end[ \t\n]+\\(generate\\|block\\)\\>\\)") end-of-unit t)
13396 (setq inst-list (cons inst-key inst-list)
13397 inst-ent-list
13398 (cons inst-ent-key inst-ent-list))
13402 (list (list inst-key inst-name file-name
13408 (goto-char beg-of-unit)
13411 "use[ \t\n]+\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?") end-of-unit t)
13421 (inst-key-list
13427 (when (and (or (equal "all" (car inst-key-list))
13429 inst-key-list))
13435 (setq inst-ent-list
13438 (nth 5 inst-entry) inst-ent-list)))
13440 (list (nth 0 inst-entry) (nth 1 inst-entry)
13450 (list (nth 0 arch-entry) (nth 1 arch-entry)
13454 (list (nth 0 ent-entry) (nth 1 ent-entry)
13461 (goto-char end-of-unit))))
13464 (list ent-list arch-list arch-ent-list conf-list
13465 pack-list pack-body-list inst-list inst-ent-list))
13466 (setq ent-inst-list (append inst-ent-list ent-inst-list))))))
13467 (setq file-list (cdr file-list))))
13472 (setq tmp-list ent-alist)
13473 (while tmp-list
13474 (when (null (nth 2 (car tmp-list)))
13475 (setq tmp-entry (car (nth 4 (car tmp-list))))
13478 (nth 1 tmp-entry) (nth 1 (car tmp-list)) (nth 2 tmp-entry)
13480 (setq tmp-list (cdr tmp-list)))
13482 (setq tmp-list conf-alist)
13483 (while tmp-list
13484 (if (setq tmp-entry (aget ent-alist (nth 4 (car tmp-list)) t))
13485 (unless (aget (nth 3 tmp-entry) (nth 5 (car tmp-list)) t)
13486 (setq tmp-entry (car tmp-list))
13491 (setq tmp-entry (car tmp-list))
13496 (setq tmp-list (cdr tmp-list)))
13498 (setq tmp-list pack-alist)
13499 (while tmp-list
13500 (when (null (nth 2 (car tmp-list)))
13501 (setq tmp-entry (car tmp-list))
13505 (setq tmp-list (cdr tmp-list)))
13511 (add-to-list 'vhdl-updated-project-list (or project dir-name)))
13523 (aput 'vhdl-ent-inst-alist key (list ent-inst-list))
13540 (let ((dir-list (or (nth 2 (aget vhdl-project-alist project)) '("")))
13545 dir-list-tmp dir dir-name num-dir act-dir recursive)
13554 (while dir-list
13555 (setq dir (vhdl-resolve-env-variable (car dir-list)))
13559 (setq dir-list-tmp
13563 dir-list-tmp))
13564 (setq dir-list (cdr dir-list)))
13566 (setq dir-list-tmp (vhdl-resolve-paths dir-list-tmp))
13568 (while dir-list-tmp
13569 (setq dir (car dir-list-tmp))
13572 (setq dir-list (append dir-list (vhdl-get-subdirs
13574 (setq dir-list (append dir-list (list dir))))
13575 (setq dir-list-tmp (cdr dir-list-tmp)))
13579 (while dir-list
13580 (unless (string-match file-exclude-regexp (car dir-list))
13581 (setq dir-list-tmp (cons (car dir-list) dir-list-tmp)))
13582 (setq dir-list (cdr dir-list)))
13583 (setq dir-list (nreverse dir-list-tmp))))
13586 (setq dir-list-tmp nil
13587 num-dir (length dir-list)
13589 (while dir-list
13591 (expand-file-name (car dir-list))))
13594 (cdr dir-list))
13595 (add-to-list 'dir-list-tmp (file-name-directory dir-name))
13596 (setq dir-list (cdr dir-list)
13598 (aput 'vhdl-directory-alist project (list (nreverse dir-list-tmp)))
13614 (ent-inst-list (car (aget vhdl-ent-inst-alist
13618 (ent-list (nth 0 file-entry))
13619 (arch-list (nth 1 file-entry))
13620 (arch-ent-list (nth 2 file-entry))
13621 (conf-list (nth 3 file-entry))
13622 (pack-list (nth 4 file-entry))
13623 (pack-body-list (nth 5 file-entry))
13624 (inst-ent-list (nth 7 file-entry))
13629 (while ent-list
13630 (setq key (car ent-list)
13635 (list (nth 0 entry) nil nil (nth 3 entry) nil))
13637 (setq ent-list (cdr ent-list)))
13639 (while arch-list
13640 (setq key (car arch-list)
13641 ent-key (car arch-ent-list)
13648 (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
13651 (setq arch-list (cdr arch-list)
13652 arch-ent-list (cdr arch-ent-list)))
13654 (while conf-list
13655 (setq key (car conf-list))
13658 (setq conf-list (cdr conf-list)))
13660 (while pack-list
13661 (setq key (car pack-list)
13666 (list (nth 0 entry) nil nil nil nil nil
13670 (setq pack-list (cdr pack-list)))
13672 (while pack-body-list
13673 (setq key (car pack-body-list)
13678 (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
13682 (setq pack-body-list (cdr pack-body-list)))
13684 (while inst-ent-list
13685 (setq ent-inst-list
13686 (vhdl-delete (car inst-ent-list) ent-inst-list))
13687 (setq inst-ent-list (cdr inst-ent-list)))
13692 (vhdl-aput 'vhdl-ent-inst-alist cache-key (list ent-inst-list))
13704 (let ((file-list (reverse vhdl-modified-file-list))
13706 (when (and vhdl-speedbar-update-on-saving file-list)
13707 (while file-list
13709 (or (vhdl-update-file-contents (car file-list))
13711 (setq file-list (cdr file-list)))
13712 (setq vhdl-modified-file-list nil)
13713 (vhdl-speedbar-update-current-unit)
13716 ;; structure (parenthesised expression means list of such entries)
13730 hier-list subcomp-list tmp-list inst-key inst-comp-name
13746 ;; search entry in configuration's instantiations list
13747 (setq tmp-list conf-inst-alist)
13748 (while (and tmp-list
13749 (not (and (member (nth 0 (car tmp-list))
13750 (list "all" inst-key))
13751 (equal (nth 1 (car tmp-list))
13753 (setq tmp-list (cdr tmp-list)))
13754 (setq inst-conf-key (or (nth 4 (car tmp-list)) inst-conf-key))
13760 (or (nth 2 (car tmp-list)) ; from configuration
13768 (or (nth 3 (car tmp-list)) ; from configuration
13778 (or (nth 5 (car tmp-list)) ; from configuration
13782 (list (nth 1 inst-entry)
13792 (setq subcomp-list (vhdl-get-hierarchy
13797 ;; add to list
13798 (setq hier-list (append hier-list (list comp-entry) subcomp-list))
13801 (setq hier-list
13802 (cons (list nil nil (nth 0 ent-entry)
13808 hier-list)))
13810 hier-list))
13815 arch-alist inst-alist ent-inst-list
13826 (setq ent-inst-list
13827 (cons (list (nth 1 inst-entry)
13833 ent-inst-list)))
13837 (nreverse ent-inst-list)))
13849 (let ((project-list vhdl-updated-project-list))
13852 (while project-list
13853 (vhdl-save-cache (car project-list))
13854 (setq project-list (cdr project-list)))
13921 "(aput 'vhdl-speedbar-shown-unit-alist " key " '")
13922 (print (aget vhdl-speedbar-shown-unit-alist cache-key t)
13925 (setq vhdl-updated-project-list
13926 (delete cache-key vhdl-updated-project-list))
13990 (when (boundp 'speedbar-mode-functions-list)
13992 (speedbar-add-mode-functions-list
13996 (speedbar-add-mode-functions-list
14023 (speedbar-change-initial-expansion-list "vhdl directory")))
14026 (speedbar-change-initial-expansion-list "vhdl project")))
14037 ,(let ((key 0) (menu-list '("Hierarchy Depth")))
14039 (setq menu-list
14045 menu-list))
14047 (nreverse menu-list))
14050 (or (vhdl-speedbar-check-unit 'entity)
14051 (vhdl-speedbar-check-unit 'subprogram))]
14053 (vhdl-speedbar-check-unit 'entity)]
14055 (vhdl-speedbar-check-unit 'architecture)]
14057 (vhdl-speedbar-check-unit 'architecture)]
14068 ["Save Caches" vhdl-save-caches vhdl-updated-project-list])))
14070 (speedbar-add-expansion-list
14073 (speedbar-add-expansion-list
14076 (setq speedbar-stealthy-function-list
14078 '(("vhdl directory" vhdl-speedbar-update-current-unit)
14080 vhdl-speedbar-update-current-unit)
14082 ; (speedbar-extension-list-to-regex
14085 speedbar-stealthy-function-list))
14087 (setq speedbar-initial-expansion-list-name "vhdl directory"))
14089 (setq speedbar-initial-expansion-list-name "vhdl project"))
14110 (list 'let '((inhibit-read-only t))
14118 (speedbar-extension-list-to-regex speedbar-ignored-directory-expressions))
14154 (vhdl-speedbar-update-current-unit nil))
14165 (when (member (caar project-alist) vhdl-speedbar-shown-project-list)
14173 ; (vhdl-speedbar-update-current-unit nil t)
14208 (aput 'vhdl-directory-alist directory (list (list directory))))
14211 ent-inst-list depth)
14227 (unless (member (nth 0 ent-entry) ent-inst-list)
14275 ;; (nicked from `speedbar-default-directory-list')
14277 (vhdl-speedbar-update-current-unit nil))
14279 (list (expand-file-name default-directory)))
14287 (vhdl-speedbar-update-current-unit nil t))
14291 `vhdl-speedbar-shown-unit-alist'."
14292 (let ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
14293 (vhdl-speedbar-update-current-unit nil)
14294 vhdl-updated-project-list)
14295 (adelete 'vhdl-speedbar-shown-unit-alist key)
14297 (while unit-alist ; expand units
14298 (vhdl-speedbar-goto-this-unit key (caar unit-alist))
14300 (let ((arch-alist (nth 1 (car unit-alist)))
14318 (setq unit-alist (cdr unit-alist))))))
14319 (vhdl-speedbar-update-current-unit nil t))
14340 (progn (setq vhdl-speedbar-shown-project-list nil)
14343 (adelete 'vhdl-speedbar-shown-unit-alist key)
14346 (add-to-list 'vhdl-updated-project-list key)))))
14355 arch-alist unit-alist subunit-alist)
14356 (add-to-list 'vhdl-speedbar-shown-project-list key)
14363 (setq unit-alist (cons (list (caar ent-alist) subunit-alist) unit-alist))
14366 (setq unit-alist (cons (list (caar conf-alist)) unit-alist))
14369 (setq unit-alist (cons (list (caar pack-alist)) unit-alist))
14371 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
14374 (add-to-list 'vhdl-updated-project-list key))))
14381 (unless (member token vhdl-speedbar-shown-project-list)
14382 (setq vhdl-speedbar-shown-project-list
14383 (cons token vhdl-speedbar-shown-project-list)))
14391 (setq vhdl-speedbar-shown-project-list
14392 (delete token vhdl-speedbar-shown-project-list))
14413 ;; add entity to `vhdl-speedbar-shown-unit-alist'
14414 (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14415 (aput 'unit-alist token nil)
14416 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
14449 (add-to-list 'vhdl-updated-project-list key))
14450 (vhdl-speedbar-update-current-unit t t))))
14453 ;; remove entity from `vhdl-speedbar-shown-unit-alist'
14455 (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14456 (adelete 'unit-alist token)
14457 (if unit-alist
14458 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
14459 (adelete 'vhdl-speedbar-shown-unit-alist key))
14462 (add-to-list 'vhdl-updated-project-list key))))
14484 ;; add architecture to `vhdl-speedbar-shown-unit-alist'
14485 (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
14486 (arch-alist (nth 0 (aget unit-alist (car token) t))))
14487 (aput 'unit-alist (car token) (list (cons (cdr token) arch-alist)))
14488 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
14509 (add-to-list 'vhdl-updated-project-list key))
14510 (vhdl-speedbar-update-current-unit t t))))
14513 ;; remove architecture from `vhdl-speedbar-shown-unit-alist'
14515 (unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
14516 (arch-alist (nth 0 (aget unit-alist (car token) t))))
14517 (aput 'unit-alist (car token) (list (delete (cdr token) arch-alist)))
14518 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
14521 (add-to-list 'vhdl-updated-project-list key))))
14543 ;; add configuration to `vhdl-speedbar-shown-unit-alist'
14544 (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14545 (aput 'unit-alist token nil)
14546 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
14566 (add-to-list 'vhdl-updated-project-list key))
14567 (vhdl-speedbar-update-current-unit t t))))
14570 ;; remove configuration from `vhdl-speedbar-shown-unit-alist'
14572 (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14573 (adelete 'unit-alist token)
14574 (if unit-alist
14575 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
14576 (adelete 'vhdl-speedbar-shown-unit-alist key))
14579 (add-to-list 'vhdl-updated-project-list key))))
14599 ;; add package to `vhdl-speedbar-shown-unit-alist'
14600 (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14601 (aput 'unit-alist token nil)
14602 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
14635 (add-to-list 'vhdl-updated-project-list key))
14636 (vhdl-speedbar-update-current-unit t t))))
14639 ;; remove package from `vhdl-speedbar-shown-unit-alist'
14641 (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
14642 (adelete 'unit-alist token)
14643 (if unit-alist
14644 (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
14645 (adelete 'vhdl-speedbar-shown-unit-alist key))
14648 (add-to-list 'vhdl-updated-project-list key))))
14673 (defvar vhdl-speedbar-update-current-unit t
14674 "Non-nil means to run `vhdl-speedbar-update-current-unit'.")
14704 (defun vhdl-speedbar-update-current-unit (&optional no-position always)
14708 (project-list vhdl-speedbar-shown-project-list)
14715 (when (and vhdl-speedbar-update-current-unit
14718 (while project-list
14720 (car project-list) t)))
14721 (setq project-list (cdr project-list)))
14770 ;; move speedbar so the first highlighted unit is visible
14779 (defun vhdl-speedbar-update-units (text unit-list file-name face
14782 (while unit-list
14785 (concat text "\\(" (car unit-list) "\\)\\>") nil t)
14790 (setq unit-list (cdr unit-list)))
14956 "Insert design unit title entry."
15000 (vhdl-speedbar-update-current-unit t t))
15030 ;; design unit entry
15036 ;; design unit kind
15055 ;; design unit name
15103 "Add file to `vhdl-modified-file-list'."
15105 (add-to-list 'vhdl-modified-file-list (buffer-file-name)))
15108 (defun vhdl-resolve-paths (path-list)
15110 (let (path-list-1 path-list-2 path-beg path-end dir)
15112 (while path-list
15113 (setq dir (car path-list))
15116 (setq path-list-1 (cons dir path-list-1))
15118 (setq path-list (cdr path-list)))
15120 (while path-list-1
15121 (setq dir (car path-list-1))
15126 (setq path-list-1
15131 (let ((all-list (vhdl-directory-files
15135 dir-list)
15136 (while all-list
15137 (when (file-directory-p (car all-list))
15138 (setq dir-list (cons (car all-list) dir-list)))
15139 (setq all-list (cdr all-list)))
15140 dir-list))
15141 (cdr path-list-1))))
15144 (setq path-list-2 (cons dir path-list-2)))
15145 (setq path-list-1 (cdr path-list-1))))
15146 (nreverse path-list-2)))
15148 (defun vhdl-speedbar-goto-this-unit (directory unit)
15154 (re-search-forward (concat "[]}] " unit "\\>") nil t))
15162 Jump to the design unit if `vhdl-speedbar-jump-to-unit' is t or if the file
15168 (when (or vhdl-speedbar-jump-to-unit buffer)
15171 (vhdl-speedbar-update-current-unit t t)
15178 (let ((is-entity (vhdl-speedbar-check-unit 'entity)))
15179 (if (not (or is-entity (vhdl-speedbar-check-unit 'subprogram)))
15199 (if (not (vhdl-speedbar-check-unit 'entity))
15211 (if (not (vhdl-speedbar-check-unit 'architecture))
15223 (if (not (vhdl-speedbar-check-unit 'architecture))
15234 "Make (compile) design unit or directory/project under the cursor."
15238 (error "ERROR: No primary design unit or directory/project under cursor")
15239 (let ((is-unit (match-string 2))
15240 (unit-name (vhdl-speedbar-line-text))
15248 (vhdl-make (and is-unit unit-name))))))
15258 (defun vhdl-speedbar-check-unit (design-unit)
15259 "Check whether design unit under cursor corresponds to DESIGN-UNIT (or its
15263 (cond ((eq design-unit 'entity)
15267 ((eq design-unit 'architecture)
15271 ((eq design-unit 'subprogram)
15435 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
15438 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
15441 (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
15508 (if (not vhdl-port-list)
15520 (message "Placing component \"%s\"..." (nth 0 vhdl-port-list))
15527 (car vhdl-port-list) "\\>") nil t)))
15540 (when (nth 3 vhdl-port-list)
15557 (message "Placing component \"%s\"...done" (nth 0 vhdl-port-list)))))))
15580 signal-name signal-entry signal-alist local-list written-list
15581 single-in-list multi-in-list single-out-list multi-out-list
15582 constant-name constant-entry constant-alist single-list multi-list
15622 (setq generic-alist (nth 1 vhdl-port-list)
15623 port-alist (nth 2 vhdl-port-list)
15624 vhdl-port-list nil)
15640 (if (or (member constant-name single-list)
15641 (member constant-name multi-list))
15642 (progn (setq single-list (delete constant-name single-list))
15643 (add-to-list 'multi-list constant-name))
15644 (add-to-list 'single-list constant-name))
15663 ((member signal-name local-list)
15665 ((or (member signal-name single-out-list)
15666 (member signal-name multi-out-list))
15667 (setq single-out-list (delete signal-name single-out-list))
15668 (setq multi-out-list (delete signal-name multi-out-list))
15669 (add-to-list 'local-list signal-name))
15670 ((member signal-name single-in-list)
15671 (setq single-in-list (delete signal-name single-in-list))
15672 (add-to-list 'multi-in-list signal-name))
15673 ((not (member signal-name multi-in-list))
15674 (add-to-list 'single-in-list signal-name)))
15677 ((member signal-name local-list)
15679 ((or (member signal-name single-in-list)
15680 (member signal-name multi-in-list))
15681 (setq single-in-list (delete signal-name single-in-list))
15682 (setq multi-in-list (delete signal-name multi-in-list))
15683 (add-to-list 'local-list signal-name))
15684 ((member signal-name single-out-list)
15685 (setq single-out-list (delete signal-name single-out-list))
15686 (add-to-list 'multi-out-list signal-name))
15687 ((not (member signal-name multi-out-list))
15688 (add-to-list 'single-out-list signal-name))))
15692 (setq inst-alist (cons (list inst-name (nreverse constant-alist)
15722 (when multi-list
15740 (when (or multi-in-list multi-out-list)
15760 (cond ((member constant-name written-list)
15762 ((member constant-name multi-list)
15769 (add-to-list 'written-list constant-name))
15776 (add-to-list 'written-list constant-name)))
15787 (cond ((member signal-name written-list)
15789 ((member signal-name multi-in-list)
15795 (add-to-list 'written-list signal-name))
15796 ((member signal-name multi-out-list)
15802 (add-to-list 'written-list signal-name))
15803 ((or (member signal-name single-in-list)
15804 (member signal-name single-out-list))
15811 (add-to-list 'written-list signal-name))
15816 (add-to-list 'written-list signal-name)))
16154 (defun vhdl-uniquify (in-list)
16156 (let (out-list)
16157 (while in-list
16158 (add-to-list 'out-list (car in-list))
16159 (setq in-list (cdr in-list)))
16160 out-list))
16165 (list (let ((completion-ignore-case t))
16187 (setq regexp-alist (cons (list (nth 0 sublist)
16224 (exception-list (and file-name (nth 2 project-entry)))
16228 (while (and exception-list
16229 (not (string-match (caar exception-list) file-name)))
16230 (setq exception-list (cdr exception-list)))
16231 (if (and exception-list (not (cdar exception-list)))
16233 (if (and file-options-only (not exception-list))
16235 (setq file-options (cdar exception-list))
16347 (let (pack-list)
16350 (setq pack-list (cons (cdar lib-alist) pack-list)))
16352 pack-list))
16370 (regexp-list (nth 12 (aget vhdl-compiler-alist vhdl-compiler)))
16371 (ent-regexp (cons "\\(.*\\)" (nth 0 regexp-list)))
16372 (arch-regexp (cons "\\(.*\\) \\(.*\\)" (nth 1 regexp-list)))
16373 (conf-regexp (cons "\\(.*\\)" (nth 2 regexp-list)))
16374 (pack-regexp (cons "\\(.*\\)" (nth 3 regexp-list)))
16375 (pack-body-regexp (cons "\\(.*\\)" (nth 4 regexp-list)))
16376 (adjust-case (nth 5 regexp-list))
16382 target-list depend-list unit-list prim-list second-list subcomp-list
16383 lib-alist lib-body-alist pack-list all-pack-list
16388 tmp-key tmp-list rule)
16392 (unless regexp-list
16397 (setq tmp-list ent-alist)
16407 target-list (nth 0 rule)
16408 depend-list (nth 1 rule)
16409 second-list nil
16410 subcomp-list nil)
16413 (setq unit-list (cons (cons ent-key tmp-key) unit-list))
16415 (setq target-list (cons ent-key target-list))
16417 (setq pack-list (vhdl-get-packages lib-alist work-library))
16418 (setq depend-list (append depend-list pack-list))
16419 (setq all-pack-list pack-list)
16421 (aput 'rule-alist ent-file-name (list target-list depend-list))
16432 target-list (nth 0 rule)
16433 depend-list (nth 1 rule))
16437 (setq unit-list
16438 (cons (cons ent-arch-key tmp-key) unit-list))
16439 (setq second-list (cons ent-arch-key second-list))
16441 (setq target-list (cons ent-arch-key target-list))
16443 (setq depend-list (cons ent-key depend-list))
16451 (setq depend-list (cons inst-ent-key depend-list)
16452 subcomp-list (cons inst-ent-key subcomp-list)))
16455 (setq pack-list (vhdl-get-packages lib-alist work-library))
16456 (setq depend-list (append depend-list pack-list))
16457 (setq all-pack-list (append all-pack-list pack-list))
16459 (aput 'rule-alist arch-file-name (list target-list depend-list))
16461 (setq prim-list (cons (list ent-key second-list
16462 (append subcomp-list all-pack-list))
16463 prim-list)))
16465 (setq ent-alist tmp-list)
16467 (setq tmp-list conf-alist)
16478 target-list (nth 0 rule)
16479 depend-list (nth 1 rule)
16480 subcomp-list (list ent-key))
16483 (setq unit-list (cons (cons conf-key tmp-key) unit-list))
16485 (setq target-list (cons conf-key target-list))
16487 (setq depend-list
16488 (cons ent-key (cons (concat ent-key "-" arch-key) depend-list)))
16490 (setq pack-list (vhdl-get-packages lib-alist work-library))
16491 (setq depend-list (append depend-list pack-list))
16500 (setq depend-list (cons inst-ent-key depend-list)
16501 subcomp-list (cons inst-ent-key subcomp-list)))
16503 ; (setq depend-list (cons (concat comp-ent-key "-" comp-arch-key)
16504 ; depend-list)))
16506 (setq depend-list (cons inst-conf-key depend-list)
16507 subcomp-list (cons inst-conf-key subcomp-list))))
16510 (aput 'rule-alist conf-file-name (list target-list depend-list))
16511 (setq prim-list (cons (list conf-key nil (append subcomp-list pack-list))
16512 prim-list))
16514 (setq conf-alist tmp-list)
16516 (setq tmp-list pack-alist)
16526 target-list (nth 0 rule) depend-list (nth 1 rule))
16529 (setq unit-list (cons (cons pack-key tmp-key) unit-list))
16531 (setq target-list (cons pack-key target-list))
16533 (setq pack-list (vhdl-get-packages lib-alist work-library))
16534 (setq depend-list (append depend-list pack-list))
16535 (setq all-pack-list pack-list)
16537 (aput 'rule-alist pack-file-name (list target-list depend-list))
16544 target-list (nth 0 rule)
16545 depend-list (nth 1 rule))
16548 (setq unit-list
16549 (cons (cons pack-body-key tmp-key) unit-list))
16551 (setq target-list (cons pack-body-key target-list))
16553 (setq depend-list (cons pack-key depend-list))
16555 (setq pack-list (vhdl-get-packages lib-body-alist work-library))
16556 (setq depend-list (append depend-list pack-list))
16557 (setq all-pack-list (append all-pack-list pack-list))
16560 (list target-list depend-list)))
16561 (setq prim-list
16562 (cons (list pack-key (when pack-body-key (list pack-body-key))
16563 all-pack-list)
16564 prim-list)))
16566 (setq pack-alist tmp-list)
16579 cell second-list subcomp-list options unit-key unit-name)
16581 (setq unit-list (vhdl-sort-alist unit-list))
16582 (setq prim-list (vhdl-sort-alist prim-list))
16583 (setq tmp-list rule-alist)
16584 (while tmp-list ; pre-sort rule targets
16585 (setq cell (cdar tmp-list))
16587 (setq tmp-list (cdr tmp-list)))
16620 ;; insert variable definitions for all library unit files
16621 (insert "\n\n# Define library unit files\n")
16622 (setq tmp-list unit-list)
16623 (while unit-list
16624 (insert "\nUNIT-" work-library "-" (caar unit-list)
16625 " = \\\n\t$(LIBRARY-" work-library ")/" (cdar unit-list))
16626 (setq unit-list (cdr unit-list)))
16627 ;; insert variable definition for list of all library unit files
16628 (insert "\n\n\n# Define list of all library unit files\n"
16630 (setq unit-list tmp-list)
16631 (while unit-list
16632 (insert " \\\n\t" "$(UNIT-" work-library "-" (caar unit-list) ")")
16633 (setq unit-list (cdr unit-list)))
16635 (setq unit-list tmp-list)
16655 ;; insert rule for each library unit
16657 (while prim-list
16658 (setq second-list (sort (nth 1 (car prim-list)) 'string<))
16659 (setq subcomp-list
16660 (sort (vhdl-uniquify (nth 2 (car prim-list))) 'string<))
16661 (setq unit-key (caar prim-list)
16662 unit-name (or (nth 0 (aget ent-alist unit-key t))
16663 (nth 0 (aget conf-alist unit-key t))
16664 (nth 0 (aget pack-alist unit-key t))))
16665 (insert "\n" unit-key)
16666 (unless (equal unit-key unit-name)
16667 (insert " \\\n" unit-name))
16670 " \\\n\t\t$(UNIT-" work-library "-" unit-key ")")
16671 (while second-list
16672 (insert " \\\n\t\t$(UNIT-" work-library "-" (car second-list) ")")
16673 (setq second-list (cdr second-list)))
16674 (while subcomp-list
16675 (when (and (assoc (car subcomp-list) unit-list)
16676 (not (equal unit-key (car subcomp-list))))
16677 (insert " \\\n\t\t" (car subcomp-list)))
16678 (setq subcomp-list (cdr subcomp-list)))
16680 (setq prim-list (cdr prim-list)))
16681 ;; insert rule for each library unit file
16682 (insert "\n\n# Rules for compiling single library unit files\n")
16689 (setq target-list (nth 1 rule)
16690 depend-list (sort (vhdl-uniquify (nth 2 rule)) 'string<))
16692 (setq tmp-list target-list)
16693 (while target-list
16694 (insert "\n$(UNIT-" work-library "-" (car target-list) ")"
16695 (if (cdr target-list) " \\" " :"))
16696 (setq target-list (cdr target-list)))
16697 (setq target-list tmp-list)
16700 ;; insert dependencies (except if also target or unit does not exist)
16701 (while depend-list
16702 (when (and (not (member (car depend-list) target-list))
16703 (assoc (car depend-list) unit-list))
16705 "$(UNIT-" work-library "-" (car depend-list) ")"))
16706 (setq depend-list (cdr depend-list)))
16712 (setq tmp-list target-list)
16713 (while target-list
16714 (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")"
16715 (if (cdr target-list) " \\" "\n"))
16716 (setq target-list (cdr target-list)))
16717 (setq target-list tmp-list))
16754 (list
16789 'vhdl-argument-list-indent
16790 'vhdl-association-list-with-formals
16858 'vhdl-speedbar-jump-to-unit
16990 (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))
17002 (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))