• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
          • Ps
          • Basic-printing
          • Verilog-printing
            • Vl-fmt
            • Vl-ppc-module
            • Vl-pp-expr
            • Vl-maybe-escape-identifier
            • Vl-print-ext-wirename
            • Vl-pp-module
              • Vl-print-wirename
              • Vl-print-loc
              • Vl-print-modname
              • Vl-pp-origexpr
              • Vl-pps-module
              • Vl-pps-expr
              • Vl-ppc-modulelist
              • Vl-ppcs-module
              • Vl-ps-update-show-atts
              • Vl-pps-origexpr
              • Vl-pps-modulelist
              • Vl-ppcs-modulelist
              • Vl-cw-obj
              • Vl-ps->show-atts-p
              • Vl-cw
            • Printing-locally
            • Formatted-printing
            • Accessing-printed-output
            • Vl-printedlist
            • Json-printing
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Verilog-printing

    Vl-pp-module

    Pretty-print a module to ps.

    Signature
    (vl-pp-module x ss &key (ps 'ps)) → ps
    Arguments
    x — Module to pretty-print.
        Guard (vl-module-p x).
    ss — Guard (vl-scopestack-p ss).

    You might instead want to use vl-ppc-module, which preserves the order of module elements and its comments. For interactive use, you may want vl-pps-module or vl-ppcs-module, which write to a string instead of ps.

    Definitions and Theorems

    Function: vl-pp-module-fn

    (defun vl-pp-module-fn (x ss ps)
      (declare (xargs :stobjs (ps)))
      (declare (xargs :guard (and (vl-module-p x)
                                  (vl-scopestack-p ss))))
      (let ((__function__ 'vl-pp-module))
        (declare (ignorable __function__))
        (b* (((vl-module x) (vl-module-fix x))
             (ss (vl-scopestack-push x ss)))
          (vl-ps-seq (vl-pp-set-portnames x.portdecls)
                     (if x.atts (vl-pp-atts x.atts) ps)
                     (vl-ps-span "vl_key" (vl-print "module "))
                     (if (vl-ps->htmlp)
                         (vl-pp-modulename-link x.name ss)
                       (vl-print-modname x.name))
                     (vl-print " (")
                     (vl-pp-portlist x.ports)
                     (vl-println ");")
                     (vl-pp-paramdecllist x.paramdecls)
                     (vl-pp-portdecllist x.portdecls)
                     (vl-pp-vardecllist x.vardecls)
                     (vl-pp-fundecllist x.fundecls)
                     (vl-pp-taskdecllist x.taskdecls)
                     (vl-pp-assignlist x.assigns)
                     (vl-pp-modinstlist x.modinsts ss)
                     (vl-pp-gateinstlist x.gateinsts)
                     (vl-pp-alwayslist x.alwayses)
                     (vl-pp-initiallist x.initials)
                     (vl-pp-genelementlist x.generates)
                     (vl-ps-span "vl_key" (vl-println "endmodule"))
                     (vl-println "")))))

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

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

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

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

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

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

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

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