WAL enables programmable waveform analysis.

Related tags

Data Analysiswal
Overview

This repro introcudes the Waveform Analysis Language (WAL). The initial paper on WAL will appear at ASPDAC'22 and can be downloaded here: https://www.ics.jku.at/files/2022ASPDAC_WAL.pdf. The examples from the paper can be found in the examples folder.

If you like WAL you can cite our paper as follows:

@InProceedings{KG:2022,
  author        = {Lucas Klemmer and Daniel Gro{\ss}e},
  title         = {{WAL:} A Novel Waveform Analysis Language for Advanced Design Understanding and Debugging},
  booktitle     = {ASP Design Automation Conf.},
  year          = 2022
}

Comments
  • WAL fails to load FST

    WAL fails to load FST

    I'm trying to load an FST but get the following error:

    >-> (load "sim_no_pfb_match.fst" "waves")
    'utf-8' codec can't decode byte 0x83 in position 14: invalid start byte
    (load "sim_no_pfb_match.fst" "waves")
    

    The FST loads into gtkwave without issue so is there anything I can do to help debug this?

    opened by shareefj 10
  • [Question] Is WAL able to load Synopsys .vpd files?

    [Question] Is WAL able to load Synopsys .vpd files?

    I am playing around with the tool and wanted to do some analysis of my simulations of the BOOM core. I simulated the core using Chipyard and Synopsys VCS and get the according vpd files, which I can't load into WAL (throwing following error message)

    'utf-8' codec can't decode byte 0xd5 in position 21: invalid continuation byte

    It is possible to convert it to a vcd file by using vpd2vcd but since it is less compressed the vcd files become really large(e.g. 27 MB converted to 2.2 GB)

    Is there a possibility to use vpd files without converting to vcd?

    Best regards, Alex

    opened by WezelA 5
  • [wawk] using 2-digit number in sliced_symbol leads to error

    [wawk] using 2-digit number in sliced_symbol leads to error

    When I try to access a sliced part of a 32bit signal (e.g. inst[11:7]) I get the following error:

    Traceback (most recent call last):
      File "/home/eyck/tmp/wal/.wal/bin/wawk", line 33, in <module>
        sys.exit(load_entry_point('wal-lang', 'console_scripts', 'wawk')())
      File "/home/eyck/git/wal/wawk/wawk.py", line 70, in run
        wal.eval(statement.action)
      File "/home/eyck/git/wal/wal/core.py", line 43, in eval
        return self.eval_context.eval(sexpr)
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 290, in op_do
        return seval.eval_args(args)[-1]
      File "/home/eyck/git/wal/wal/eval.py", line 40, in eval_args
        return list(map(self.eval, args))
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 239, in op_if
        return seval.eval(args[1])
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 290, in op_do
        return seval.eval_args(args)[-1]
      File "/home/eyck/git/wal/wal/eval.py", line 40, in eval_args
        return list(map(self.eval, args))
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 194, in op_set
        res = seval.eval(arg[1])
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 91, in op_neq
        evaluated = seval.eval_args(args)
      File "/home/eyck/git/wal/wal/eval.py", line 40, in eval_args
        return list(map(self.eval, args))
      File "/home/eyck/git/wal/wal/eval.py", line 93, in eval
        res = self.eval_dispatch(head, tail)
      File "/home/eyck/git/wal/wal/eval.py", line 44, in eval_dispatch
        return self.dispatch.get(oprtr.value, lambda a, b: NotImplementedError())(self, args)
      File "/home/eyck/git/wal/wal/implementation/core.py", line 609, in op_slice
        return (evaluated[0] & (((1 << (upper - lower + 1)) - 1) << lower)) >> lower
    ValueError: negative shift count
    
    opened by eyck 2
  • [wawk] output is not reliable

    [wawk] output is not reliable

    When running the following script

    BEGIN: {
        // import python file for access to riscvmodel lib
        import(extern);
        icnt=0;
        lastclkcnt=0;
        clkcnt=0;
        printed=0;
        ilen = 0;
        // create some aliases for shorter signal names
        alias(clk, tb.adapter.core.TGC_C.clk);
        alias(reset, tb.adapter.core.TGC_C.reset);
        alias(trap, tb.adapter.core.TGC_C.core_trace_exc_o);
        alias(valid, tb.adapter.core.TGC_C.core_trace_valid_o);
        alias(instr, tb.adapter.core.TGC_C.core_trace_instr_o);
        alias(pc, tb.adapter.core.TGC_C.core_trace_pc_o);
        alias(reg_addr, tb.adapter.core.TGC_C.core_trace_reg_addr_o);
        alias(reg_val, tb.adapter.core.TGC_C.core_trace_reg_val_o);
        alias(reg_wr, tb.adapter.core.TGC_C.core_trace_reg_wr_o);
    }
    clk, valid: {
        if(printed==0) {
            icnt=icnt+1;
            delay=(clkcnt-lastclkcnt)/2;
            lastclkcnt=clkcnt;
            op = call(extern.decode, instr);
            shifted = instr/128;
            was_call = shifted[4:0]!=0 && (op == "jal" || op == "jalr");
            ilen = 2;
            if (instr[1:0]==3)
              ilen = 4;
            printf("0x%x, %d, %d, %d, 0x%x, %s\n", pc, delay, ilen, was_call, instr, op);
            printed = 1;
        } else
            printed = 0;
    }
    clk, !reset: {
        clkcnt=clkcnt+1;
    }
    END: {
        printf("%f (%d/%d)\n", icnt/clkcnt, icnt, clkcnt);
    }
    

    on a vcd file I get in 2 consecutive runs

    (.wal) eyck$:~/tmp/wal$ wawk cpi.wawk ../vtgc_tb_xlevel.vcd
    0x20, 3, 4, 1, 0x297, auipc
    0x24, 1, 4, 1, 0xc028293, addi
    0x28, 1, 4, 0, 0x30529073, csrrw
    0x2c, 1, 4, 1, 0x2a00093, addi
    0x30, 1, 4, 1, 0x2a00113, addi
    0x34, 1, 4, 1, 0x2a00193, addi
    0x38, 1, 4, 1, 0x200513, addi
    0x3a, 1, 4, 1, 0x300a13, addi
    0x3e, 1, 4, 1, 0x700f93, addi
    0x40, 1, 4, 0, 0x43507b, 4411515
    0.000000 (10/28)
    (.wal) eyck$:~/tmp/wal$ wawk cpi.wawk ../vtgc_tb_xlevel.vcd
    0x20, 3, 4, 0, 0x297, auipc
    0x24, 1, 4, 0, 0xc028293, addi
    0x28, 1, 4, 0, 0x30529073, csrrw
    0x2c, 1, 4, 0, 0x2a00093, addi
    0x30, 1, 4, 0, 0x2a00113, addi
    0x34, 1, 4, 0, 0x2a00193, addi
    0x38, 1, 4, 0, 0x200513, addi
    0x3a, 1, 4, 0, 0x300a13, addi
    0x3e, 1, 4, 0, 0x700f93, addi
    0x40, 1, 4, 0, 0x43507b, 4411515
    0.000000 (10/28)
    
    bug 
    opened by eyck 1
  • Changed wawk semicolon behaviour slightly

    Changed wawk semicolon behaviour slightly

    Updated the wawk grammar in a way where semicolon usage is now more consistent:

    • there are no longer weird cases where some "{" blocks "}" require a semicolon after them, while others do not: now none of them require semicolons, but they (as well as other statements) can have as many semicolons after them as they like
    • BREAKING CHANGE: if/else statements that DO NOT use blocks but one-line statements instead, now require semicolons for each statement, and not just the last one.
    opened by FRoith 0
  • ACTUALLY fixed the precedence rules this time

    ACTUALLY fixed the precedence rules this time

    Addresses #2, where a non-precise grammar caused non-deterministic (and incorrect) parsing behavior.

    Previous pull request was thought to fix the issue due to faulty tests, but this time it actually fixed the issue correctly as far as I can tell.

    opened by FRoith 0
  • Package does not declare all dependencies

    Package does not declare all dependencies

    When installing wal using pip on a CentOS7 OS and runnign wawk I get:

    Traceback (most recent call last):
    File "/home/xxx/git/TGC-UVM/riscv-dv-venv/bin/wawk", line 5, in <module>
    from wawk.wawk import run
    File "/home/xxx/git/TGC-UVM/riscv-dv-venv/lib64/python3.6/site-packages/wawk/[wawk.py](http://wawk.py/)", line 6, in <module>
    from wal.core import Wal
    File "/home/xxx/git/TGC-UVM/riscv-dv-venv/lib64/python3.6/site-packages/wal/[core.py](http://core.py/)", line 7, in <module>
    from wal.eval import SEval
    File "/home/xxx/git/TGC-UVM/riscv-dv-venv/lib64/python3.6/site-packages/wal/[eval.py](http://eval.py/)", line 2, in <module>
    from wal.ast_defs import Operator, Symbol, ExpandGroup
    File "/home/xxx/git/TGC-UVM/riscv-dv-venv/lib64/python3.6/site-packages/wal/ast_[defs.py](http://defs.py/)", line 2, in <module>
    from dataclasses import dataclass
    ModuleNotFoundError: No module named 'dataclasses'
    

    After running pip3 install dataclasses everything works fine.

    opened by eyck 0
  • Upgrade version of vcdvcd

    Upgrade version of vcdvcd

    Hi,

    you seem to be depending on a broken version of vcdvcd.py. After pip installing wal-lang, I get the following error:

    (.venv) [email protected]:~/git/wal$ wal
    Traceback (most recent call last):
      File "/home/shareefj/git/wal/.venv/bin/wal", line 5, in <module>
        from wal.wal import run
      File "/home/shareefj/git/wal/.venv/lib/python3.10/site-packages/wal/wal.py", line 7, in <module>
        from wal.core import Wal
      File "/home/shareefj/git/wal/.venv/lib/python3.10/site-packages/wal/core.py", line 6, in <module>
        from wal.trace import TraceContainer
      File "/home/shareefj/git/wal/.venv/lib/python3.10/site-packages/wal/trace.py", line 5, in <module>
        from vcdvcd import VCDVCD, StreamParserCallbacks
      File "/home/shareefj/git/wal/.venv/lib/python3.10/site-packages/vcdvcd/__init__.py", line 1, in <module>
        from .vcdvcd import *
      File "/home/shareefj/git/wal/.venv/lib/python3.10/site-packages/vcdvcd/vcdvcd.py", line 355, in <module>
        class Scope(collections.MutableMapping):
    AttributeError: module 'collections' has no attribute 'MutableMapping'
    

    and it looks like at some point they've tried to fix this: https://github.com/cirosantilli/vcdvcd/commit/9c9b7c1aaa7a6bcc4e254e3557cc00a9ec1c7bd0

    opened by shareefj 1
Releases(v0.6.3-beta.2)
Owner
Institute for Complex Systems (ICS), Johannes Kepler University Linz
ICS conducts research in EDA with focus on verification, debugging, and synthesis; abstraction levels: SystemC virtual prototypes, RTL downto gate-level.
Institute for Complex Systems (ICS), Johannes Kepler University Linz
Python script to automate the plotting and analysis of percentage depth dose and dose profile simulations in TOPAS.

topas-create-graphs A script to automatically plot the results of a topas simulation Works for percentage depth dose (pdd) and dose profiles (dp). Dep

Sebastian Schäfer 10 Dec 08, 2022
Flexible HDF5 saving/loading and other data science tools from the University of Chicago

deepdish Flexible HDF5 saving/loading and other data science tools from the University of Chicago. This repository also host a Deep Learning blog: htt

UChicago - Department of Computer Science 255 Dec 10, 2022
Pipetools enables function composition similar to using Unix pipes.

Pipetools Complete documentation pipetools enables function composition similar to using Unix pipes. It allows forward-composition and piping of arbit

186 Dec 29, 2022
A powerful data analysis package based on mathematical step functions. Strongly aligned with pandas.

The leading use-case for the staircase package is for the creation and analysis of step functions. Pretty exciting huh. But don't hit the close button

48 Dec 21, 2022
Demonstrate the breadth and depth of your data science skills by earning all of the Databricks Data Scientist credentials

Data Scientist Learning Plan Demonstrate the breadth and depth of your data science skills by earning all of the Databricks Data Scientist credentials

Trung-Duy Nguyen 27 Nov 01, 2022
A real-time financial data streaming pipeline and visualization platform using Apache Kafka, Cassandra, and Bokeh.

Realtime Financial Market Data Visualization and Analysis Introduction This repo shows my project about real-time stock data pipeline. All the code is

6 Sep 07, 2022
Shot notebooks resuming the main functions of GeoPandas

Shot notebooks resuming the main functions of GeoPandas, 2 notebooks written as Exercises to apply these functions.

1 Jan 12, 2022
Python package for analyzing behavioral data for Brain Observatory: Visual Behavior

Allen Institute Visual Behavior Analysis package This repository contains code for analyzing behavioral data from the Allen Brain Observatory: Visual

Allen Institute 16 Nov 04, 2022
Functional tensors for probabilistic programming

Funsor Funsor is a tensor-like library for functions and distributions. See Functional tensors for probabilistic programming for a system description.

208 Dec 29, 2022
In this tutorial, raster models of soil depth and soil water holding capacity for the United States will be sampled at random geographic coordinates within the state of Colorado.

Raster_Sampling_Demo (Resulting graph of this demo) Background Sampling values of a raster at specific geographic coordinates can be done with a numbe

2 Dec 13, 2022
Convert monolithic Jupyter notebooks into Ploomber pipelines.

Soorgeon Join our community | Newsletter | Contact us | Blog | Website | YouTube Convert monolithic Jupyter notebooks into Ploomber pipelines. soorgeo

Ploomber 65 Dec 16, 2022
BErt-like Neurophysiological Data Representation

BENDR BErt-like Neurophysiological Data Representation This repository contains the source code for reproducing, or extending the BERT-like self-super

114 Dec 23, 2022
🧪 Panel-Chemistry - exploratory data analysis and build powerful data and viz tools within the domain of Chemistry using Python and HoloViz Panel.

🧪📈 🐍. The purpose of the panel-chemistry project is to make it really easy for you to do DATA ANALYSIS and build powerful DATA AND VIZ APPLICATIONS within the domain of Chemistry using using Python a

Marc Skov Madsen 97 Dec 08, 2022
BioMASS - A Python Framework for Modeling and Analysis of Signaling Systems

Mathematical modeling is a powerful method for the analysis of complex biological systems. Although there are many researches devoted on produ

BioMASS 22 Dec 27, 2022
Produces a summary CSV report of an Amber Electric customer's energy consumption and cost data.

Amber Electric Usage Summary This is a command line tool that produces a summary CSV report of an Amber Electric customer's energy consumption and cos

Graham Lea 12 May 26, 2022
Useful tool for inserting DataFrames into the Excel sheet.

PyCellFrame Insert Pandas DataFrames into the Excel sheet with a bunch of conditions Install pip install pycellframe Usage Examples Let's suppose that

Luka Sosiashvili 1 Feb 16, 2022
simple way to build the declarative and destributed data pipelines with python

unipipeline simple way to build the declarative and distributed data pipelines. Why you should use it Declarative strict config Scaffolding Fully type

aliaksandr-master 0 Jan 26, 2022
Using Data Science with Machine Learning techniques (ETL pipeline and ML pipeline) to classify received messages after disasters.

Using Data Science with Machine Learning techniques (ETL pipeline and ML pipeline) to classify received messages after disasters.

1 Feb 11, 2022
Investigating EV charging data

Investigating EV charging data Introduction: Got an opportunity to work with a home monitoring technology company over the last 6 months whose goal wa

Yash 2 Apr 07, 2022
Python Project on Pro Data Analysis Track

Udacity-BikeShare-Project: Python Project on Pro Data Analysis Track Basic Data Exploration with pandas on Bikeshare Data Basic Udacity project using

Belal Mohammed 0 Nov 10, 2021