Arch:一种面向AI的硬件描述语言用于寄存器传输时钟硬件设计
Arch: An AI-Native Hardware Description Language for Register-Transfer Clocked Hardware Design
AI总结:
Arch是一种面向AI的硬件描述语言,用于微架构规格和AI辅助代码生成,通过参数化时钟和复位类型,提供类型安全的硬件描述方法,支持多种硬件结构,提升设计可靠性。
摘要:
我们介绍了Arch(AI-native Register-transfer Clocked Hardware),一种用于微架构规格和AI辅助代码生成的硬件描述语言。Arch提供了流水线、有限状态机、FIFO、仲裁器、寄存器文件、带有握手通道的总线、时钟域跨越和多周期线程等结构,这些结构现有的HDLs只能通过用户定义的模式表达,容易产生微妙的错误。一个核心设计选择是将时钟和复位参数化为类型(Clock<D>, Reset<S,P,D?>),而不是普通的网络,将CDC和复位域分析从外部lint检查器传递转换为编译时的类型规则。位宽、端口方向、单驱动所有权和组合非循环性在同一过程中跟踪,能够在模拟之前捕捉到锁存器、宽度不匹配、循环和未同步跨越。在寄存器声明上的守卫子句捕捉到有效的数据模式,捕捉到生产者错误,即在数据写入之前有效标志被断言。每一个语法选择都由AI生成性合同所规定:一个LL(1)文法、无预处理器、统一的声明方案、命名块结尾、以及todo!逃生口让LLM从自然语言规格中生成结构正确、类型安全的Arch代码,而无需微调。编译器生成lint干净的IEEE 1800-2017 SystemVerilog,并自动产生安全属性(FIFO无溢出、计数器范围、FSM合法状态、握手协议)并通过Verilator--assert和EBMC验证,以及通过arch formal直接AST到SMT-LIB2有界模型检查。集成模拟器将设计编译为原生C++,并支持Python cocotb。案例研究:L1缓存和AXI DMA(Yosys/OpenSTA,Sky130);428/431个测试在VerilogEval和CVDP上通过。
英文摘要:
We present Arch (AI-native Register-transfer Clocked Hardware), a hardware description language for micro-architecture specification and AI-assisted code generation. Arch provides first-class constructs for pipelines, FSMs, FIFOs, arbiters, register files, buses with handshake channels, clock-domain crossings, and multi-cycle threads -- structures that existing HDLs express only as user-defined patterns prone to subtle errors. A central design choice is that clocks and resets are parameterized types (Clock<D>, Reset<S,P,D?>) rather than ordinary nets, converting CDC and reset-domain analysis from external linter passes into compile-time typing rules. Bit widths, port directions, single-driver ownership, and combinational acyclicity are tracked in the same pass, catching latches, width mismatches, loops, and unsynchronized crossings before simulation. A guard clause on reg declarations captures the valid-data pattern declaratively, catching the producer bug where a valid flag asserts before data is written. Every syntactic choice is governed by an AI-generatability contract: an LL(1) grammar, no preprocessor, a uniform declaration schema, named block endings, and a todo! escape hatch let LLMs produce structurally correct, type-safe Arch from natural-language specs without fine-tuning. The compiler emits lint-clean IEEE 1800-2017 SystemVerilog and auto-generates safety properties (FIFO no-overflow, counter range, FSM legal-state, handshake protocol) verified with Verilator -- assert and EBMC, plus direct AST-to-SMT-LIB2 bounded model checking via arch formal. An integrated simulator compiles designs to native C++ with Python cocotb support. Case studies: L1 cache and AXI DMA (Yosys/OpenSTA, Sky130); 428/431 tests pass on VerilogEval and CVDP.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。