Difference between RTL and Behavioral verilog

原文链接:https://electronics.stackexchange.com/questions/63682/difference-between-rtl-and-behavioral-verilog

Answer 1

ehavioral code is higher-level and usually can’t be synthesized. Constructs like loops, delays, and “initial” statements are behavioral.

RTL code is lower-level and is intended to be synthesized. It defines a circuit as a combination of interconnected registers and the operations performed on signals between those registers.

Taken from Yahoo Answers and found immediately with Google!

Answer 2

“Register transfer level” code is code described in terms of registers and combinatorial logic that sits between them and intended to be used as input to a synthesis tool. The code sticks to a synthesizable subset[1] of the language. There are no explicit delays, all timing is in terms of clock edges. Structures representing level triggered latches are generally avoided. Registers are typically clocked off a small number of clocks whose details can be given to the timing analyser. The combinatorial logic is usually expected[2] to settle within a single clock cycle which limits it’s complexity. It’s higher level than a gate level model but it still defines what value every register has on every clock cycle.

“behavioural” code is generally code that describes behviour at a higher level for use in a simulation but it not intended to be synthsizable. It may be used to describe the environment surrounding your design in a simulation. It may be used as an early step in a design to get the overall design in place before detailed RTL design of the individual modules is overtaken.

[1] The exact subset allowed varies between synthesis tools.
[2] If it doesn’t settle within a single cycle than simulation and synthisis may give different results and the timing analyser will show a violation unless it’s explicitly told not to.

Answer 3

Behavioral Code: By definition it defines the behavior of a digital component. It does not give information how it will be implemented into actual HW (synthesis). It will not give information how registers and gates will be implemented to perform required operation. It is more like writing an algorithm or FSM in C.

RTL: It is more precise form of a digital component. It gives information, how code will be implemented as actual HW (after synthesis). Also it gives information how data will be transferred between registers and gates.

Answer 4

It’s the same language, but different styles are used. With experience you can tell them apart quickly, here’s a few traits of each:

Behavioural verilog code generally looks more like a sequential computer program running from top to bottom within an initial begin block. You may find there are no input/output ports defined in top level behavioural modules, since the output may be to simulator facilities, like the console $display() or filesystem with $open or waveform dumper with $dumpfile and $dumpvars. Watch for delays between statements implemented using long simulation time waits e.g. #4000 and invoking tasks wishbone_master.checked_read(addr, value). For these higher level constructs is it not obvious what the synthesised technology equivalent would/could be.

Verilog for synthesis always has input/output ports, as without connected ports the module has no side effects and can be eliminated [1]. Delays probably implemented by counting cycles of some particular clock. Note some Verilog system functions e.g. $clog2(PARAMETER) may be permitted in code for synthesis, so the presence of $function is not a guarantee either way. Code for synthesis tends to comprise many of independent ‘processes’ each with a sensitivity list. Some technologies do permit initial begin blocks for memory initialisation so again that is not a guarantee.

Ultimately the designer knows the purpose of the code they write and will appropriately invoke it with the synthesis toolset or in a simulator.

[1] except for certain IP blocks which may make back-door connections to internal chip facilities, e.g. JTAG

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
RTL8211EG是一款高性能的千兆以太网物理层转换器,它能够将数据信号从MAC控制器传送到物理媒介来实现网络通信。为了让RTL8211EG与处理器进行通信,需要针对它进行驱动程序开发。 Verilog是一种硬件描述语言,用于设计数字电路。在编写RTL8211EG的驱动程序时,需要使用Verilog来描述驱动程序的功能和实现。驱动程序的主要功能是将数据从处理器传送到RTL8211EG,并将RTL8211EG接收到的数据传送回处理器。 驱动程序的实现通常包括以下几个模块: 1.时钟模块:该模块主要用于生成时钟信号,用来同步数据的传输。时钟信号需要根据RTL8211EG的时钟特性进行配置。 2.发送模块:该模块负责将数据从处理器传送到RTL8211EG。发送模块需要实现数据的编码、帧的组装和发送等功能。 3.接收模块:该模块负责将RTL8211EG接收到的数据传送回处理器。接收模块需要实现数据的解码、帧的拆解和处理等功能。 在开发RTL8211EG的Verilog驱动程序时需要考虑多种因素,如时钟频率、数据传输速率、帧格式以及通信协议等。同时,需要对不同的处理器、操作系统及网络协议进行适配和优化,以保证驱动程序的稳定性、可靠性和性能。 总之,开发RTL8211EG的Verilog驱动程序需要深入了解硬件电路和数字电路设计,同时需要对网络通信相关的知识有一定的了解。只有将硬件和软件结合起来,才能开发出高效、可靠的驱动程序。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值