【system verilog for design】verilog 1995/2001/system verilog标准语法的一些演进

简介: 【system verilog for design】verilog 1995/2001/system verilog标准语法的一些演进

前言

最近在学习一些verilog/system verilog for design的基础知识,觉得有些东西总结总结还是挺好的,毕竟好记性不如烂键盘;

正文开始

verilog有1995和2001两个标准,之后便合入到system verilog标准中了,因此结合最近看的课总结一下语法的演进;

verilog-1995

module parameter function task always @
assign wire reg + = * / % << >>
$finish $fopen $fclose $display $write
$monitor `define `ifdef `else `endif `include `timescale
initial disable events wait # @
fork-join intrger real time packed array
2D reg/memory

感觉verilog-1995起点极高,for design已经基本覆盖常用的几句语法;但是for verification目测只能构造定向测试,还没有独立做随机环境的能力;

verilog-2001新增

generate localparam constant function @(*) ANSI C style ports
standard file I/O $value$plusargs `ifndef `elsif `line
** multi dimensional array signed type automatic

显然2001的语法主要变化是代码风格的变化,C style接口风格、generate、多维阵列引入,这感觉就到了~~~不过对于verification貌似推进不大,憋大招中,毕竟马上就断更verilog标准了;

`line这个语法我不懂,看描述是

In many cases, however, the SystemVerilog source is preprocessed by some other tool, and the line and file

information of the original source file can be lost.

The `line compiler directive can be used to specify the original source code line number and file name.

For example:

`line 3 "orig.v" 2

// This line is line 3 of orig.v after exiting include file

emmmm没用过,应该是手动来标记原始文件代码坐标的代码,用处我觉得不大;

SystemVerilog IEEE 1800 新增

interface modport program virtual import
export pure context DPI package
bind logic bit byte shortint
longint int void shortreal packed
unpacked dynamic queue const alias
type var string unique priority
do while foreach return break continue
finial iff always_comb always_latch always_ff
join_any join_none wait fork rand randc dist with
constraint_mode randsequence semaphore mailbox assert
assume cover property sequence within/...
##N clocking covergroup bins cast
class new statci extend super

 

从system verilog标准开始,整体变化极大,system verilog作为verilog的超集,感觉上是想大幅提升RTL代码的抽象程度以及减少对底层的感知,引入interface/logic/var/always_comb/always_latch/always_ff/unique case/priority case以及结构体struct等一系列结构和语法,但是怎么说呢,个人觉得除了interface和packed struct能大幅增加代码的可阅读型以及减少代码量外,其他的语法感知不强;

但是对于验证维度来说,system verilog终于拯救了大家,oop曙光终将照耀大地~covergroup、assert、rand的引入逐步开始拓展出了随机验证,以至后面VMM/OVM/UVM的验证方法学。


相关文章
|
3月前
|
存储 编译器 索引
Verilog基础【一】
Verilog基础【一】
93 0
|
2月前
|
存储 C语言
【学习笔记】verilog HDL之二:数据类型与表达式
本文介绍了Verilog语言中的常量、变量和表达式。Verilog有四种基本值:0、1、x(未知)和z(高阻)。整型常量有十进制和基数两种格式,实数型常量包括浮点数,字符串常量由双引号括起的字符序列构成。变量分为线网型和寄存器型,线网型包括wire、tri等11种类型,寄存器型有reg、integer、time等,其中reg可声明存储器。表达式中的操作数包括常数、参数、线网等8种类型,操作符包括算术、关系、逻辑等9种类型。
|
3月前
|
存储 人工智能 安全
Verilog基础【二】
Verilog基础【二】
111 1
|
存储 芯片
快速入门数字芯片设计,UCSD ECE111(三)System Verilog时序逻辑(下)
快速入门数字芯片设计,UCSD ECE111(三)System Verilog时序逻辑(下)
80 0
|
存储 芯片 异构计算
快速入门数字芯片设计,UCSD ECE111(三)System Verilog时序逻辑(上)
快速入门数字芯片设计,UCSD ECE111(三)System Verilog时序逻辑
88 0
|
算法
如何将算法翻译成RTL(三):Verilog中的Signed本质及用法
如何将算法翻译成RTL(三):Verilog中的Signed本质及用法
188 0
|
算法 关系型数据库 MySQL
FPGA:Verilog HDL程序的基本结构
FPGA:Verilog HDL程序的基本结构
147 0
FPGA:Verilog HDL程序的基本结构
|
开发工具 芯片 异构计算
Verilog 设计方法
Verilog 的设计多采用自上而下的设计方法(top-down)。即先定义顶层模块功能,进而分析要构成顶层模块的必要子模块;然后进一步对各个模块进行分解、设计,直到到达无法进一步分解的底层功能块。这样,可以把一个较大的系统,细化成多个小系统,从时间、工作量上分配给更多的人员去设计,从而提高了设计速度,缩短了开发周期。
136 1
|
存储 程序员 开发工具
第三章 硬件描述语言verilog(一)
第三章 硬件描述语言verilog(一)
362 0
第三章 硬件描述语言verilog(一)
|
自然语言处理 算法 异构计算
Verilog HDL基本语法规则
本专栏针对FPGA进行入门学习,从数电中常见的逻辑代数讲起,结合Verilog HDL语言学习与仿真,主要对组合逻辑电路与时序逻辑电路进行分析与设计,对状态机FSM进行剖析与建模。
214 0
Verilog HDL基本语法规则