Match a single global clocking declaration.
(vl-parse-global-clocking-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
SystemVerilog-2012 Grammar:
clocking_declaration ::= ... | 'global' 'clocking' [identifier] clocking_event ';' 'endclocking' [ ':' identifier ]
Function:
(defun vl-parse-global-clocking-declaration-fn (atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-atts-p atts))) (let ((__function__ 'vl-parse-global-clocking-declaration)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-kwd-global)) (clk := (vl-match-token :vl-kwd-clocking)) (when (vl-is-token? :vl-idtoken) (name := (vl-match))) (event := (vl-parse-clocking-event)) (:= (vl-match-token :vl-kwd-endclocking)) (when name (:= (vl-parse-endblock-name (and name (vl-idtoken->name name)) "clocking"))) (return (make-vl-gclkdecl :name (and name (vl-idtoken->name name)) :event event :loc (vl-token->loc clk) :atts atts)))))
Theorem:
(defthm vl-parse-global-clocking-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-global-clocking-declaration atts)) (not (mv-nth 1 (vl-parse-global-clocking-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-global-clocking-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-global-clocking-declaration atts))) (mv-nth 0 (vl-parse-global-clocking-declaration atts))))
Theorem:
(defthm vl-parse-global-clocking-declaration-result (implies (and (force (vl-atts-p atts))) (equal (vl-gclkdecl-p (mv-nth 1 (vl-parse-global-clocking-declaration atts))) (not (mv-nth 0 (vl-parse-global-clocking-declaration atts))))))
Theorem:
(defthm vl-parse-global-clocking-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-global-clocking-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-global-clocking-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-global-clocking-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))