Parse a
(vl-parse-continuous-assign atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Verilog-2005:
continuous_assign ::= 'assign' [drive_strength] [delay3] list_of_net_assignments ';'
SystemVerilog-2012:
continuous_assign ::= 'assign' [drive_strength] [delay3] list_of_net_assignments ';' | 'assign' [delay_control] list_of_variable_assignments ';'
Note that the
delay_control ::= '#' delay_value | '# '(' mintypmax_expression ')' delay3 ::= '#' delay_value | '#' '(' mintypmax_expression [...optional stuff...] ')'
Function:
(defun vl-parse-continuous-assign-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-continuous-assign)) (declare (ignorable __function__)) (seq tokstream (assignkwd := (vl-match-token :vl-kwd-assign)) (when (vl-is-token? :vl-lparen) (strength := (vl-parse-drive-strength-or-charge-strength))) (when (vl-cstrength-p strength) (return-raw (vl-parse-error "Assign statement illegally contains a charge strength."))) (when (vl-is-token? :vl-pound) (delay := (vl-parse-delay3))) (pairs := (if (eq (vl-loadconfig->edition config) :verilog-2005) (vl-parse-list-of-net-assignments) (vl-parse-list-of-variable-assignments))) (:= (vl-match-token :vl-semi)) (return (vl-build-assignments (vl-token->loc assignkwd) pairs strength delay atts)))))
Theorem:
(defthm vl-parse-continuous-assign-fails-gracefully (implies (mv-nth 0 (vl-parse-continuous-assign atts)) (not (mv-nth 1 (vl-parse-continuous-assign atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-continuous-assign (iff (vl-warning-p (mv-nth 0 (vl-parse-continuous-assign atts))) (mv-nth 0 (vl-parse-continuous-assign atts))))
Theorem:
(defthm vl-parse-continuous-assign-result (implies (and (force (vl-atts-p atts))) (vl-assignlist-p (mv-nth 1 (vl-parse-continuous-assign atts)))))
Theorem:
(defthm vl-parse-continuous-assign-true-listp (true-listp (mv-nth 1 (vl-parse-continuous-assign atts))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-continuous-assign-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-continuous-assign atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-continuous-assign atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-continuous-assign atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))