#parser #wire #yosys #cell #attributes #module #rtlil

rtlicious

基于nom的Yosys RTLIL文件解析器

2个版本

0.1.1 2024年5月4日
0.1.0 2024年5月1日

#633 in 文本处理

每月 24 次下载

MIT 许可证

100KB
2.5K SLoC

rtlicious

CI codecov

Nom-based parser for Yosys RTLIL 文本表示.

用法

    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: [],
        },
    },
}

依赖项

~3MB
~64K SLoC