当前位置:主页 > TAG标签 > Verilog-2001
  • 12.Verilog-2001多维数组 日期:2009-12-18 14:55:10 点击:224 好评:2

    Verilog-1995只允许一维数组,而Verilog-2001允许多维数组。 //1-dimensional array of 8-bit reg variables //(allowed in Verilog-1995 and Verilog-2001) reg [7:0] array1 [0:255]; wire [7:0] out1 = array1[address]; //3-dimensional...

  • 11. Verilog-2001算术移位操作 日期:2009-12-18 14:54:21 点击:255 好评:2

    Verilog-2001增加了算术移位操作,在Verilog-1995中只有逻辑移位操作。比如D的初始值为8b10100011,则: D 3 //logical shift yields 8'b00010100 D 3 //arithmetic shift yields 8'b11110100...

  • 10.Verilog-2001有符号运算 日期:2009-12-18 14:52:44 点击:288 好评:2

    在Verilog-1995中,integer数据类型为有符号类型,而reg和wire类型为无符号类型。而且integer大小固定,即为32位数据。在Verilog-2001中对符号运算进行了如下扩展。 Reg和wire变量可以定义为有符...

  • 9.Verilog-2001递归函数和任务 日期:2009-12-18 14:51:37 点击:290 好评:0

    在Verilog-2001中增加了一个新的关键字:automatic。该关键字可以让任务或函数在运行中从新调用该任务和函数。 function automatic [63:0] factorial; input [31:0] n; if (n == 1) factorial = 1; else factorial...

  • 8.Verilog-2001指数运算 日期:2009-12-18 14:50:01 点击:272 好评:6

    Verilog-2001中增加了指数运算操作,操作符为**。 always @(posedge clock) result = base ** exponent;...

  • 6. Verilog-2001使用逗号隔开敏感信号 日期:2009-12-18 14:44:53 点击:102 好评:0

    Verilog-2001中可以用逗号来代替or隔开敏感信号。 Verilog-1995: always @(a or b or c or d or sel) Verilog-2001: always @(a, b, c, d, sel)...

  • 5.Verilog-2001的缺省位扩展 日期:2009-12-18 14:39:25 点击:159 好评:0

    在Verilog-1995中,在不指定基数的情况下为大于32位的变量赋高阻值,只能使其低32位为高阻值,其他高位会被设置为0,此时需要指定基数值才能将高位赋值为高阻。...

  • 4. Reg的定义 日期:2009-12-18 14:37:21 点击:256 好评:0

    在Verilog-1995中定义和初始化reg需要两条语句,而在Verilog-2001中可以合成一条语句。 实例如下: Verilog-1995: reg clock; initial clk = 0; Verilog-2001: reg clock = 0;...

  • 3.Verilog-2001端口定义 日期:2009-12-17 21:46:17 点击:215 好评:-2

    Verilog-2001允许更加灵活的端口定义方式,允许数据类型和端口方向同时定义,语法如下: port_direction data_type signed range port_name, port_name, ... ; 其中,signed是Verilog-2001的一个新增关键字,表...

  • 2.Verilog-2001的模块定义 日期:2009-12-17 21:43:42 点击:253 好评:0

    相比于Verilog-1995,Verilog-2001允许更加灵活的模块定义方式,语法如下: module module_name #(parameter_declaration, parameter_declaration,... ) (port_declaration port_name, port_name,..., port_declaration port_name, po...

推荐内容