4.Verilog 基础语法
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                4.Verilog 基础语法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                FPGA教程目錄
MATLAB教程目錄
---------------------------------------------------------------------------------------
1.Verilog的注釋方法:
Verilog 中有 2 種注釋方式:
第一種注釋方法是用 // 進(jìn)行單行注釋:
第二種注釋方法是用 /* 與 */進(jìn)行多行注釋
以上一章節(jié)的計數(shù)器為例子,注釋如所示:
`timescale 1ns / 1psmodule count( input i_clk, input i_rst, output reg[9:0]o_count );always @(posedge i_clk or posedge i_rst) beginif(i_rst)begino_count <= 10'd0;end else beginif(o_count == 10'd100)o_count <= 10'd0;elseo_count <= o_count + 10'd1;//計數(shù)器計數(shù),每次增加1end end /* always @(posed總結(jié)
以上是生活随笔為你收集整理的4.Verilog 基础语法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 3.初识Verilog HDL
- 下一篇: 多领导者改进算法的MATLAB仿真
