aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilson Snyder2015-02-20 19:50:46 -0500
committerGlenn Morris2015-02-20 19:50:46 -0500
commit852947baf0d71751843da82ec4593ea154fda9af (patch)
treec346832ee0d0d4b5cfd87de67446081f99f7ca6a
parent1ee99b6fbde4a58e7be24c46e19ff8faadbe704f (diff)
downloademacs-852947baf0d71751843da82ec4593ea154fda9af.tar.gz
emacs-852947baf0d71751843da82ec4593ea154fda9af.zip
Sync with upstream verilog-mode revision 0d6420b
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Update. (vector-skip-list): Remove. (verilog-auto-inst-port, verilog-auto-inst-port-list) (verilog-auto-inst, verilog-auto-inst-param): Use arguments rather than vector-skip. (verilog-auto-inst-port): Fix AUTOINST interfaces to not show modport if signal attachment is itself a modport. Reported by Matthew Lovell.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/progmodes/verilog-mode.el37
2 files changed, 31 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 925f51b6557..4e59654e0c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12015-02-21 Wilson Snyder <wsnyder@wsnyder.org>
2
3 Sync with upstream verilog-mode revision 0d6420b.
4 * progmodes/verilog-mode.el (verilog-mode-version): Update.
5 (vector-skip-list): Remove.
6 (verilog-auto-inst-port, verilog-auto-inst-port-list)
7 (verilog-auto-inst, verilog-auto-inst-param):
8 Use arguments rather than vector-skip.
9 (verilog-auto-inst-port): Fix AUTOINST interfaces to not show
10 modport if signal attachment is itself a modport. Reported by
11 Matthew Lovell.
12
12015-02-21 Reto Zimmermann <reto@gnu.org> 132015-02-21 Reto Zimmermann <reto@gnu.org>
2 14
3 Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support. 15 Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support.
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 7b6f2d3a819..57206544b9b 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -123,7 +123,7 @@
123;;; Code: 123;;; Code:
124 124
125;; This variable will always hold the version number of the mode 125;; This variable will always hold the version number of the mode
126(defconst verilog-mode-version "2014-11-12-aa4b777-vpo" 126(defconst verilog-mode-version "2015-02-20-0d6420b-vpo"
127 "Version of this Verilog mode.") 127 "Version of this Verilog mode.")
128(defconst verilog-mode-release-emacs t 128(defconst verilog-mode-release-emacs t
129 "If non-nil, this version of Verilog mode was released with Emacs itself.") 129 "If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -8419,7 +8419,6 @@ Return an array of [outputs inouts inputs wire reg assign const]."
8419 (defvar sigs-temp) 8419 (defvar sigs-temp)
8420 ;; These are known to be from other packages and may not be defined 8420 ;; These are known to be from other packages and may not be defined
8421 (defvar diff-command nil) 8421 (defvar diff-command nil)
8422 (defvar vector-skip-list)
8423 ;; There are known to be from newer versions of Emacs 8422 ;; There are known to be from newer versions of Emacs
8424 (defvar create-lockfiles)) 8423 (defvar create-lockfiles))
8425 8424
@@ -10884,7 +10883,7 @@ See the example in `verilog-auto-inout-modport'."
10884(defvar vl-bits nil "See `verilog-auto-inst'.") ; Prevent compile warning 10883(defvar vl-bits nil "See `verilog-auto-inst'.") ; Prevent compile warning
10885(defvar vl-mbits nil "See `verilog-auto-inst'.") ; Prevent compile warning 10884(defvar vl-mbits nil "See `verilog-auto-inst'.") ; Prevent compile warning
10886 10885
10887(defun verilog-auto-inst-port (port-st indent-pt tpl-list tpl-num for-star par-values) 10886(defun verilog-auto-inst-port (port-st indent-pt moddecls tpl-list tpl-num for-star par-values)
10888 "Print out an instantiation connection for this PORT-ST. 10887 "Print out an instantiation connection for this PORT-ST.
10889Insert to INDENT-PT, use template TPL-LIST. 10888Insert to INDENT-PT, use template TPL-LIST.
10890@ are instantiation numbers, replaced with TPL-NUM. 10889@ are instantiation numbers, replaced with TPL-NUM.
@@ -10901,9 +10900,10 @@ If PAR-VALUES replace final strings with these parameter values."
10901 (vl-mbits (if (verilog-sig-multidim port-st) 10900 (vl-mbits (if (verilog-sig-multidim port-st)
10902 (verilog-sig-multidim-string port-st) "")) 10901 (verilog-sig-multidim-string port-st) ""))
10903 (vl-bits (if (or verilog-auto-inst-vector 10902 (vl-bits (if (or verilog-auto-inst-vector
10904 (not (assoc port vector-skip-list)) 10903 (not (assoc port (verilog-decls-get-signals moddecls)))
10905 (not (equal (verilog-sig-bits port-st) 10904 (not (equal (verilog-sig-bits port-st)
10906 (verilog-sig-bits (assoc port vector-skip-list))))) 10905 (verilog-sig-bits
10906 (assoc port (verilog-decls-get-signals moddecls))))))
10907 (or (verilog-sig-bits port-st) "") 10907 (or (verilog-sig-bits port-st) "")
10908 "")) 10908 ""))
10909 (case-fold-search nil) 10909 (case-fold-search nil)
@@ -10932,7 +10932,12 @@ If PAR-VALUES replace final strings with these parameter values."
10932 (concat "/*" vl-mbits vl-bits "*/") 10932 (concat "/*" vl-mbits vl-bits "*/")
10933 (concat vl-bits)) 10933 (concat vl-bits))
10934 tpl-net (concat port 10934 tpl-net (concat port
10935 (if vl-modport (concat "." vl-modport) "") 10935 (if (and vl-modport
10936 ;; .modport cannot be added if attachment is
10937 ;; already declared as modport, VCS croaks
10938 (let ((sig (assoc port (verilog-decls-get-interfaces moddecls))))
10939 (not (and sig (verilog-sig-modport sig)))))
10940 (concat "." vl-modport) "")
10936 dflt-bits)) 10941 dflt-bits))
10937 ;; Find template 10942 ;; Find template
10938 (cond (tpl-ass ; Template of exact port name 10943 (cond (tpl-ass ; Template of exact port name
@@ -11002,12 +11007,12 @@ If PAR-VALUES replace final strings with these parameter values."
11002;;(x "incom[@\"(+ (* 8 @) 7)\":@\"(* 8 @)\"]") 11007;;(x "incom[@\"(+ (* 8 @) 7)\":@\"(* 8 @)\"]")
11003;;(x ".out (outgo[@\"(concat (+ (* 8 @) 7) \\\":\\\" ( * 8 @))\"]));") 11008;;(x ".out (outgo[@\"(concat (+ (* 8 @) 7) \\\":\\\" ( * 8 @))\"]));")
11004 11009
11005(defun verilog-auto-inst-port-list (sig-list indent-pt tpl-list tpl-num for-star par-values) 11010(defun verilog-auto-inst-port-list (sig-list indent-pt moddecls tpl-list tpl-num for-star par-values)
11006 "For `verilog-auto-inst' print a list of ports using `verilog-auto-inst-port'." 11011 "For `verilog-auto-inst' print a list of ports using `verilog-auto-inst-port'."
11007 (when verilog-auto-inst-sort 11012 (when verilog-auto-inst-sort
11008 (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare))) 11013 (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare)))
11009 (mapc (lambda (port) 11014 (mapc (lambda (port)
11010 (verilog-auto-inst-port port indent-pt 11015 (verilog-auto-inst-port port indent-pt moddecls
11011 tpl-list tpl-num for-star par-values)) 11016 tpl-list tpl-num for-star par-values))
11012 sig-list)) 11017 sig-list))
11013 11018
@@ -11366,8 +11371,6 @@ For more information see the \\[verilog-faq] and forums at URL
11366 (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) 11371 (+ 16 (* 8 (/ (+ indent-pt 7) 8)))))
11367 (modi (verilog-modi-current)) 11372 (modi (verilog-modi-current))
11368 (moddecls (verilog-modi-get-decls modi)) 11373 (moddecls (verilog-modi-get-decls modi))
11369 (vector-skip-list (unless verilog-auto-inst-vector
11370 (verilog-decls-get-signals moddecls)))
11371 submod submodi submoddecls 11374 submod submodi submoddecls
11372 inst skip-pins tpl-list tpl-num did-first par-values) 11375 inst skip-pins tpl-list tpl-num did-first par-values)
11373 11376
@@ -11409,7 +11412,7 @@ For more information see the \\[verilog-faq] and forums at URL
11409 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11412 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11410 ;; Note these are searched for in verilog-read-sub-decls. 11413 ;; Note these are searched for in verilog-read-sub-decls.
11411 (verilog-insert-indent "// Interfaced\n") 11414 (verilog-insert-indent "// Interfaced\n")
11412 (verilog-auto-inst-port-list sig-list indent-pt 11415 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11413 tpl-list tpl-num for-star par-values))) 11416 tpl-list tpl-num for-star par-values)))
11414 (let ((sig-list (verilog-signals-not-in 11417 (let ((sig-list (verilog-signals-not-in
11415 (verilog-decls-get-interfaces submoddecls) 11418 (verilog-decls-get-interfaces submoddecls)
@@ -11419,7 +11422,7 @@ For more information see the \\[verilog-faq] and forums at URL
11419 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11422 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11420 ;; Note these are searched for in verilog-read-sub-decls. 11423 ;; Note these are searched for in verilog-read-sub-decls.
11421 (verilog-insert-indent "// Interfaces\n") 11424 (verilog-insert-indent "// Interfaces\n")
11422 (verilog-auto-inst-port-list sig-list indent-pt 11425 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11423 tpl-list tpl-num for-star par-values))) 11426 tpl-list tpl-num for-star par-values)))
11424 (let ((sig-list (verilog-signals-not-in 11427 (let ((sig-list (verilog-signals-not-in
11425 (verilog-decls-get-outputs submoddecls) 11428 (verilog-decls-get-outputs submoddecls)
@@ -11428,7 +11431,7 @@ For more information see the \\[verilog-faq] and forums at URL
11428 (when sig-list 11431 (when sig-list
11429 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11432 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11430 (verilog-insert-indent "// Outputs\n") 11433 (verilog-insert-indent "// Outputs\n")
11431 (verilog-auto-inst-port-list sig-list indent-pt 11434 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11432 tpl-list tpl-num for-star par-values))) 11435 tpl-list tpl-num for-star par-values)))
11433 (let ((sig-list (verilog-signals-not-in 11436 (let ((sig-list (verilog-signals-not-in
11434 (verilog-decls-get-inouts submoddecls) 11437 (verilog-decls-get-inouts submoddecls)
@@ -11437,7 +11440,7 @@ For more information see the \\[verilog-faq] and forums at URL
11437 (when sig-list 11440 (when sig-list
11438 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11441 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11439 (verilog-insert-indent "// Inouts\n") 11442 (verilog-insert-indent "// Inouts\n")
11440 (verilog-auto-inst-port-list sig-list indent-pt 11443 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11441 tpl-list tpl-num for-star par-values))) 11444 tpl-list tpl-num for-star par-values)))
11442 (let ((sig-list (verilog-signals-not-in 11445 (let ((sig-list (verilog-signals-not-in
11443 (verilog-decls-get-inputs submoddecls) 11446 (verilog-decls-get-inputs submoddecls)
@@ -11446,7 +11449,7 @@ For more information see the \\[verilog-faq] and forums at URL
11446 (when sig-list 11449 (when sig-list
11447 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11450 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11448 (verilog-insert-indent "// Inputs\n") 11451 (verilog-insert-indent "// Inputs\n")
11449 (verilog-auto-inst-port-list sig-list indent-pt 11452 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11450 tpl-list tpl-num for-star par-values))) 11453 tpl-list tpl-num for-star par-values)))
11451 ;; Kill extra semi 11454 ;; Kill extra semi
11452 (save-excursion 11455 (save-excursion
@@ -11509,8 +11512,6 @@ Templates:
11509 (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) 11512 (+ 16 (* 8 (/ (+ indent-pt 7) 8)))))
11510 (modi (verilog-modi-current)) 11513 (modi (verilog-modi-current))
11511 (moddecls (verilog-modi-get-decls modi)) 11514 (moddecls (verilog-modi-get-decls modi))
11512 (vector-skip-list (unless verilog-auto-inst-vector
11513 (verilog-decls-get-signals moddecls)))
11514 submod submodi submoddecls 11515 submod submodi submoddecls
11515 inst skip-pins tpl-list tpl-num did-first) 11516 inst skip-pins tpl-list tpl-num did-first)
11516 ;; Find module name that is instantiated 11517 ;; Find module name that is instantiated
@@ -11550,7 +11551,7 @@ Templates:
11550 (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) 11551 (when (not did-first) (verilog-auto-inst-first) (setq did-first t))
11551 ;; Note these are searched for in verilog-read-sub-decls. 11552 ;; Note these are searched for in verilog-read-sub-decls.
11552 (verilog-insert-indent "// Parameters\n") 11553 (verilog-insert-indent "// Parameters\n")
11553 (verilog-auto-inst-port-list sig-list indent-pt 11554 (verilog-auto-inst-port-list sig-list indent-pt moddecls
11554 tpl-list tpl-num nil nil))) 11555 tpl-list tpl-num nil nil)))
11555 ;; Kill extra semi 11556 ;; Kill extra semi
11556 (save-excursion 11557 (save-excursion