Department of E lectronic E ngineering, N otional C hin-Yi U niversity of T echnology Introduction to Verilog HDL Ping-Liang Lai ( 賴秉樑 ) VLSI Testing 積體電路測試.

Slides:



Advertisements
Similar presentations
11-0 Latches and Flip-Flops © Cengage Learning, Engineering. All Rights Reserved. 1-0 UNIT 11.
Advertisements

FCU, Department of ECE, IC Design Research Lab. TEL: # 4945 Pre-SIm , Post-Sim.
Divide-and-Conquer. 什麼是 divide-and-conquer ? Divide 就是把問題分割 Conquer 則是把答案結合起來.
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
Introduction to Java Programming Lecture 13 Classes I OO Programming.
第七章 抽樣與抽樣分配 蒐集統計資料最常見的方式是抽查。這 牽涉到兩個問題: 抽出的樣本是否具有代表性?是否能反應出母體的特徵?
:Word Morphing ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10508:word morphing 解題者:楊家豪 解題日期: 2006 年 5 月 21 日 題意: 第一行給你兩個正整數, 第一個代表下面會出現幾個字串,
第二章 太陽能電池的基本原理 及其結構 2-1 太陽能電池的基本原理 2-2 太陽能電池的基本結構 2-3 太陽能電池的製作.
Advanced Chemical Engineering Thermodynamics
3Com Switch 4500 切VLAN教學.
PowerPoint2010 李燕秋 版面配置 版面配置指的是每一個頁面的內容配置 方式,不同的版面配置會有對應的母片。
如何將數字變成可用之資訊 現代化資料處理與應用概念. 如何將數字變成可用之資訊 人最容易接受的訊息是圖像化資訊。 在一堆數字中,要進行比較分析,一般會使用表格形 式計算與分析。 所以一般我們會將數字依關聯性, 轉換成表格計算與分析。 此表格一般稱試算表或稱表格。 再將結果轉換為圖表,進行比較與分析。
小綠人行人用交通號誌燈 指導教授:黃朝章 學生:951408陳宜歆 徐祐祥.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 參 實驗法.
亂數產生器安全性評估 之統計測試 SEC HW7 姓名:翁玉芬 學號:
1 Chapter 11 Verilog 硬體描述語言 Verilog 硬體描述語言的基本架構 Verilog 模組描述的基本格式 如何開啟進入 Verilog 硬體描述語言編輯器 Verilog 的描述格式 Verilog 的資料型態 Verilog 的事件基礎時間控制 Verilog 的輸入輸出埠描述.
1.1 電腦的特性 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。
STAT0_sampling Random Sampling  母體: Finite population & Infinity population  由一大小為 N 的有限母體中抽出一樣本數為 n 的樣 本,若每一樣本被抽出的機率是一樣的,這樣本稱 為隨機樣本 (random sample)
1. 假設以下的敘述為一未提供 “ 捷徑計算 ” 能力的程式段,試用程 式設計的技巧,使此敘述經此改 寫的動作後,具有與 “ 捷徑計算 ” 之 處理方法相同之處理模式。 if and then E1 else E2 endif.
Structural Equation Modeling Chapter 7 觀察變數路徑分析=路徑分析 觀察變數路徑分析.
推 Seaka: 原來數位邏輯也要上機? 0 0" /04 推 tlyeh: 工程師 什麼都要上ㄚ ( 不要亂想 ) 十八般 武藝 都要使得出來ㄚ 沒看到 我電工木工 水泥工金工化工生醫 ? 平常都得用出來ㄚ /05 → tlyeh: 學會了.
2009fallStat_samplec.i.1 Chap10 Sampling distribution (review) 樣本必須是隨機樣本 (random sample) ,才能代表母體 Sample mean 是一隨機變數,隨著每一次抽出來的 樣本值不同,它的值也不同,但會有規律性 為了要知道估計的精確性,必需要知道樣本平均數.
長訊科技 EVRCOM Voice Mail System 使用者操作說明及流程. 自動總機 -- 來電語音轉接服務流程 ( 範例流程 )
第 7 章 程序與函數 7-1 模組化程式設計 7-1 模組化程式設計 7-2 VB.NET 的程序與函數 7-2 VB.NET 的程序與函數 7-3 程序與函數的變數範圍 7-3 程序與函數的變數範圍 7-4 VB.NET 常用的內建函數 7-4 VB.NET 常用的內建函數 7-5 遞迴函數 7-5.
第 1 章 PC 的基本構造. 本章提要 PC 系統簡介 80x86 系列 CPU 及其暫存器群 記憶體: Memory 80x86 的分節式記憶體管理 80x86 的 I/O 結構 學習組合語言的基本工具.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
微帶線濾波器 國立聯合大學 電機工程學系 主講人 : 徐振剛 何奕叡. 目 錄  設計程序理論說明  1. 微波諧振電路  2. 傳輸線特性  3.Chebyshev filter & Butterworth filter  4. 傳輸線殘段設計濾波器和步階阻抗式低通濾波器  設計模型.
最新計算機概論 第 5 章 系統程式. 5-1 系統程式的類型 作業系統 (OS) : 介於電腦硬體與 應用軟體之間的 程式,除了提供 執行應用軟體的 環境,還負責分 配系統資源。
3-3 使用幾何繪圖工具 Flash 的幾何繪圖工具包括線段工具 (Line Tool) 、橢圓形工具 (Oval Tool) 、多邊星形 工具 (Rectangle Tool) 3 種。這些工具畫出 來的幾何圖形包括了筆畫線條和填色區域, 將它們適當地組合加上有技巧地變形與配 色, 不但比鉛筆工具簡單,
Chapter 20 塑模動態觀點:狀態圖 Statechart Diagram. 學習目標  說明狀態圖的目的  定義狀態圖的基本記號  展示狀態圖的建構  定義活動、內部事件及遞延事件的狀態 圖記號.
第二章 供給與需求 中興大學會計學系 授課老師:簡立賢.
CH 15- 元件可靠度之驗證  驗證方法  指數模式之可靠度驗證  韋式模式之可靠度驗證  對數常態模式之可靠度驗證  失效數為零時之可靠度估算  各種失效模式之應用.
資料庫程式設計與系統管理 SQL Server 2005 Express 第六章 進階資料庫設計.
6-2 認識元件庫與內建元件庫 Flash 的元件庫分兩種, 一種是每個動畫專 屬的元件庫 (Library) ;另一種則是內建元 件庫 (Common Libraries), 兩者皆可透過 『視窗』功能表來開啟, 以下即為您說明。
Feature Motion for Monocular Robot Navigation. 單視覺機器人 – 追蹤 (tracking) 最常見的機器人導航技術 特徵點特性(特別 匹配性 抗破壞性) 特徵點取得(區塊 尺度不變)
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2008.
: Beautiful Numbers ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11472: Beautiful Numbers 解題者:邱經達 解題日期: 2011 年 5 月 5 日 題意: 若一個 N 進位的數用到該.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
Analyzing Case Study Evidence
Image Interpolation Use SSE 指導教授 : 楊士萱 學 生 : 楊宗峰 日 期 :
資料結構實習-二.
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Structural Equation Modeling Chapter 6 CFA 根據每個因素有多重指標,以減少 測量誤差並可建立問卷的構念效度 驗證性因素分析.
Chapter 10 m-way 搜尋樹與B-Tree
網路介紹及其運用 講師陳炯勳. 5-2 IP 協定 ( 一 ) IP 協定運作 (1) – 網路成員:主機 (Host) 與路由器 (Router) – 路由表 – 電報傳輸運作.
Probability Distribution 機率分配 汪群超 12/12. 目的:產生具均等分配的數值 (Data) ,並以 『直方圖』的功能計算出數值在不同範圍內出現 的頻率,及繪製數值的分配圖,以反應出該 機率分配的特性。
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2009.
計算機概論 第6章 數位邏輯設計.
5 重複迴圈 5.1 增減運算符號 增量運算符號 減量運算符號
連續隨機變數 連續變數:時間、分數、重量、……
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 壹 企業研究導論.
函式 Function 東海大學物理系‧資訊教育 施奇廷. 函式簡介 當程式越來越大、越複雜時,程式的維護、 除錯會變得更困難,此時必須引入函式來 簡化程式或將程式分段,將程式重複的部 分改寫為函式,將程式「模組化」 這種作法有下列優點:節省程式發展的時 間、邏輯容易瞭解、程式容易除錯、可分 工合作完成程式.
指導教授 : 林啟芳 教授 組員 : 邱秉良 林育賢. 何謂 GPS  GPS 即全球定位系統,是一個中距離圓 型軌道衛星導航系統。它可以為地球表面 絕大部分地區( 98% )提供準確的定位、 測速和高精度的時間標準。
Visual C++重點複習.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2008.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2010.
幼兒行為觀察與記錄 第八章 事件取樣法.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2009.
1 Chemical and Engineering Thermodynamics Chapter 1 Introduction Sandler.
CH 14-可靠度工程之數學基礎 探討重點 失效時間之機率分配 指數模式之可靠度工程.
第 1 章 PC 的基本構造. 本章提要 PC 系統簡介 80x86 系列 CPU 及其暫存器群 記憶體: Memory 80x86 的分節式記憶體管理 80x86 的 I/O 結構 學習組合語言的基本工具.
VHDL語法(3).
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
Registers(暫存器)與Counters(計數器):
數位系統實驗 Experiment on Digital System Lab06: Verilog HDL and FPGA (2) 負責助教:葉俊顯 stanley.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Pp 92 Parity Method Pp 94 The parity method.
6-1 基本加法器 6-2 平行二進位加法器 6-3 比較器 6-4 解碼器 6-5 編碼器 6-6 數碼轉換器 6-7 多工器 ( 資料選擇器 ) 6-8 解多工器 6-9 同位元產生器 / 檢 查器.
1 Chap. 7 Response of First-Order RL and RC Circuits Contents 7.1 The Natural Response of an RL Circuit 7.2 The Natural Response of an RC Circuit 7.3 The.
Presentation transcript:

Department of E lectronic E ngineering, N otional C hin-Yi U niversity of T echnology Introduction to Verilog HDL Ping-Liang Lai ( 賴秉樑 ) VLSI Testing 積體電路測試

P.L.Lai, VLSI Testing 2009 Appendix 1-2 Outline Introduction Modules and Instance Design Block and Stimulus Block Four Levels of Abstraction  Gate-Level Modeling  Dataflow Modeling  Behavioral Modeling  Switch-Level Modeling Lexical Conventions

P.L.Lai, VLSI Testing 2009 Appendix 1-3 Introduction Hardware description language Mixed level modeling Single language for design and simulation Built-in primitives, logic function User-defined primitives Built-in data types High-level programming constructs

P.L.Lai, VLSI Testing 2009 Appendix 1-4 Modules A module can be an element or a collection of lower-level design block module ( ) … … endmodule module T_FF (q, clk, reset); … … endmodule Syntax: Example:

P.L.Lai, VLSI Testing 2009 Appendix 1-5 Instances // Define the top-level module called ripple carry counter. It // instantiates 4 T-flipflops. module ripple_carry_counter (q, clk, reset) output [3:0] q;// I/O signals and vector declarations input clk, reset; // I/O signals T_FF tff0 (q[0], clk, reset); T_FF tff1 (q[1], q[0], reset); T_FF tff3 (q[2], q[1], reset); T_FF tff4 (q[3], q[2], reset); endmodule module T_FF (q, clk, reset); output q; input clk, reset; wire d; D_FF dff0 (q, d, clk, reset);// Instantiate D_FF. Call it dff0. not n1 (d, q);// not gate is a Verilog primitive. endmodule

P.L.Lai, VLSI Testing 2009 Appendix bit Ripple Carry Counter q0q1 q2 q3 clock reset T_FF qqqq Ripple Carry Counter clock T_FF D_FF q q d reset ckqnqn+1 1*10 1*00 0↓01 0↓10

P.L.Lai, VLSI Testing 2009 Appendix 1-7 Design Block and Stimulus Block Two styles of stimulus application  Stimulus block instantiates design block  Dummy top-level module d_clk d_reset c_q clk reset q Top-Level Block Stimulus Block Design Block clk reset q (Stimulus block) Design Block Fig. 1. Stimulus block instantiates design block Fig. 2. Stimulus and design blocks instantiated in a Dummy top-level module

P.L.Lai, VLSI Testing 2009 Appendix 1-8 Design Block module ripple_carry_counter (q, clk, reset); output [3:0] q; input clk, reset; T_FF tff0 (q[0], clk, reset); T_FF tff1 (q[1], q[0], reset); T_FF tff3 (q[2], q[1], reset); T_FF tff4 (q[3], q[2], reset); endmodule module T_FF (q, clk, reset); output q; input clk, reset; wire d; D_FF dff0 (q, d, clk, reset); not n1 (d, q); endmodule module D_FF (q, d, clk, reset); output q; input d; input clk; input reset; reg q; (posedge reset or negedge clk) if (reset) q = 1'b0; else q = d; endmodule Example: Ripple Carry Counter Top Block Flip-flop T_FF Flip-flop D_FF

P.L.Lai, VLSI Testing 2009 Appendix 1-9 Stimulus Block module rcc_testbench; reg clk; reg reset; wire [3:0] q; ripple_carry_counter r1 (q, clk, reset); initial clk = 1'b0; always #5 clk = ~clk; initial begin reset = 1'b1; #15 reset = 1'b0; #180 reset = 1'b1; #10 reset = 1'b0; #20 $finish; end initial $monitor($time, "Output q = %d", q); endmodule

P.L.Lai, VLSI Testing 2009 Appendix 1-10 Four Levels of Abstraction Behavioral level  只考慮模組中的功能和函數,不必考慮硬體的特性,如同是在寫 C語言一樣 Dataflow level  說明資料如何在暫存器中儲存和傳送,和資料處理的方式 Gate level  模組是由Logic gates所構成的,使用Logic gates來設計電路 Switch level  最低層次,設計者需知道電晶體的元件特性

P.L.Lai, VLSI Testing 2009 Appendix 1-11 Gate level

P.L.Lai, VLSI Testing 2009 Appendix 1-12 Behavioral module Beh_AND ( in1, in2, Out) input in1, in2 ; output Out ; reg Out ; ( in1 or in2 ) begin Out = in1 & in2 end endmodule

P.L.Lai, VLSI Testing 2009 Appendix 1-13 Data Flow module DF_AND ( in1, in2, Out) input in1, in2 ; output Out ; wrie Out ; assign Out = in1 & in2 ; endmodule

P.L.Lai, VLSI Testing 2009 Appendix 1-14 四種準位數值 0 1 X : 不確定 Z : 高阻抗

P.L.Lai, VLSI Testing 2009 Appendix 1-15 Operators (1/3) Binary Operator  ~ NOT  & AND  | OR  ^ XOR  ~^ XNOR Example  a= ~ b ; // not » If b= 4’b0010, then a= 4’b1101  a= b & c; // and » If b= 4’b0011, c=4’b1010, then a= 4’b0010

P.L.Lai, VLSI Testing 2009 Appendix 1-16 Operators (2/3) Example  a= b | c; // or » If b= 4’b0011, c= 4’b1010, then a= 4’b1011  a= b ^ c; // and » If b= 4’b0011, c= 4’b1010, then a= 4’b1001

P.L.Lai, VLSI Testing 2009 Appendix 1-17 Operators (3/3) Unary operator  a=~b; Ternary operator  a=b ? c : d;

P.L.Lai, VLSI Testing 2009 Appendix 1-18 常用敘述 assign  驅動某個值到 wire, wand, wor,tri  用於資料處理模型 Data Flow Model Always  可隨時監督外界輸出入port,訊號有變化時即告訴模組內部配合相對應的 工作 wire a,b, c; // 宣告三個接線型態的變數 assign a= b & c; // a = b and c or b) begin f=a&b&c; end

P.L.Lai, VLSI Testing 2009 Appendix 1-19 常用敘述 always example // posedge 正緣觸發 (posedge clock) begin … end // negedge 負緣觸發 (negedge clock) begin … end

P.L.Lai, VLSI Testing 2009 Appendix 1-20 常用敘述 wire  接線是連接硬體元件之連接線  接線必須被驅動才能改變它內函值  內定為一個位元值 z reg  暫存器  功能與變數很像,可以給定一個數值,主要功能在保持住電路中某 個值,不必像(wire)要被驅動才能改變它的內函值  內定為一個位元值 x

P.L.Lai, VLSI Testing 2009 Appendix 1-21 選用wire 或 reg 時機 wire 必須配合 assign 來使用,且不能出現在always區塊 描述裡 reg 必須放在always區塊描述裡 wire a, b, c; assign a&c; input [3:0] a, b; output [3:0] c; reg [3:0] c; (a or b) begin c=a+b; end

P.L.Lai, VLSI Testing 2009 Appendix 1-22 基本單位-port 與module外部的信號溝通 分為輸出(output) 、輸入(input)、雙向(inout) 如果你只有宣告input, output, inout則將被視為是wire的型態。 如果想要維持信號到下一個clock,則需要宣告成reg的型態(序向邏 輯電路會用到)  Example Vector (向量)  wire和reg皆可宣告成向量  Example output q; reg q;//這樣才可以儲存資料 wire [7:0] a; //8-bit a變數 reg [40:0] address; //41-bit address變數