• Top
  • Vl-portinfo-regular

Make-vl-portinfo-regular

Basic constructor macro for vl-portinfo-regular structures.

Syntax
(make-vl-portinfo-regular [:portname <portname>] 
                          [:port-dir <port-dir>] 
                          [:conn-expr <conn-expr>] 
                          [:port-lhs <port-lhs>] 
                          [:conn-svex <conn-svex>] 
                          [:port-size <port-size>] 
                          [:replicatedp <replicatedp>] 
                          [:interfacep <interfacep>]) 

This is the usual way to construct vl-portinfo-regular structures. It simply conses together a structure with the specified fields.

This macro generates a new vl-portinfo-regular structure from scratch. See also change-vl-portinfo-regular, which can "change" an existing structure, instead.

Definition

This is an ordinary make- macro introduced by defprod.

Macro: make-vl-portinfo-regular

(defmacro make-vl-portinfo-regular (&rest args)
  (std::make-aggregate 'vl-portinfo-regular
                       args
                       '((:portname)
                         (:port-dir)
                         (:conn-expr)
                         (:port-lhs)
                         (:conn-svex)
                         (:port-size)
                         (:replicatedp)
                         (:interfacep))
                       'make-vl-portinfo-regular
                       nil))

Function: vl-portinfo-regular

(defun vl-portinfo-regular
       (portname port-dir conn-expr port-lhs conn-svex
                 port-size replicatedp interfacep)
 (declare (xargs :guard (and (stringp portname)
                             (vl-maybe-direction-p port-dir)
                             (vl-maybe-expr-p conn-expr)
                             (sv::lhs-p port-lhs)
                             (sv::svex-p conn-svex)
                             (posp port-size)
                             (booleanp interfacep))))
 (declare (xargs :guard t))
 (let ((__function__ 'vl-portinfo-regular))
  (declare (ignorable __function__))
  (b* ((portname (mbe :logic (str-fix portname)
                      :exec portname))
       (port-dir (mbe :logic (vl-maybe-direction-fix port-dir)
                      :exec port-dir))
       (conn-expr (mbe :logic (vl-maybe-expr-fix conn-expr)
                       :exec conn-expr))
       (port-lhs (mbe :logic (sv::lhs-fix port-lhs)
                      :exec port-lhs))
       (conn-svex (mbe :logic (sv::svex-fix conn-svex)
                       :exec conn-svex))
       (port-size (mbe :logic (pos-fix port-size)
                       :exec port-size))
       (interfacep (mbe :logic (acl2::bool-fix interfacep)
                        :exec interfacep)))
   (cons
    :regular
    (std::prod-cons
       (std::prod-cons (std::prod-cons portname port-dir)
                       (std::prod-cons conn-expr port-lhs))
       (std::prod-cons (std::prod-cons conn-svex port-size)
                       (std::prod-cons replicatedp interfacep)))))))