Giter VIP home page Giter VIP logo

wave_searcher's Introduction

The problem

Assume you have a collection of test results, including wave files, from your nightly/weekly regression, and you now want to check if any of these wave files contains a specific case that interests you. This might happen because you'd like to see how the design or testbench behave in that given case, or you're curious about whether a given situation is covered at all. The text-book solution would be to add a testbench coverpoint, or an assertion, but that solution is not a great one in practice: coding either a coverpoint or an assertion could end up taking quite a bit of effort, and both of them might contain bugs and require a few iterations, hence distracting from the main task and becoming a task in their own right. Another light weight option often used is adding some debug messages in - this option will also require rerunning, and might also require a few iterations, as placing a message exactly in the time and place that interests you might take a bit of fine tuning. What we're after is a solution that allows us quick iteration without rerunning.

A solution

Wave searcher is an open source solution that allows searching multiple wave files very quickly. It works as follows:

  • Data is read from multiple wave files into a hash stored in memory, using python
  • Once data has been read into a python hash, it can be searched using simple python queries.
  • A small flask server can be kicked of, allowing multiple users to search the same data.

Step #1 usually takes a bit of time (see below) because we're reading a lot of data from many files into memory. Once data has been read into memory, however, searching it is very fast: 1-2 seconds for 100's of wave files. Note that a possible alternative to keeping the data in memory would be to keep it in a database, but this is not implemented here.

Reading the data

To search the data, it must first be read into memory. The time it takes to read the data depends on the number of signals you'd like to read, and the length of the test. Reading all inputs/outputs for a long (15-20 min) big cluster test, takes about 15 seconds. short tests take 1-2 seconds. Since this step can take a bit of time if you have 100's of tests (half an hour to an hour), I have found it useful to read data that would be interesting to multiple users and then keep it in memory for a few days before refreshing. Multiple users could search the data via a small flask server.

This jupyter notebook shows how to load the data and explains each step, and how it can be configured. Basically you need to define the signals you want to extract (you could match an entire scope, or all signals matching various regexps), and the directory containing the wave files, and that's it. Once you've done this you run the extraction step and wait a bit.

Searching the data

When data has been read into memory you can search it using simple queries. The same jupyter notebook shows an example queriy explained. See also a pic of that notebook below.

Allowing other users to access data

The notebook can also start a simple flask server, that allows queries to be submitted by other users from command line. The code under client/ will send a local query string to a flask server and print the results. Edit the file to change the port/server used.

wave_searcher's People

Contributors

avidan-efody avatar

Stargazers

 avatar Michael Pirov avatar Ivan Larkov avatar anton dumas avatar Tianrui Wei avatar Peter Monsson avatar  avatar Jevin Sweval avatar  avatar  avatar  avatar Nick Kyparissas avatar Tsvi Mostovicz avatar  avatar Antonio avatar

Watchers

Jevin Sweval avatar Antonio avatar  avatar

wave_searcher's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.