Verilog HDL による回路設計記述

Similar documents
VelilogHDL 回路を「言語」で記述する

untitled

2.5. Verilog 19 Z= X + Y - Z A+B LD ADD SUB ST (X<<1)+(Y<<1) X 1 2 LD SL ST 2 10

LSI LSI

VLD Kazutoshi Kobayashi

電卓の設計 1


untitled

Microsoft PowerPoint - 集積回路工学_ ppt[読み取り専用]

スライド 1

DELPHINUS EQUULEUS 2019 NASA SLS FPGA ( ) DELPHINUS 2

PLDとFPGA

VHDL

Microsoft PowerPoint - 01-VerilogSetup-2018.pptx

ディジタル電子回路 設計演習課題

Microsoft PowerPoint - 01_Vengineer.ppt

計数工学実験/システム情報工学実験第一 「ディジタル回路の基礎」

main.dvi

Microsoft PowerPoint - Lec pptx

1, Verilog-HDL, Verilog-HDL Verilog-HDL,, FPGA,, HDL, 11, 1 (a) (b) (c) FPGA (d) 2 10,, Verilog-HDL, FPGA, 12,,,, html % netscape file://home/users11/

1: ITT-2 DDR2 1.8V,.V(F) Config. Mem. JTAG XCFPV048 LEDs SWs Clock (VariClock) DDR2 DDR2 DDR2 FPGA XC5VFX0T General-Purpose LEDs SWs XTAL (2.68kHz) MC

Microsoft PowerPoint - 01-VerilogSetup-2019.pptx

( )

Unconventional HDL Programming ( version) 1

Design at a higher level

if clear = 1 then Q <= " "; elsif we = 1 then Q <= D; end rtl; regs.vhdl clk 0 1 rst clear we Write Enable we 1 we 0 if clk 1 Q if rst =

, FPGA Verilog-HDL

VHDL VHDL VHDL i

Kazutoshi Kobayashi (kobayasi kit.ac.jp)

デジタル回路入門

LSI LSI 2

デザインパフォーマンス向上のためのHDLコーディング法

エンティティ : インタフェースを定義 entity HLFDD is port (, : in std_logic ;, : out std_logic ) ; end HLFDD ; アーキテクチャ : エンティティの実現 architecture RH1 of HLFDD is <= xor

Microsoft PowerPoint - vlsi4.ppt [互換モード]

卒業論文 巡回冗長検査 CRC32 のハード / ソフト最適分割の検討 氏名 : 伊藤大喜学籍番号 : 指導教員 : 山崎勝弘教授提出日 : 2009 年 2 月 19 日 立命館大学理工学部電子情報デザイン学科

Microsoft PowerPoint - Lec pptx

Handsout3.ppt

ディジタル回路 第1回 ガイダンス、CMOSの基本回路

Łñ“’‘‚2004

プリント


Microsoft PowerPoint - FPGA

FPGAによる24時間時計回路

シフトレジスタ ステートマシン 4. シミュレーション記述 シミュレーションに必要な物 テストベンチ シミュレーション特有の記述 4.1 カウンターのシミュレーション テストする回路 テストベンチ シミュレーション結果 参考文献 以下の文献を参考にさせていただきました 小林優 入門 Verilog-

Microsoft PowerPoint - Chap1 [Compatibility Mode]

推奨されるHDLコーディング構文

Microsoft PowerPoint - 01-VerilogSetup-2019.pptx

スライド 1

Microsoft PowerPoint - arch5kai.ppt [互換モード]

<4D F736F F F696E74202D C190DD B A CB48D65208E DC58F49205B8CDD8AB B83685D>

Microsoft PowerPoint - Chap3

ModelSim-Altera - RTL シミュレーションの方法

. ディジタル回路設計を始める前に 2

JAIST Reposi Title RTL とゲートレベルを混在させた最適な論理回路設計に 関する研究 Author(s) 張, 之飛 Citation Issue Date Type Thesis or Dissertation Text ver

Microsoft PowerPoint - Chap3 [Compatibility Mode]

Presentation Title

スライド 1

Microsoft Word - HW06K doc

Microsoft PowerPoint LC_15.ppt

Microsoft Word - 実験4_FPGA実験2_2015

TULを用いたVisual ScalerとTDCの開発

システムオンチップ技術

MemoirsoftheFacultyofScience KochiUniversity(InformationScience) Vol.26(2005),No.2 冗長 2 進加算器と乗算器の性能評価 宮原克典横山真登國信茂郎 高知大学理学部数理情報科学科 Abstract 近年の集積回路の高集積

Microsoft PowerPoint - slide

卒論発表

論理設計の基礎

Bluespec SystemVerilogによるIP流通と効果的なRTLのデバッグ

第10回 コーディングと統合(WWW用).PDF

フリップフロップ

EDSF2006_ PDF


2ALU 以下はデータ幅 4ビットの ALU の例 加算, 減算,AND,OR の4つの演算を実行する 実際のプロセッサの ALU は, もっと多種類の演算が可能 リスト 7-2 ALU の VHDL 記述 M use IEEE.STD_LOGIC_1164.ALL; 00 : 加算 use IEE

SICE東北支部研究集会資料(2009年)

オンチップ・メモリ クイック・ガイド for Cyclone III

R I T S U M E I K A N U N I V E R S I T Y システムレベル設計概説 立命館大学理工学部電子情報デザイン学科 (Dept. of VLSI System Design) 福井正博 VLSI システム研究会

プログラミングA

0630-j.ppt

新版 明解C++入門編

プログラミングA

Quartus II クイック・スタート・ガイド

Compatibility list: vTESTstudio/CANoe

SCV in User Forum Japan 2003

SystemC言語概論

COINS 5 2.1

Presentation Title

Microsoft PowerPoint - arc7

画像処理回路のASIC実装へ向けたHDL Coder適用事例

- VHDL 演習 ( 組み合せ論理回路 ) 回路 半加算器 (half adder,fig.-) 全加算器を構成する要素である半加算器を作成する i) リスト - のコードを理解してから, コンパイル, ダウンロードする ii) 実験基板上のスイッチ W, が, の入力,LED, が, の出力とな

解きながら学ぶC++入門編

output2010本文.indd

Microsoft PowerPoint - ARTD 2.3new_datasheet.ppt

Microsoft PowerPoint - 33.pptx

スライド 1

SystemC 2.0を用いた簡易CPUバスモデルの設計

回路 7 レジスタ ( 同期イネーブル及び非同期リセット付 ) 入力データを保持するのに用いる記憶素子 使用用途として, マイクロプロセッサ内部で演算や実行状態の保持に用いられる Fig4-2 のレジスタは, クロック信号の立ち上がり時かつ 信号が 1 のときに外部からの 1 ビットデータ R をレ

機能検証トレーニング コース一覧

橡Taro9-生徒の活動.PDF


Nios II - PIO を使用した I2C-Bus (2ワイヤ)マスタの実装

Transcription:

Verilog HDL 3 2019 4 1 / 24

( ) (RTL) (HDL) RTL HDL アルゴリズム 動作合成 論理合成 論理回路 配置 配線 ハードウェア記述言語 シミュレーション レイアウト 2 / 24

HDL VHDL: IEEE Std 1076-1987 Ada IEEE Std 1164-1991 Verilog HDL: 1984 IEEE Std 1364-1995 C SFL (NTT) UDL/I (JEITA) SpecC, SystemC, SystemVerilog: C, C++ HDL 3 / 24

Verilog HDL [1984] IEEE [1995] HDL [1990 ] IEEE [2001] ( Verilog-2001 ) C { } begin end : 4 / 24

: 4 adder4.v module adder4 ( input [3:0] a, b, input cin, output [3:0] sum, output cout ); a[3:0] b[3:0] cin {cout, sum} = a + b + cin sum[3:0] cout assign { cout, sum } = a + b + cin ; endmodule module 5 / 24

1 0, 1, x, z 4 x: ( ) z: signed ( ) (b,o,h,d) 4 b1010 16 h0a3f 10 32 x, z _ 8 bxx10 111x ( ) wire reg FF parameter integer 6 / 24

wire: wire data 1 / [n:m] ( ) wire [3:0] data 4 ( ) data 4 data[3:1] 3 reg: ( ) reg [3:0] data [0:255] 4 256 ( ) data[5] 4 data[5][3:1] 3 wire reg reg input, output, inout wire ( ) output reg 7 / 24

C (+,-,*,/,%) (&,,^,~) (?:) / (&&,==,!=,>=, ) Verilog HDL {a, b} 1 &a, a ( ) wire assign function always 8 / 24

always always ( ) @ ( ) begin end ( ) initial 1 ( ) #n 9 / 24

function function [ ] ; endfunction assign always function decode2 4 function [3:0] decode2_4 ; input [1:0] a; begin case (a) 0: decode2_4 = 4 b0001 ; 1: decode2_4 = 4 b0010 ; 2: decode2_4 = 4 b0100 ; default : decode2_4 = 4 b1000 ; endcase end endfunction assign x = decode2_4 ( x_bin ); 10 / 24

function always for, while, repeat ( ) if if ( ) begin end else begin end case case (default ) ( if... else if... )? (= z ) don t care casez ( x don t care casex ) case ( ) 1: // 2: default : endcase 11 / 24

submodule instantiation wire [7:0] op1, op2, sum ; wire c0, c4, c8; adder4 a0 (.a( op1 [3:0]),.b( op2 [3:0]),. cin (c0),. sum ( sum [3:0]),. cout (c4)); adder4 a1 (.a( op1 [7:4]),.b( op2 [7:4]),. cin (c0),. sum ( sum [7:4]),. cout (c8)); wire reg 12 / 24

module structure module ( ); wire/reg ; assign always endmodule assign always wire reg 13 / 24

: 4 count4.v module count4 ( input reset, clock, output reg [3:0] data ); reset clock always @( posedge clock or negedge reset ) begin if ( reset == 1 b0) begin data <= 4 b0000 ; end else begin data <= data + 1; end end endmodule reg always data[3:0] 14 / 24

always 0 @() ( ) always @(posedge clock) ( reset==0 ) always @(posedge clock, negedge reset) always ( @* always comb ) 15 / 24

/ (=) wire (<=) reg Blocking A = B; B = A; Nonblocking // A <= B; B <= A; // A B 16 / 24

always (function : ) always @( posedge clock ) begin s = x + y + c; end always @( x or y) begin s = x + y + c; end always @( x or y or c) begin s = x + y + c; end always @* begin if ( c ==0) s = x + y; end 17 / 24

HDL ( ) RTL : HDL : HDL テストベンチ テスト対象 テストパタンクロック生成入力波形生成出力を期待値と比較 18 / 24

timescale include #n initial 0 1 $monitor test count4.v t i m e s c a l e 1 ns / 1 ns i n c l u d e count4. v module t ; r e g r e s e t, c l o c k ; w i r e [ 3 : 0 ] data ; count4 c1 ( r e s e t, c l o c k, data ) ; a l w a y s b e g i n #10 c l o c k = c l o c k ; end i n i t i a l b e g i n $monitor ( %d %h %h %h, $time, r e s e t, c l o c k, data ) ; r e s e t = 1 ; c l o c k = 0 ; #35 r e s e t = 0 ; #5 r e s e t = 1 ; #200 r e s e t = 0 ; #140 r e s e t = 1 ; #1000 $ f i n i s h ; end endmodule 19 / 24

FPGA FPGA ( ) reg reg [3:0] count = 4 b0001; initial reg [3:0] count ; initial begin count <= 4 b0001 ; 20 / 24

1/3 RTL wire/reg wire/reg (assign always ) 21 / 24

2/3 if else case default 0 signed unsigned unsigned 10 32-bit unsigned signed unsigned 22 / 24

3/3 RTL function 0/1 23 / 24

( ) <ktakagi@i.kyoto-u.ac.jp> 24 / 24