1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ハードウェア記述言語学習の足掛かり

Posted at

この記事の目的

この記事の目的はこれからハードウェア記述言語を勉強する人に向けて、少しでも取っ付きやすくするためになるべく平易な表現でハードウェア記述言語を紹介することです。

読み進める際の注意点

この記事は以下の事柄を分かっている前提で書かれています。

  • 論理演算(and, or, not, nand, nor, xor)
  • 論理回路記号

ハードウェア記述言語とは

ハードウェア記述言語はアルファベット3文字でHDLと略されます。
HDL(Hardware Discription Language):ハードウェア記述言語
ハードウェア記述言語は簡単に述べると論理回路を記述する言語です。
集積回路(IC:Integrated Circuit)、PLD(Programmable Logic Device)、FPGA(Field Programmable Gate Array)の開発に使用されます。

主に使用されるハードウェア記述言語

ハードウェア記述言語での開発では主に下の2種類が使われます。

  • Verilog HDL(読み方:べリログエイチディーエル)
  • VHDL(読み方:ブイエイチディーエル)
    個人的には、初学者ならばVerilog HDLの方をおすすめします。。。(より平易に感じます)

ハードウェア記述言語の記述例

簡単な論理回路をVerilog HDLとVHDLを使って記述してみます。
使用するのは以下の回路とします。
a、b、c、dはそれぞれ1bitの信号とします。
log_circuit_ex.png
各言語の解説はこの記事では割愛します。

Verilog HDL

Verilog HDLで記述した例が以下となります。

module AB_or_CD ( a, b, c, d, g);
    input a;
    input b;
    input c;
    input d;
    output g;

    wire e;
    wire f;

    assign e = a & b;
    assign f = c & d;

    assign g = e | f;
endmodule

VHDL

VHDLで記述した例が以下となります。

entity AB_or_CD is
port (
    a : in std_logic;
    b : in std_logic;
    c : in std_logic;
    d : in std_logic;
    g : out std_logic
);
end AB_or_CD;

architecture RTL of AB_or_CD is

signal e : std_logic;
signal f : std_logic;

begin

    e <= a and b;
    f <= c and d;
    g <= e or f;

end RTL;

最後に

ここまで読んでいただき、誠にありがとうございます。
なるべく簡単にハードウェア記述言語の紹介をしてみました。
少しでもハードウェア記述言語が簡単そうだと思ってもらえたら幸いです。

勉強する際は本を一冊手に取って勉強することをお勧めします。
筆者が勉強したときに使用した本は参考資料に載せておきますので、参考にしてみてください。

参考資料

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?