网站大量收购闲置独家精品文档,联系QQ:2885784924

电子设计自动化基础-1.ppt

  1. 1、本文档共76页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
电子设计自动化基础-1;内容;Verilog HDL设计入门;例:上升沿D触发器 module dff_pos(data,clk,q); input data,clk; //端口声明 output q; //端口声明 reg q; //数据类型声明 always @(posedge clk) q=data;//电路描述 endmodule;Verilog HDL设计入门;Verilog HDL设计入门;Verilog HDL基础知识;;Verilog HDL基础知识;整数: 17 //位宽, 基数符号不写会采用default值 (32bit十进制) 8’d32 //8-bit十进制值为32 8’h12 //8’ 8’h1A 8’b0001_1100 /* ”_”无特別意义,只是为了方便二进制数易读*/ 8’o37 32’bx // ”x”表unknown 4’b0??? // ”?”表High impedance 实数: 7.2 1.8e-4 //1.8*10-4 9.5E6 .12 2. // illegal;Verilog HDL基础知识;Verilog HDL基础知识;EX1: module MUX_2(out, a, b, sel); output out; input a, b, sel; not U0(sel_, sel); and U1(a1, a, sel_), U2(b1, b, sel); or U3(out, a1, a2); endmodule;EX2: module \2:1MUX (out, a, b, sel); output out; input a, b, sel; not not1 (\~sel , sel); and and1 (a1, a \~sel ), and2 (b1, b, sel); or or1 (out, a1, a2); endmodule ;Verilog HDL基础知识;Verilog HDL基础知识;■ `define `define name macro_text EX: `define ADD 3’h0 `define SUB 3’h1 .... case(opcode) `ADD:.... `SUB:..... endcase ■ `include EX: `include “user_define_task.v” ■ `timescale `timescale time unit/time precision ;EX: `timescale 10ns / 1ps module MUX2(out, a, b, sel); output out; input a, b, sel; not #3 not1(sel_, sel); // delay 3个10ns ... endmodule EX: `timescale 10ns / 1ns module MUX2(out, a, b, sel); output out; input a, b, sel; not #2.63 not1(sel_, sel); /* 2.63*10ns = 26.3ns ... 四舍五入→26ns. delay 26ns */ endmodule;Verilog HDL基础知识;Verilog HDL基础知识;Verilog HDL基础知识;Verilog HDL基础知识;wire out;// tri out;;tri0 out;;两个 cell 的 output 相连接时:;Verilog HDL基础知识;Verilog HDL基础知识;Verilog HDL基础知识;在使用数据类型时要注意下列几点: (1)在电路外部一个 input port 可以用 net 或 reg 来驱动,而进到电路内部这个 input port 只能是net类型。 (2)在电路内部一个 output port 可以为 net 或 register 类型,而在电路外部output port 只能是 net类型。 (3)无论在电路内外,一

文档评论(0)

junjun37473 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档