embeded/FPGA - ALTERA2026. 5. 8. 12:28

9년 전에 조사한 적이 있었네 -_-

2017.12.26 - [embeded/FPGA - ALTERA] - GHDL - 시뮬레이터

 

$ ghdl
Command 'ghdl' not found, but can be installed with:
sudo snap install ghdl         # version 3.0.0, or
sudo apt  install ghdl-common  # version 1.0.0+dfsg-6
See 'snap info ghdl' for additional versions.

$ sudo apt  install ghdl-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  ghdl-common
0 upgraded, 1 newly installed, 0 to remove and 54 not upgraded.
Need to get 154 kB of archives.
After this operation, 2,444 kB of additional disk space will be used.
Get:1 http://kr.archive.ubuntu.com/ubuntu jammy/universe amd64 ghdl-common amd64 1.0.0+dfsg-6 [154 kB]
Fetched 154 kB in 0s (4,318 kB/s)   
Selecting previously unselected package ghdl-common.
(Reading database ... 304538 files and directories currently installed.)
Preparing to unpack .../ghdl-common_1.0.0+dfsg-6_amd64.deb ...
Unpacking ghdl-common (1.0.0+dfsg-6) ...
Setting up ghdl-common (1.0.0+dfsg-6) ...
Processing triggers for man-db (2.10.2-1) ...

$ sudo apt-get install ghdl*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'ghdl-gcc' for glob 'ghdl*'
Note, selecting 'ghdl-mcode' for glob 'ghdl*'
Note, selecting 'ghdl-common' for glob 'ghdl*'
Note, selecting 'ghdl-llvm' for glob 'ghdl*'
Note, selecting 'ghdl' for glob 'ghdl*'
ghdl-common is already the newest version (1.0.0+dfsg-6).
The following additional packages will be installed:
  gcc-10-base libgnat-10
Suggested packages:
  gtkwave
The following NEW packages will be installed:
  gcc-10-base ghdl ghdl-gcc ghdl-llvm ghdl-mcode libgnat-10
0 upgraded, 6 newly installed, 0 to remove and 54 not upgraded.
Need to get 15.5 MB of archives.
After this operation, 60.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y 

 

[링크 : https://github.com/ghdl/setup-ghdl]

[링크 : https://askubuntu.com/questions/1199027/ghdl-in-ubuntu-18-040-lts-gtkwave-vlsi-fpga-vhdl]

[링크 : https://github.com/ghdl/ghdl/releases]

 

by gpt  

test.vhd
entity test is
end;

architecture sim of test is
begin
    process
    begin
        report "Hello GHDL";
        wait;
    end process;
end;

컴파일:

ghdl -a test.vhd

엘라보레이션:

ghdl -e test

실행:

ghdl -r test

출력:

Hello GHDL
5. GTKWave 함께 설치 (파형 보기)

보통 같이 설치합니다.

sudo apt install gtkwave

VCD 생성 실행 예시:

ghdl -r test --vcd=test.vcd
gtkwave test.vcd

 

먼가 되긴한데.. 문법이 다른가?

$ cat test.vhd 
entity test is
end;

architecture sim of test is
begin
    process
    begin
        report "Hello GHDL";
        wait;
    end process;
end;

$ ghdl -a 7seg.vhdl 


$ ghdl -r test
test.vhd:8:9:@0ms:(report note): Hello GHDL

$ ghdl -r test --vcd=test.vcd
test.vhd:8:9:@0ms:(report note): Hello GHDL

$ gtkwave test.vcd
Gtk-Message: 12:29:46.165: Failed to load module "canberra-gtk-module"

GTKWave Analyzer v3.3.104 (w)1999-2020 BSI

No symbols in VCD file..nothing to do!


$ sudo apt install libcanberra-gtk-module libcanberra-gtk3-module


$ gtkwave test.vcd

GTKWave Analyzer v3.3.104 (w)1999-2020 BSI

No symbols in VCD file..nothing to do!

$ cat test.vcd
$date
  Fri May  8 12:29:32 2026
$end
$version
  GHDL v0
$end
$timescale
  1 fs
$end
$scope module standard $end
$upscope $end
$scope module test $end
$upscope $end
$enddefinitions $end
#0


Posted by 구차니