44 个版本 (11 个重大更新)

新功能 0.12.0 2024年8月21日
0.11.1 2024年7月3日
0.8.1 2024年3月14日
0.5.6 2023年10月19日
0.1.3 2022年12月23日

#2399解析器实现

Download history 173/week @ 2024-05-06 12/week @ 2024-05-13 10/week @ 2024-05-20 185/week @ 2024-05-27 18/week @ 2024-06-03 8/week @ 2024-06-10 161/week @ 2024-06-24 135/week @ 2024-07-01 18/week @ 2024-07-08 1/week @ 2024-07-15 47/week @ 2024-07-29 237/week @ 2024-08-05 28/week @ 2024-08-12

每月312 次下载
3 crate 中使用

MIT/Apache 许可协议

2.5MB
56K SLoC

Veryl

Actions Status Crates.io Changelog

Veryl 是一种现代硬件描述语言。

该项目处于语言设计的探索阶段。如果您有任何想法,请打开 问题

概述

Veryl 是一种基于 SystemVerilog 的硬件描述语言,具有以下优势

优化语法

Veryl 采用针对逻辑设计优化的语法,同时基于对 SystemVerilog 专家熟悉的基礎語法。这种优化包括可综合性的保证,确保仿真结果的一致性,并为常见习惯用法提供众多语法简化。这种方法使学习变得容易,提高了设计过程的可靠性和效率,并促进了代码编写的便利性。

互操作性

考虑到与 SystemVerilog 的互操作性而设计,Veryl 允许与现有的 SystemVerilog 组件和项目无缝集成和部分替换。此外,从 Veryl 转换而来的 SystemVerilog 源代码保持了高度的易读性,实现了无缝集成和调试。

生产力

Veryl 提供了一整套开发支持工具,包括包管理器、构建工具、与主要编辑器(如 VSCode、Vim、Emacs)兼容的实时检查器、自动完成和自动格式化。这些工具加快了开发过程,并显著提高了生产力。

具有这些功能,Veryl 为设计师提供了强大的支持,使他们能够高效、高效地开展高质量的硬件设计。

示例

Veryl SystemVerilog
/// documentation comment by markdown format
/// * list item1
/// * list item2
pub module Delay #( // visibility control by `pub` keyword
    param WIDTH: u32 = 1, // trailing comma is allowed
) (
    i_clk : input clock       ,
    i_rst : input reset       ,
    i_data: input logic<WIDTH>,
    o_data: input logic<WIDTH>,
) {
    // unused variable which is not started with `_` are warned
    var _unused_variable: logic;

    // clock and reset signals can be omitted
    // because Veryl can infer these signals
    always_ff {
        // abstraction syntax of reset polarity and synchronicity
        if_reset {
            o_data = '0;
        } else {
            o_data = i_data;
        }
    }
}
// comment
//
//
module Delay #(
    parameter int WIDTH = 1
) (
    input              i_clk ,
    input              i_rst ,
    input  [WIDTH-1:0] i_data,
    output [WIDTH-1:0] o_data
);
    logic unused_variable;

    always_ff @ (posedge i_clk or negedge i_rst) begin
        if (!i_rst) begin
            o_data <= '0;
        end else begin
            o_data <= i_data;
        end
    end
endmodule

安装

文档

使用

// Create a new project
veryl new [project name]

// Create a new project in an existing directory
veryl init [path]

// Format the current project
veryl fmt

// Analyze the current project
veryl check

// Build target codes corresponding to the current project
veryl build

// Build the document corresponding to the current project
veryl doc

有关详细信息,见 文档

许可证

根据您的选择,许可协议为

贡献

除非您明确说明,否则您根据Apache-2.0许可证定义的工作中故意提交的任何贡献,应按照上述方式双重授权,不附加任何额外条款或条件。

依赖关系

~18–31MB
~393K SLoC