Heuristic to avoid warning about assigning simple, common right-hand sides to multiple wires.
It seems fine to assign a constant, weirdint, real, or string to multiple wires; this is especially frequent for things like 0 and 1, so we don't want to warn in these cases.
We'll just suppress warnings for any atoms other than identifiers. This will allow us to still flag situations like:
assign wire1 = wirefoo; assign wire2 = wirefoo;
I later decided I wanted to extend this, and additionally not cause warnings
for odd but innocuous things like
Function:
(defun vl-duperhs-too-trivial-p (rhs) (declare (xargs :guard (vl-expr-p rhs))) (let ((__function__ 'vl-duperhs-too-trivial-p)) (declare (ignorable __function__)) (b* (((when (vl-fast-atom-p rhs)) (not (vl-fast-id-p (vl-atom->guts rhs)))) ((vl-nonatom rhs) rhs)) (and (or (eq rhs.op :vl-unary-bitnot) (eq rhs.op :vl-concat)) (tuplep 1 rhs.args) (vl-fast-atom-p (first rhs.args)) (not (vl-fast-id-p (vl-atom->guts (first rhs.args))))))))
Theorem:
(defthm booleanp-of-vl-duperhs-too-trivial-p (b* ((trivial-p (vl-duperhs-too-trivial-p rhs))) (booleanp trivial-p)) :rule-classes :type-prescription)