Build the Verilog
(vl-nedgeflop-always q-expr clk-exprs data-exprs) → always
Function:
(defun vl-nedgeflop-always (q-expr clk-exprs data-exprs) (declare (xargs :guard (and (vl-expr-p q-expr) (vl-exprlist-p clk-exprs) (vl-exprlist-p data-exprs)))) (declare (xargs :guard (and (consp clk-exprs) (same-lengthp clk-exprs data-exprs)))) (let ((__function__ 'vl-nedgeflop-always)) (declare (ignorable __function__)) (b* ((evatoms (vl-nedgeflop-posedge-clks clk-exprs)) (evctrl (make-vl-eventcontrol :starp nil :atoms evatoms)) (body (vl-nedgeflop-ifstmt q-expr clk-exprs data-exprs)) (stmt (make-vl-timingstmt :ctrl evctrl :body body))) (make-vl-always :type :vl-always :stmt stmt :loc *vl-fakeloc*))))
Theorem:
(defthm vl-always-p-of-vl-nedgeflop-always (implies (and (force (vl-expr-p q-expr)) (force (vl-exprlist-p clk-exprs)) (force (vl-exprlist-p data-exprs)) (force (consp clk-exprs)) (force (same-lengthp clk-exprs data-exprs))) (b* ((always (vl-nedgeflop-always q-expr clk-exprs data-exprs))) (vl-always-p always))) :rule-classes :rewrite)