14 releases (4 breaking)

0.5.5 Apr 23, 2024
0.5.4 Apr 11, 2024
0.5.0 Mar 29, 2024
0.4.0 Mar 29, 2024
0.1.1 Mar 15, 2024

#94 in Template engine

Download history 366/week @ 2024-03-12 377/week @ 2024-03-19 336/week @ 2024-03-26 378/week @ 2024-04-02 164/week @ 2024-04-09 151/week @ 2024-04-23 2/week @ 2024-04-30

344 downloads per month

GPL-3.0-or-later

35KB
711 lines

PyTV

Python Templated Verilog

Crates.io Version docs.rs GitHub

Package

The package pytv is available on crates.io. Documentation is available on docs.rs.

To use the package in a Rust project, run

cargo add pytv

If you want to install the pytv binary, run

cargo install pytv

Features

Python Template

This is the basic feature of this package.

//! a = 1 + 2;            #  Python inline
assign wire_`a` = wire_b; // Verilog with variable/expression substitute
/*!
b = a ** 2;               #  Python block
*/

The magic comment string can be configured (! as default).

Instantiation

The crate feature inst is enabled by default. YAML contents between <INST> and </INST> are used to provide instantiation information.

Author

Teddy van Jerry (Wuqiong Zhao)

Dependencies

~3.5–5.5MB
~95K SLoC