SlideShare a Scribd company logo
1 of 6
4
clk
D Q
0
1
1
2clk
3
clk
clk
たぶんできる!
Verilog-HDL
みつみつ
@aiobo
Syntax
1 module adder(a, b, y);
2 input [7:0] a, b;
3 output [7:0] y;
4
5 assign y = a + b;
6
7 endmodule adder
a
b
8
8
8
y
2
State machine
順序回路を手計算で回路合成する作業は
退屈だし間違いを引き起こしやすい。
HDLで記述し、回路合成・最適化は
(ある程度)シンセサイザに任せる。
3
16bit Counter
7 reg [15:0] creg; //16bit register
8 always @(posedge clk) begin
9 if(rst == 1’b0)
10 creg <= 0;
11 else
12 creg <= creg + 1;
13 end
14 assign out = creg;
15 endmodule
4
Simulator
Icarus Verilog
+
GTKwave
がオススメ
5
References
「入門Verilog HDL記述
ハードウェア記述言語の速習&実践」
小林 優 著
CQ出版
6

More Related Content

Viewers also liked

Verilog code all
Verilog code allVerilog code all
Verilog code allMNIT jaipur
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gatesRakesh kumar jha
 
Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits. Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits. shobhan pujari
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesRicardo Castro
 
Most wanted "peacemakers"
Most wanted "peacemakers"Most wanted "peacemakers"
Most wanted "peacemakers"drpobeda
 
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!Etienne Jager
 
LNA Presentation to Ciena
LNA Presentation to CienaLNA Presentation to Ciena
LNA Presentation to CienaPaul Mushubi
 
DeKlantrede2015-H3ROES
DeKlantrede2015-H3ROESDeKlantrede2015-H3ROES
DeKlantrede2015-H3ROESEtienne Jager
 
Fire Engineering Article_Published_McCrindle
Fire Engineering Article_Published_McCrindleFire Engineering Article_Published_McCrindle
Fire Engineering Article_Published_McCrindleScott McCrindle
 
12.05.29 dien ap buoc1
12.05.29 dien ap buoc112.05.29 dien ap buoc1
12.05.29 dien ap buoc1Bình Lê
 
E6 u15 a14.ppt phuong(1)
E6 u15 a14.ppt phuong(1)E6 u15 a14.ppt phuong(1)
E6 u15 a14.ppt phuong(1)phuongtuanngoc
 

Viewers also liked (20)

Verilog code all
Verilog code allVerilog code all
Verilog code all
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
07 sequential verilog
07 sequential verilog07 sequential verilog
07 sequential verilog
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits. Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits.
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
 
VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
Most wanted "peacemakers"
Most wanted "peacemakers"Most wanted "peacemakers"
Most wanted "peacemakers"
 
Lingkungan Hidup
Lingkungan HidupLingkungan Hidup
Lingkungan Hidup
 
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!
 
LNA Presentation to Ciena
LNA Presentation to CienaLNA Presentation to Ciena
LNA Presentation to Ciena
 
σαν μιλούν οι σαρακατσαναίοι...
σαν μιλούν οι σαρακατσαναίοι...σαν μιλούν οι σαρακατσαναίοι...
σαν μιλούν οι σαρακατσαναίοι...
 
DeKlantrede2015-H3ROES
DeKlantrede2015-H3ROESDeKlantrede2015-H3ROES
DeKlantrede2015-H3ROES
 
IamExpat Fair 2016
IamExpat Fair 2016IamExpat Fair 2016
IamExpat Fair 2016
 
A yoga day
A yoga dayA yoga day
A yoga day
 
Fire Engineering Article_Published_McCrindle
Fire Engineering Article_Published_McCrindleFire Engineering Article_Published_McCrindle
Fire Engineering Article_Published_McCrindle
 
12.05.29 dien ap buoc1
12.05.29 dien ap buoc112.05.29 dien ap buoc1
12.05.29 dien ap buoc1
 
E6 u15 a14.ppt phuong(1)
E6 u15 a14.ppt phuong(1)E6 u15 a14.ppt phuong(1)
E6 u15 a14.ppt phuong(1)
 

Recently uploaded

自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineerYuki Kikuchi
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)Hiroshi Tomioka
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...博三 太田
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfFumieNakayama
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)UEHARA, Tetsutaro
 
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?akihisamiyanaga1
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfFumieNakayama
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NTT DATA Technology & Innovation
 

Recently uploaded (8)

自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
 
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)