- 6
- 0
- 约 68页
- 2016-11-06 发布于湖北
- 举报
2、Verilog HDL语言基础 2.7 行为级建模 时序控制 分为:延时控制 和 事件控制 延时控制: #5 a = b; 事件控制: @( a or b or c) 等价 @( a , b , c) @(posedge clk ) 2、Verilog HDL语言基础 2.7 行为级建模 流控制 流控制语句包括:跳转、分支和循环语句 if语句 if ( ) else if( ) else case语句 case ( ) casex( ) casez( ) 表达式:声明; default: 声明; endcase endcase endcase 循环语句 for () 、 while()、 forever、repeat 2、Verilog HDL语言基础 2.7 行为级建模 task任务 声明:task………endtask module fpga_train(); always @( posedge clk1 ) begin and_operation( ab_and , a , b); //变量的指定必须按照定义的顺序! end always @( posedge clk2 ) begin and_operation( cd_and , c , d); end task automatic and_operation; //自动任务 output ab_and_inst; input a_inst, b_inst; begin ab_and_inst = a_inst b_inst; end endtask; endmodule 2、Verilog HDL语言基础 2.7 行为级建模 function任务 module fpga_train(); always @( posedge clk1 ) begin c = and_operation( a , b); end function automatic [ 7 : 0] and_operation; //自动函数,生成一个名为函数标识符的寄存器变量 input a_inst, b_inst; begin and_operation = a_inst b_inst; end endfunction; endmodule 2、Verilog HDL语言基础 2.7 行为级建模 task和function的区别 1、函数至少有一个输入变量,任务不定。 2、函数必须有一个返回值。任务不返回值,可通过OUT变量传递值。 3、函数不能包含延迟、事件、时序控制,任务可包含。 4、函数可调用函数,不能调用任务。任务可调用任务和函数。 Translate Map Place Route Plan Budget HDL RTL Simulation Synthesize to Create Netlist Functional Simulation CreateBIT File Attain Timing Closure Timing Simulation Implement Create Code/ Schematic 3、如何使用ISE开发环境 3.1 ISE开发流程 Project Navigator windows Sources Processes Summary Working Message 3、如何使用ISE开发环境 3.2 ISE交互窗口 Select File ? New Project New Project Wizard guides you through the proce
您可能关注的文档
最近下载
- 2025年陕西省中考数学真题试卷含答案.pdf VIP
- 一年级英语寒假作业.pdf VIP
- 微生物技术 走进微生物世界 微生物技术—走进微生物世界.pptx VIP
- 《植物组织培养》课程教学大纲(本科).pdf VIP
- 2025年重庆市公务员省考《行测》联考真题(含答案).pdf VIP
- 2026年一年级英语【寒假作业】.docx VIP
- 抽象函数的单调性.doc VIP
- 2025年重庆市公务员考试行测真题及答案详解(最新).docx VIP
- 2025年特许金融分析师私募股权投资中的公司尽职调查专题试卷及解析.pdf VIP
- 2025年金融风险管理师久期与债券流动性风险的交互影响专题试卷及解析.pdf VIP
原创力文档

文档评论(0)