• 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
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
          • Ps
          • Verilog-printing
          • Basic-printing
          • Printing-locally
          • Formatted-printing
          • Accessing-printed-output
            • Vl-print-to-file
            • Vl-ps->chars
            • Vl-ps->string
            • With-ps-file
          • Json-printing
          • Vl-printedlist
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Printer

Accessing-printed-output

How to access the characters that have been printed.

Once you are done printing, you typically want to access the characters that have been printed, e.g., as a character list or string. You might directly access the rchars field of ps, using, e.g., (vl-ps->rchars), but it is a weird vl-printedlist-p structure, is in reverse order, and is generally not very convenient to work with. So, it is typically more convenient to use these alternatives.

Subtopics

Vl-print-to-file
Write the printed characters to a file.
Vl-ps->chars
(vl-ps->chars) returns what was printed as a character list in the proper, non-reversed, printed order.
Vl-ps->string
(vl-ps->string) returns the printed characters as a string in the proper, non-reversed, printed order.
With-ps-file
Convenient wrapper for vl-print-to-file.