Function: verilog-sig-tieoff

verilog-sig-tieoff is a byte-compiled function defined in verilog-mode.el.gz.

Signature

(verilog-sig-tieoff SIG)

Documentation

Return tieoff expression for given SIG, with appropriate width.

Tieoff value uses verilog-active-low-regexp and verilog-auto-reset-widths.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-sig-tieoff (sig)
  "Return tieoff expression for given SIG, with appropriate width.
Tieoff value uses `verilog-active-low-regexp' and
`verilog-auto-reset-widths'."
  (concat
   (if (and verilog-active-low-regexp
	    (verilog-string-match-fold verilog-active-low-regexp (verilog-sig-name sig)))
       "~" "")
   (cond ((not verilog-auto-reset-widths)
	  "0")
	 ((equal verilog-auto-reset-widths 'unbased)
	  "'0")
	 ;; Else presume verilog-auto-reset-widths is true
	 (t
	  (let* ((width (verilog-sig-width sig)))
	    (cond ((not width)
		   "'0/*NOWIDTH*/")
		  ((string-match "^[0-9]+$" width)
		   (concat width (if (verilog-sig-signed sig) "'sh0" "'h0")))
		  (t
		   (concat "{" width "{1'b0}}"))))))))