wavekit 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wavekit-0.1.2/PKG-INFO +92 -0
- wavekit-0.1.2/README.md +71 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/build.py +3 -4
- {wavekit-0.1.0 → wavekit-0.1.2}/pyproject.toml +3 -2
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/__init__.py +1 -1
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/reader.py +2 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/value_change.cpython-310-x86_64-linux-gnu.so +0 -0
- wavekit-0.1.0/PKG-INFO +0 -63
- wavekit-0.1.0/README.md +0 -45
- {wavekit-0.1.0 → wavekit-0.1.2}/LICENSE +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/fsdb_reader.py +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/npi_fsdb.pxd +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/npi_fsdb_reader.pyx +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/pattern_parser.py +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/value_change.pyx +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/vcd_reader.py +0 -0
- {wavekit-0.1.0 → wavekit-0.1.2}/src/wavekit/waveform.py +0 -0
wavekit-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: wavekit
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: a fundamental package for digital circuit waveform analysis
|
|
5
|
+
Home-page: https://github.com/cxzzzz/wavekit
|
|
6
|
+
Author: cxzzzz
|
|
7
|
+
Author-email: cxz19961010@outlook.com
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Dist: numpy (>=2.0.0,<3.0.0)
|
|
16
|
+
Requires-Dist: pytest (>=8.2.2,<9.0.0)
|
|
17
|
+
Requires-Dist: vcdvcd (>=2.3.5,<3.0.0)
|
|
18
|
+
Project-URL: Repository, https://github.com/cxzzzz/wavekit
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# wavekit
|
|
22
|
+
|
|
23
|
+
Wavekit is a fundamental Python package for digital circuit waveform analysis that provides convenient batch processing of signals and a wide range of mathematical operations for waveforms.
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- Read various waveform files (VCD, FSDB, etc.), especially optimized for large FSDB files.
|
|
28
|
+
- Extract waveforms in batches using absolute paths, brace expansions, and regular expressions.
|
|
29
|
+
- Perform arithmetic, bitwise, functional, and other operations on waveforms.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Install Wavekit with Python 3.9 or later.
|
|
34
|
+
|
|
35
|
+
If you want to read FSDB files, please ensure that **"VERDI_HOME" environment variable is set** before installing the library.
|
|
36
|
+
|
|
37
|
+
### Using PIP
|
|
38
|
+
|
|
39
|
+
You can install the library using pip:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip3 install wavekit
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### From Source
|
|
46
|
+
|
|
47
|
+
To install the library from the source, follow these steps:
|
|
48
|
+
|
|
49
|
+
Clone the repository:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/cxzzzz/wavekit.git
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Navigate to the project directory:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cd wavekit
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Install the library using pip:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
Here is a simple [example](./example/fifo_average_occupancy_level/) demonstrating how to use the library to read a VCD file and calculate the average occupancy level of the FIFO :
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
import numpy as np
|
|
73
|
+
from wavekit import VcdReader
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
with VcdReader("fifo_tb.vcd") as f: # open the VCD file
|
|
77
|
+
clock = "fifo_tb.s_fifo.clk"
|
|
78
|
+
depth = 8
|
|
79
|
+
|
|
80
|
+
#calculate the average FIFO occupancy level.
|
|
81
|
+
w_ptr = f.load_wave("fifo_tb.s_fifo.w_ptr[2:0]", clock=clock) # load fifo write pointer signal
|
|
82
|
+
r_ptr = f.load_wave("fifo_tb.s_fifo.r_ptr[2:0]", clock=clock) # load fifo read pointer signal
|
|
83
|
+
fifo_water_level = (w_ptr + depth - r_ptr) % depth # calculate the occupancy level
|
|
84
|
+
average_fifo_water_level = np.mean(fifo_water_level.value) # calculate the average occupancy level using numpy
|
|
85
|
+
print( f"average fifo occupancy level: {average_fifo_water_level}" )
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
|
|
92
|
+
|
wavekit-0.1.2/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# wavekit
|
|
2
|
+
|
|
3
|
+
Wavekit is a fundamental Python package for digital circuit waveform analysis that provides convenient batch processing of signals and a wide range of mathematical operations for waveforms.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Read various waveform files (VCD, FSDB, etc.), especially optimized for large FSDB files.
|
|
8
|
+
- Extract waveforms in batches using absolute paths, brace expansions, and regular expressions.
|
|
9
|
+
- Perform arithmetic, bitwise, functional, and other operations on waveforms.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install Wavekit with Python 3.9 or later.
|
|
14
|
+
|
|
15
|
+
If you want to read FSDB files, please ensure that **"VERDI_HOME" environment variable is set** before installing the library.
|
|
16
|
+
|
|
17
|
+
### Using PIP
|
|
18
|
+
|
|
19
|
+
You can install the library using pip:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip3 install wavekit
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### From Source
|
|
26
|
+
|
|
27
|
+
To install the library from the source, follow these steps:
|
|
28
|
+
|
|
29
|
+
Clone the repository:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone https://github.com/cxzzzz/wavekit.git
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Navigate to the project directory:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd wavekit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Install the library using pip:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install .
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
Here is a simple [example](./example/fifo_average_occupancy_level/) demonstrating how to use the library to read a VCD file and calculate the average occupancy level of the FIFO :
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import numpy as np
|
|
53
|
+
from wavekit import VcdReader
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
with VcdReader("fifo_tb.vcd") as f: # open the VCD file
|
|
57
|
+
clock = "fifo_tb.s_fifo.clk"
|
|
58
|
+
depth = 8
|
|
59
|
+
|
|
60
|
+
#calculate the average FIFO occupancy level.
|
|
61
|
+
w_ptr = f.load_wave("fifo_tb.s_fifo.w_ptr[2:0]", clock=clock) # load fifo write pointer signal
|
|
62
|
+
r_ptr = f.load_wave("fifo_tb.s_fifo.r_ptr[2:0]", clock=clock) # load fifo read pointer signal
|
|
63
|
+
fifo_water_level = (w_ptr + depth - r_ptr) % depth # calculate the occupancy level
|
|
64
|
+
average_fifo_water_level = np.mean(fifo_water_level.value) # calculate the average occupancy level using numpy
|
|
65
|
+
print( f"average fifo occupancy level: {average_fifo_water_level}" )
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
|
|
@@ -22,20 +22,19 @@ if VERDI_HOME := os.environ.get('VERDI_HOME'):
|
|
|
22
22
|
npi_include_dir = os.path.join(VERDI_HOME,'share/NPI/inc')
|
|
23
23
|
npi_library_dir = os.path.join(VERDI_HOME,'share/NPI/lib/LINUX64')
|
|
24
24
|
|
|
25
|
-
extensions
|
|
25
|
+
extensions.append(
|
|
26
26
|
Extension(
|
|
27
27
|
"src.wavekit.npi_fsdb_reader",
|
|
28
28
|
sources=["src/wavekit/npi_fsdb_reader.pyx", ],
|
|
29
29
|
include_dirs=[np.get_include(), npi_include_dir],
|
|
30
30
|
library_dirs=[npi_library_dir],
|
|
31
|
-
libraries=["NPI"],
|
|
31
|
+
libraries=["NPI", "rt"],
|
|
32
32
|
extra_compile_args=["-fpic","-O3", "-march=native"],
|
|
33
33
|
extra_link_args=["-O3", "-march=native",f"-Wl,-rpath,{npi_library_dir}"],
|
|
34
34
|
language="c++",
|
|
35
35
|
#define_macros=[('CYTHON_TRACE', '1')] # open profiling
|
|
36
36
|
)
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
)
|
|
39
38
|
|
|
40
39
|
setup(
|
|
41
40
|
ext_modules=cythonize(extensions,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "wavekit"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
description = ""
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
description = "a fundamental package for digital circuit waveform analysis"
|
|
5
5
|
authors = ["cxzzzz <cxz19961010@outlook.com>"]
|
|
6
6
|
readme = "README.md"
|
|
7
|
+
repository = "https://github.com/cxzzzz/wavekit"
|
|
7
8
|
build = "build.py"
|
|
8
9
|
include = ["src/wavekit/*.so"]
|
|
9
10
|
|
|
Binary file
|
wavekit-0.1.0/PKG-INFO
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: wavekit
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary:
|
|
5
|
-
Author: cxzzzz
|
|
6
|
-
Author-email: cxz19961010@outlook.com
|
|
7
|
-
Requires-Python: >=3.9,<4.0
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
-
Requires-Dist: numpy (>=2.0.0,<3.0.0)
|
|
15
|
-
Requires-Dist: pytest (>=8.2.2,<9.0.0)
|
|
16
|
-
Requires-Dist: vcdvcd (>=2.3.5,<3.0.0)
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
|
|
19
|
-
# wavekit
|
|
20
|
-
|
|
21
|
-
This is a Python library for manipulating and analyzing digital circuit waveforms. The library provides tools to read, process, and perform various operations on waveform data, suitable for various digital circuit simulation and testing scenarios.
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
* Read various waveform file formats (e.g., VCD, FSDB, etc.)
|
|
25
|
-
* Batch extraction of waveforms using absolute paths, brace expansions and regular expressions
|
|
26
|
-
* Perform arithmetic operations, bitwise operations, functional operations and other operators on waveform data
|
|
27
|
-
|
|
28
|
-
## Installation
|
|
29
|
-
|
|
30
|
-
### Using pip
|
|
31
|
-
You can install the library using pip:
|
|
32
|
-
|
|
33
|
-
``` bash
|
|
34
|
-
pip install wavekit
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### From Source
|
|
38
|
-
To install the library from the source, follow these steps:
|
|
39
|
-
|
|
40
|
-
Clone the repository:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
git clone https://github.com/cxzzzz/wavekit.git
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Navigate to the project directory:
|
|
47
|
-
``` bash
|
|
48
|
-
cd wavekit
|
|
49
|
-
```
|
|
50
|
-
Install the library using pip:
|
|
51
|
-
|
|
52
|
-
``` bash
|
|
53
|
-
pip install .
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Quick Start
|
|
57
|
-
Here is a simple example demonstrating how to use the library to read a VCD file and perform some operations on the waveform data:
|
|
58
|
-
|
|
59
|
-
``` python
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## License
|
|
63
|
-
This project is licensed under the MIT License. See the [LICENSE] file for details.
|
wavekit-0.1.0/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# wavekit
|
|
2
|
-
|
|
3
|
-
This is a Python library for manipulating and analyzing digital circuit waveforms. The library provides tools to read, process, and perform various operations on waveform data, suitable for various digital circuit simulation and testing scenarios.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
* Read various waveform file formats (e.g., VCD, FSDB, etc.)
|
|
7
|
-
* Batch extraction of waveforms using absolute paths, brace expansions and regular expressions
|
|
8
|
-
* Perform arithmetic operations, bitwise operations, functional operations and other operators on waveform data
|
|
9
|
-
|
|
10
|
-
## Installation
|
|
11
|
-
|
|
12
|
-
### Using pip
|
|
13
|
-
You can install the library using pip:
|
|
14
|
-
|
|
15
|
-
``` bash
|
|
16
|
-
pip install wavekit
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### From Source
|
|
20
|
-
To install the library from the source, follow these steps:
|
|
21
|
-
|
|
22
|
-
Clone the repository:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
git clone https://github.com/cxzzzz/wavekit.git
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Navigate to the project directory:
|
|
29
|
-
``` bash
|
|
30
|
-
cd wavekit
|
|
31
|
-
```
|
|
32
|
-
Install the library using pip:
|
|
33
|
-
|
|
34
|
-
``` bash
|
|
35
|
-
pip install .
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Quick Start
|
|
39
|
-
Here is a simple example demonstrating how to use the library to read a VCD file and perform some operations on the waveform data:
|
|
40
|
-
|
|
41
|
-
``` python
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## License
|
|
45
|
-
This project is licensed under the MIT License. See the [LICENSE] file for details.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|