• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Dumping only last 1ms log file information in irun/xrun

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 65
  • Views 6358
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dumping only last 1ms log file information in irun/xrun

deeps4
deeps4 over 6 years ago

Hi,

To manage log file size. I would like to dump out the log information for only last 1ms. Is there a way to do that in irun/xrun tcl input script?

There are are lot of test cases and the time duration for  each test case is different , so there is no way of knowing the duration of the test before the simulation begins.

Thanks,

  • Cancel
Parents
  • StephenH
    StephenH over 6 years ago

    You can do this via the database command, refer to the docs here:https://support.cadence.com/apex/techpubDocViewerPage?path=tclcmdref/tclcmdref19.03/tclcmdrefTOC.html. For example: "database -open -shm waves -inctime 1 ms -incfiles 1 -default".

    HOWEVER I would strongly discourage this approach, as you'll slowing down your simulations substantially, as well as generating a huge amount of NFS traffic writing waves to disk only to delete them if they end up not being in that last 1ms. If you're running bug hunting regressions it's almost always going to be better to run with no waves and no logging (e.g. UVM_NONE verbosity), then only for your failing tests, re-run them with waveforms and logging. Since you're re-running them you'll also have the advantage of knowing when to start the probing to get that last 1ms, thus saving quite a lot of performance.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • deeps4
    deeps4 over 6 years ago in reply to StephenH

    Thanks Stephen, do you mean that the only way of writing out log file for last 1ms would be through shm route?

    This would indeed slow down the simulation. The requirement during preliminary regression is to only get last 5-10 lines of the log file which gives pass/fail information from the self checking testbench.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 6 years ago in reply to deeps4

    Sorry, for some reason I focussed on the "last 1ms" aspect and thought you were talking about waveforms not log messages! 

    No, the simulator has no concept of buffering log messages and printing on those from a given time window. If you're using UVM you could perhaps write a custom report server which caches the messages, purging any that get older than 1ms and printing the entire buffer at the end of the test, but it's likely to eat up a lot of memory and performance. Is there something special about your tests that means you cannot do what I proposed about re-running tests in a debug mode once you know which ones fail and need debugging?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • deeps4
    deeps4 over 6 years ago in reply to StephenH

    These are non UVM based testbenches. These are self checking verilog based testbenches. At the end of the test a log message is dumped out with pass/fail information or number of simulation mismatches. But during the run, lot of log messages are generated which unnecessarily increases the disk space. For a preliminary regression it is enough if I get the information of pass/fail. If the testcase fails then I will be using waveform based debug option.

    What do you mean by debug mode? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 6 years ago in reply to deeps4

    Maybe then if you have no way to control the messaging, you could try using the -nolog option to irun / xrun, and instead pipe the stdout into the "tail" command, specifying a maximum number of lines to preserve. Not exactly "1ms" but there's no easy solution for what you're after.

    xrun -nolog <other-sim-args> | tail -n 1000 > sim.log

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • deeps4
    deeps4 over 6 years ago in reply to StephenH

    Thank you, I will try this workaround.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • deeps4
    deeps4 over 6 years ago in reply to StephenH

    Thank you, I will try this workaround.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information