12 'H83a 8'b1100_ 0001 64'hff01 9'O17 32'bz01x 3’b1010_ 1101 6.3 32e- 4 4.1E3
unsized decimal (zero-extended to 32 bits) unsized hexadecimal (zero- extended to 32 bits) 8-bit binary 64-bit hexadecimal (zero- extended to 64 bits) 9-bit octal Z-extended to 32 bits 3-bit number, truncated to 3’b101 decimal notation scientific notation for 0.0032 scientific notation for 4100
4
语言的主要特点—module ports
端口等价于硬件 的引脚(pin) 端口在模块名字 后的括号中列出
端口可以说明为 input, output及 inout
注意模块的名称DFF,端口列表及说明 模块通过端口与外部通信
5
语言的主要特点
模块实例化(module instances)
module DFF (d, clk, clr, q, qb); .... endmodule
23
模块实体引用方法一
module CLK_I_gen ( inclk0, pllena, areset, c0, lock); CLK_I_gen U0 (mclk,1‘b1,RESETN,CLK_I,lock); 缺点:程序结构比较混乱,不直观,不利于debug。 虽然编写很简单,但不约定