• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
          • Vl-module
            • Vl-module-p
              • Vl-module->hands-offp
              • Vl-ppc-module
                • Vl-ppcs-module
              • Make-vl-module
              • Vl-module-fix
              • Change-vl-module
              • Vl-module-equiv
              • Vl-module->timeprecision
              • Vl-module->paramdecls
              • Vl-module->defaultdisables
              • Vl-module->timeunit
              • Vl-module->properties
              • Vl-module->parse-temps
              • Vl-module->origname
              • Vl-module->modinsts
              • Vl-module->generates
              • Vl-module->dpiimports
              • Vl-module->dpiexports
              • Vl-module->covergroups
              • Vl-module->cassertions
              • Vl-module->assertions
              • Vl-module->warnings
              • Vl-module->vardecls
              • Vl-module->typedefs
              • Vl-module->taskdecls
              • Vl-module->sequences
              • Vl-module->portdecls
              • Vl-module->initials
              • Vl-module->imports
              • Vl-module->genvars
              • Vl-module->gclkdecls
              • Vl-module->gateinsts
              • Vl-module->fundecls
              • Vl-module->elabtasks
              • Vl-module->comments
              • Vl-module->clkdecls
              • Vl-module->classes
              • Vl-module->assigns
              • Vl-module->alwayses
              • Vl-module->aliases
              • Vl-module->ports
              • Vl-module->name
              • Vl-module->minloc
              • Vl-module->maxloc
              • Vl-module->finals
              • Vl-module->binds
              • Vl-module->atts
              • Vl-module->params
            • Vl-vardecl
            • Vl-fundecl
            • Vl-interface
            • Vl-design
            • Vl-assign
            • Vl-modinst
            • Vl-gateinst
            • Vl-taskdecl
            • Vl-portdecl
            • Vl-commentmap
            • Vl-dpiimport
            • Vl-ansi-portdecl
            • Vl-package
            • Vl-paramdecl
            • Vl-dpiexport
            • Vl-class
            • Vl-sort-blockitems-aux
            • Vl-plainarglist->exprs
            • Vl-taskdecllist->names
            • Expressions-and-datatypes
            • Vl-fundecllist->names
            • Vl-udp
            • Vl-port
            • Vl-genelement
            • Vl-clkdecl
            • Vl-parse-temps
            • Vl-bind
            • Vl-namedarg
            • Vl-exprdist
            • Vl-clkassign
            • Vl-range
            • Vl-propport
            • Vl-typedef
            • Vl-gatedelay
            • Vl-dimension
            • Vl-sequence
            • Vl-clkskew
            • Vl-program
            • Vl-gatestrength
            • Vl-property
            • Vl-config
            • Vl-always
            • Vl-import
            • Vl-repeateventcontrol
            • Vl-timeliteral
            • Vl-initial
            • Vl-eventcontrol
            • Vl-final
            • Vl-udpsymbol-p
            • Vl-maybe-clkskew
            • Vl-function-specialization
            • Vl-alias
            • Vl-maybe-nettypename
            • Vl-maybe-gatedelay
            • Vl-letdecl
            • Vl-direction-p
            • Vl-modelement
            • Vl-maybe-timeprecisiondecl
            • Vl-maybe-scopeid
            • Vl-maybe-gatestrength
            • Vl-maybe-direction
            • Vl-maybe-delayoreventcontrol
            • Vl-gclkdecl
            • Vl-fwdtypedef
            • Vl-maybe-udpsymbol-p
            • Vl-maybe-timeunitdecl
            • Vl-maybe-timeliteral
            • Vl-maybe-parse-temps
            • Vl-maybe-cstrength
            • Vl-arguments
            • Vl-maybe-module
            • Vl-maybe-design
            • Vl-covergroup
            • Vl-udpline
            • Vl-timeunitdecl
            • Vl-genvar
            • Vl-defaultdisable
            • Vl-context1
            • Vl-timeprecisiondecl
            • Vl-sort-blockitems
            • Vl-elabtask
            • Vl-udpedge
            • Vl-delaycontrol
            • Vl-context
            • Vl-ctxelement
            • Vl-ctxelement->loc
            • Vl-modelement->loc
            • Statements
            • Vl-blockitem
            • Vl-vardecllist
            • Vl-interface->ifports
            • Vl-syntaxversion
            • Vl-nettypename-p
            • Vl-module->ifports
            • Vl-lifetime-p
            • Vl-paramdecllist
            • Vl-modelementlist->genelements
            • Vl-importlist
            • Vl-typedeflist
            • Vl-gatetype-p
            • Vl-cstrength-p
            • Vl-port->name
            • Vl-genelement->loc
            • Vl-delayoreventcontrol
            • Vl-udpentry-p
            • Vl-portdecllist
            • Vl-elabtask->loc
            • Property-expressions
            • Vl-taskdecllist
            • Vl-port->loc
            • Vl-fundecllist
            • Vl-sequencelist
            • Vl-propertylist
            • Vl-portlist
            • Vl-dpiimportlist
            • Vl-dpiexportlist
            • Vl-classlist
            • Vl-arguments->args
            • Vl-alwaystype-p
            • Vl-modinstlist
            • Vl-importpart-p
            • Vl-importpart-fix
            • Vl-bindlist
            • Vl-initiallist
            • Vl-genvarlist
            • Vl-gclkdecllist
            • Vl-function-specialization-map
            • Vl-finallist
            • Vl-elabtasklist
            • Vl-defaultdisablelist
            • Vl-clkdecllist
            • Vl-cassertionlist
            • Vl-blockstmt-p
            • Vl-assignlist
            • Vl-assertionlist
            • Vl-alwayslist
            • Vl-aliaslist
            • Vl-udptable
            • Vl-udplist
            • Vl-udpentrylist
            • Vl-propportlist
            • Vl-programlist
            • Vl-packagelist
            • Vl-namedarglist
            • Vl-modulelist
            • Vl-modportlist
            • Vl-modport-portlist
            • Vl-letdecllist
            • Vl-interfacelist
            • Vl-gateinstlist
            • Vl-fwdtypedeflist
            • Vl-covergrouplist
            • Vl-configlist
            • Vl-clkassignlist
            • Vl-blockitemlist
            • Vl-ansi-portdecllist
            • Vl-regularportlist
            • Vl-paramdecllist-list
            • Vl-modelementlist
            • Vl-interfaceportlist
            • Vl-casekey-p
            • Sv::maybe-4veclist
          • Loader
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Verilog-printing
    • Vl-module-p

    Vl-ppc-module

    Pretty print a module with comments to ps.

    Signature
    (vl-ppc-module x ss &key (ps 'ps)) → ps
    Arguments
    x — Guard (vl-module-p x).
    ss — Guard (vl-scopestack-p ss).

    (vl-ppc-module x ss &key (ps 'ps)) extends ps with a pretty-printed representation of the module x.

    For interactive use you may prefer vl-ppcs-module which writes to a string instead of ps.

    The mods here should be the list of all modules and modalist is its vl-modalist; these arguments are only needed for hyperlinking to submodules in HTML mode.

    Definitions and Theorems

    Function: vl-ppc-module-fn

    (defun vl-ppc-module-fn (x ss ps)
     (declare (xargs :stobjs (ps)))
     (declare (xargs :guard (and (vl-module-p x)
                                 (vl-scopestack-p ss))))
     (let ((__function__ 'vl-ppc-module))
       (declare (ignorable __function__))
       (b*
        (((vl-module x) (vl-module-fix x))
         (ss (vl-scopestack-push x ss))
         (ps (vl-pp-set-portnames x.portdecls))
         (imap nil)
         ((mv imap ps)
          (vl-genblob-populate-item-map (vl-module->genblob x)
                                        ss imap))
         (imap (rev imap))
         (comments (vl-add-newlines-after-block-comments x.comments))
         (comments
              (if (vl-ps->htmlp)
                  (vl-html-encode-commentmap comments (vl-ps->tabsize))
                comments))
         (guts (cwtime (vl-commentmap-entry-sort (append comments imap))
                       :mintime 1/2
                       :name vl-commentmap-entry-sort))
         (guts (vl-remove-empty-commentmap-entries guts)))
        (vl-ps-seq
             (vl-when-html (vl-println-markup "<div class=\"vl_src\">"))
             (if x.atts (vl-pp-atts x.atts) ps)
             (vl-ps-span "vl_key" (vl-print "module "))
             (vl-print-modname x.name)
             (vl-print " (")
             (vl-pp-portlist x.ports)
             (vl-println ");")
             (vl-progindent-block (vl-pp-encoded-commentmap guts))
             (vl-ps-span "vl_key" (vl-println "endmodule"))
             (vl-println "")
             (vl-when-html (vl-println-markup "</div>"))))))

    Theorem: vl-ppc-module-fn-of-vl-module-fix-x

    (defthm vl-ppc-module-fn-of-vl-module-fix-x
      (equal (vl-ppc-module-fn (vl-module-fix x)
                               ss ps)
             (vl-ppc-module-fn x ss ps)))

    Theorem: vl-ppc-module-fn-vl-module-equiv-congruence-on-x

    (defthm vl-ppc-module-fn-vl-module-equiv-congruence-on-x
      (implies (vl-module-equiv x x-equiv)
               (equal (vl-ppc-module-fn x ss ps)
                      (vl-ppc-module-fn x-equiv ss ps)))
      :rule-classes :congruence)

    Theorem: vl-ppc-module-fn-of-vl-scopestack-fix-ss

    (defthm vl-ppc-module-fn-of-vl-scopestack-fix-ss
      (equal (vl-ppc-module-fn x (vl-scopestack-fix ss)
                               ps)
             (vl-ppc-module-fn x ss ps)))

    Theorem: vl-ppc-module-fn-vl-scopestack-equiv-congruence-on-ss

    (defthm vl-ppc-module-fn-vl-scopestack-equiv-congruence-on-ss
      (implies (vl-scopestack-equiv ss ss-equiv)
               (equal (vl-ppc-module-fn x ss ps)
                      (vl-ppc-module-fn x ss-equiv ps)))
      :rule-classes :congruence)