#parser #design #rtlil

rtlicious

A nom-based parser for Yosys RTLIL files

2 releases

0.1.1 May 4, 2024
0.1.0 May 1, 2024

#1024 in Parser implementations

34 downloads per month

MIT license

100KB
2.5K SLoC

rtlicious

CI codecov

Nom-based parser for Yosys RTLIL text representation.

Usage:

    use rtlicious;
    let src =
    r#"module \test
    wire $a
    end
    "#;
    let design = rtlicious::parse(src).unwrap();
    assert_eq!(design.modules().len(), 1);
    dbg!({:?}, design);
> Design {
    autoidx: None,
    modules: {
        "test": Module {
            attributes: {},
            parameters: {},
            wires: {
                "a": Wire {
                    width: 1,
                    offset: 0,
                    input: false,
                    output: false,
                    inout: false,
                    upto: false,
                    signed: false,
                    attributes: {},
                },
            },
            memories: {},
            cells: {},
            processes: {},
            connections: [],
        },
    },
}

Dependencies

~1.4–2.2MB
~46K SLoC