Commit 695fcd2a authored by Andreas Bombe's avatar Andreas Bombe

New upstream version 0.35+dfsg

parents
# Gdb commands useful to debug ghdl
define pt
call disp_tree.disp_iir ($arg0, 1, 10)
end
document pt
Print the structure of the iirs that is $arg0.
end
define ptf
call disp_tree.disp_iir ($arg0, 1, 0)
end
document ptf
Print the iirs that is $arg0.
end
define pt1
call disp_tree.disp_iir ($arg0, 1, 1)
end
define prt
set lang c
print (iirs__iir *) $
set lang ada
end
define pl
call disp_iir_list ($arg0, 0, 0)
end
define psrc
call debug_source_loc (nodes.get_location ($arg0))
end
document pl
Print the list of iirs that is $arg0.
end
define plf
call disp_iir_list ($arg0, 0, 1)
end
document plf
Print flatly the list of iirs that is $arg0.
end
define ptc
call disp_tree.disp_chain ($arg0, 0, 0)
end
document ptc
Print the chain of iirs that is $arg0
end
define pv
call disp_value ($arg0)
end
document pv
Print the value that is $.
end
define ploc
call disp_iir_location ($arg0)
end
document ploc
Print the location for iir $.
end
set lang ada
# Must be the last command: some distributions use a shared libgnat by default,
# and don't have the minimal required set of debug info to support this command.
# As a result, this command fails and stop this script.
catch exception
*~
*.ali
*.o
b~*.ad?
*.v87
*.v93
*.v08
*.cf
.gdb_history
*.pyc
testsuite/get_entities
# Generated files on windows.
build/
dist/mcode/build/
dist/mcode/lib/
# Generated directories on Linux
lib/
# Generated files on Linux
/Makefile
libghdlvpi.so
version.ads
version.tmp
config.status
default_paths.ads
elf_arch.ads
ghdl.gpr
ghdl1-*
ghdl_llvm
grt-backtraces-impl.ads
grt-files
grt-files.in
grt.lst
libgrt.a
run-bind.adb
run-bind.ads
src/version.ads
doc/_build/
#formats:
# - pdf
requirements_file: doc/requirements.txt
python:
version: 3
branches:
except:
- appveyor
language: c
matrix:
include:
- os: linux
dist: trusty
sudo: required
services: docker
env: IMAGE=stretch+mcode
- os: linux
dist: trusty
sudo: required
services: docker
env: IMAGE=stretch+mcode+gpl
- os: linux
dist: trusty
sudo: required
services: docker
env: IMAGE=ubuntu14+mcode
- os: linux
dist: trusty
sudo: required
services: docker
env: IMAGE=ubuntu14+llvm-3.8
- os: linux
dist: trusty
sudo: required
services: docker
env: IMAGE=fedora26+mcode
- os: osx
osx_image: xcode7.3
env: IMAGE=macosx+mcode
cache:
directories:
- gnat
install: true
script:
- ./dist/linux/travis-ci.sh
before_deploy:
- "echo ready to deploy"
deploy:
- provider: releases
skip_cleanup: true
api_key:
secure: ji6LXOmD5V2N+ELHZr4oJsmxPhedk+8W6jfCqQdEbewQ42N+fKOq3lgqJni7ZdfpZaulB9OHPTApv3bwOjXjtN9rfBGmq//U9CwvzHmUeomdQv6WQOVevaWSXl3DNL9fk3yKynyFrsv4pvr45L8GIjaHLggKcYhNFPJ2rrnJlDoFT9MqQNpmP7Bg/LnwVQiv+ZDPkLlMWQzrXzLamdQILARPQka+kCdXl/sHH6OKvLgRvu9yvyXYSSfbyAHP+THISS5gDciizSBeWGlU75kgj/N+mkV+8NvtTTfEIgG8y49WJz6aBooTmRzk/jZW1dKMbDR6c5bpTmRvMZSzeSBuAR6WLhr6HevgCPi/1fX1y3pkVSrgBUF5KcxPgWCZp0I05QjaJOdvQDl1hH4TlVwpT18lM2+cWrui9fS7spnk/AuNKX882C5QWWRy28lIPasCVnwfeKX8a9KAwY9OqVOenoLC1yx7NJOGfH1bjuSYYxyR4XgLiGTHKALAuknCyD9QL0o378IwqxHMcsN0Gsd+GndMu0/b8GvSqfzDpV1XknqabQFwkZLs+Yydw0snfBUzXw9TfOk78IiPYEgXAxsQKBAkK7qvO36HIxLlSQXglXU1D4IDtQYDUel6vKll4pgu0WMxStQCbj51yDVJKvRhzwiBNC6Pwgzt2JTrpwM/T/U=
file: "ghdl-*.tgz"
file_glob: true
on:
repo: tgingold/ghdl
tags: true
all_branches: true
after_deploy:
- "echo deployed"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
[![Documentation Status](https://readthedocs.org/projects/ghdl/badge/?version=latest)](http://ghdl.readthedocs.io) [![Join the chat at https://gitter.im/ghdl1/Lobby](https://img.shields.io/gitter/room/ghdl1/Lobby.svg?colorB=4cb696)](https://gitter.im/ghdl1/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md) [![Creative Commons Attribution-ShareAlike](https://img.shields.io/badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md)
[![Linux containers at Travis-CI](https://img.shields.io/travis/tgingold/ghdl/master.svg?style=flat&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAIP0lEQVR42qVXaUyUWRaFycyP%2BTVLemaSSfrPJN3JZJKOPyY6uBLTQgGlUMVeFHuxFaioKGpcAFFQUaOigAsmo7ghikZtxZVFCCKgqOi4ICoqqLjghqjcOeem%2B5sQFZnuL3l5VV%2B9d%2B9595577iuX%2F%2FcZNWrUX7y8vMyJiYmbpk6d2pKamto5bdq0LnxuT05OPhgUFOQcOXLkP35a7%2Bvr6%2FKLnmXLlun87t27X02YMKFkzpw5va2trXL37l158OCBPHz4UEdXV5fcu3dPbt26Jdu3b%2B%2Fz8%2FNrM5vNf%2BNeAPxlIHAi06xZs7rOnj0rL168kPb2dnn8%2BLE8evToo0EgHPfv35e1a9cKQOT9LKc2m03nyMhIv%2FXr18uzZ8%2F0pDU1NXLz5k0xTzSLycs0cHibBClhBOTJkycKqKmpSZCyGkTv10N27unpqfPw4cNDSkpK5OrVqzSmAHbu3CnXr1%2BXhIQECQkNkeCQYHEkxAPQRHEmJ0taWposWbJEOjs7dX1bW5s0NjYyEtW0OXny5KGBMJlMf1ixYsUHOqYRGmPYi4qK5PLly5KUlCSLFi0S5FqCAaSutk6io6MlMzNTtmzZIkwX9zASdXV10tLSQhALaRtEHdy5iLhYrdbbP53gxo0baqy7u1t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f1IKCwpBQn90UYfEo2qiYqKVjAGBAc%2B9fXxqQdL0H1V3aBFAGeqMlpnKjmgQD62UTtiy%2FSwWtmYqm5IUXKFeMM%2FsomV2u%2F3vtAEuufysByfgRJX8DshTPU2mPPy7yQBBYzGWgC%2FVkOSXWVmZZHwnSPoD%2FlOmodXSsWFjsOe%2FCAcrQqMD2awAAAAASUVORK5CYII%3D)](https://travis-ci.org/tgingold/ghdl) [![Windows VMs at AppVeyor](https://ci.appveyor.com/api/projects/status/rsq60m5wcly3og8j?svg=true)](https://ci.appveyor.com/project/tgingold/ghdl) [![Commits since latest release](https://img.shields.io/github/commits-since/tgingold/ghdl/latest.svg?style=flat)](https://github.com/tgingold/ghdl/releases)
# GHDL
This directory contains the sources of GHDL, the open-source compilator and simulator for [VHDL](https://en.wikipedia.org/wiki/VHDL), a Hardware Description Language ([HDL](https://en.wikipedia.org/wiki/Hardware_description_language)). GHDL is not an interpreter: it allows you to analyse and elaborate sources to generate machine code from your design. Native program execution is the only way for high speed simulation.
## Main features
Full support for the [1987](http://ieeexplore.ieee.org/document/26487/), [1993](http://ieeexplore.ieee.org/document/392561/), [2002](http://ieeexplore.ieee.org/document/1003477/) versions of the [IEEE](www.ieee.org) [1076](http://standards.ieee.org/develop/wg/P1076.html) VHDL standard, and partial for the latest [2008](http://ieeexplore.ieee.org/document/4772740/) revision.
Partial support of [PSL](https://en.wikipedia.org/wiki/Property_Specification_Language).
By using a code generator ([LLVM](http://llvm.org/), [GCC](http://gcc.gnu.org/) or, [x86_64](https://en.wikipedia.org/wiki/X86-64)/[i386](https://en.wikipedia.org/wiki/Intel_80386) only, a built-in one), it is much faster than any interpreted simulator. It can handle very large designs, such as [leon3/grlib](http://www.gaisler.com/index.php/downloads/leongrlib).
GHDL runs on [GNU/Linux](http://en.wikipedia.org/wiki/Linux_distribution), [Windows](http://en.wikipedia.org/wiki/Microsoft_Windows) and [macOS](http://en.wikipedia.org/wiki/MacOS), both on `x86` and on `x86_64`. You can freely download a binary distribution for your OS, or try to build it on your own machine (see *'Getting GHDL'* below).
Can write waveforms to a [GHW](http://ghdl.readthedocs.io/en/latest/using/Simulation.html?highlight=GHW#cmdoption-wave), [VCD](https://en.wikipedia.org/wiki/Value_change_dump) or FST file. Combined with a [GUI](http://en.wikipedia.org/wiki/Graphical_user_interface)-based [waveform viewer](https://en.wikipedia.org/wiki/Waveform_viewer) and a good text editor, GHDL is a very powerful tool for writing, testing and simulating your code.
Supported third party projects: [VUnit](https://vunit.github.io), [OSVVM](http://osvvm.org), [cocotb](https://github.com/potentialventures/cocotb) (through the [VPI interface](https://en.wikipedia.org/wiki/Verilog_Procedural_Interface)), ...
GHDL is free software:
- [![GNU General Public License 2](https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md)
- [![Creative Commons Attribution-ShareAlike 4.0](https://img.shields.io/badge/doc%20license-Creative%20Commons%20Attribution--ShareAlike--4.0-aab2ab.svg?style=flat)](https://github.com/tgingold/ghdl/blob/master/COPYING.md) available at [![ghdl.readthedocs.io](https://img.shields.io/badge/ghdl-.readthedocs.io-2980b9.svg?style=flat)](https://ghdl.readthedocs.io)
- Some of the runtime libraries, are under different terms; see the individual source files for details.
## Getting GHDL
### Pre-built releases
Periodically (not regularly), several binary distributions are made available through the [releases](https://github.com/tgingold/ghdl/releases) tab. If you can't find the one matching the platform and versions you need, you can build it yourself!
### Building GHDL
In order to follow the traditional way to `configure` and `make`, you need the GNU Ada compiler, GNAT GPL, 2014 (or later) for x86 (32 or 64 bits). GNAT GPL can be downloaded anonymously from [libre.adacore.com](http://libre.adacore.com/tools/gnat-gpl-edition/). Then, untar and run the *doinstall* script.
*Depending on the OS and distribution you are using, you will also need to install some toolchain dependencies, such as `zlib`. See '[Building](http://ghdl.readthedocs.io/en/latest/building/index.html)' for specific package names.*
In the GHDL base directory, configure and build:
```sh
$ ./configure --prefix=/usr/local
$ make
```
At that place, you can already use the 'ghdl_mcode' built in the directory. You can also install GHDL:
```sh
$ make install
```
That's all!
*The executable is installed as 'ghdl' in `/usr/local`. To install it to a different path, change the `--prefix` in the call to `configure`. For example, on Windows, you may want to set it to `--prefix=/c/Program Files (x86)/GHDL`.*
---
Furthermore, each supported compiler has its pros and cons. Here is a short comparaison:
| | pros | cons | observations |
|---|---|---|---|
|mcode | very easy to build | x86_64/i386 only | no executable created from your design |
| | very quick analysis time and can analyze very big designs | simulation is slower | |
| GCC | generated code is faster | analyze can take time (particularly for big units) | the output is an executable |
| | generated code can be debugged | build is more complex |
| | many platforms (x86, x86_64, powerpc, sparc) | |
LLVM has the same pros/cons as GCC, but it is easier to build. However, coverage (`gcov`) is unique to GCC.
You can find specific instructions for each of the options in '[Building](http://ghdl.readthedocs.io/en/latest/building/Building.html)'.
# =============================================================================
# General configuration
# =============================================================================
# Virtual Machine Image
image: WMF 5
# Build names
version: '{branch}-{build}'
# Branches to build
branches:
except:
- travis
# =============================================================================
# Build matrix configuration
# =============================================================================
environment:
matrix:
- BUILD_MINGW: mingw32
BUILD_BACKEND: mcode
# Not yet functionnal
# - BUILD_MINGW: mingw32
# BUILD_BACKEND: llvm
# mcode is not yet supported on Win64
# - BUILD_MINGW: mingw64
# BUILD_BACKEND: mcode
- BUILD_MINGW: mingw64
BUILD_BACKEND: llvm
# =============================================================================
# Build flow configuration
# =============================================================================
# initialization scripts to run
init:
- ps: Write-Host "Initializing virtual machine ..."
- ps: $env:PATH = "C:\msys64\$($env:BUILD_MINGW)\bin;C:\msys64\usr\bin;" + $env:PATH
# - ps: Import-Module .\dist\appveyor\shared.psm1 -Verbose
# installation scripts to run
install:
- ps: .\dist\windows\appveyor\install.ps1
- ps: .\dist\windows\appveyor\info.ps1
# Build flow
# Disable MSBuild
build: off
# build scripts to run
build_script:
- ps: .\dist\windows\appveyor\build.ps1
# Test flow
# test scripts to run
test_script:
- ps: .\dist\windows\appveyor\test.ps1
# =============================================================================
# Deployment configuration
# =============================================================================
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'Release'
draft: true
prerelease: false
artifact: /.*\.zip/
on:
appveyor_repo_tag: true
auth_token:
secure: Qli1B9/I6B1uTMeyGolw8N/zh/PRhLdT8fjUUTcd4Vp14UQki+YTjxKjAe+65Oqv
#!/bin/sh
#
# configure script for ghdl (c) 2014 Tristan Gingold
#
backend=mcode
CC=${CC:-gcc}
CXX=${CXX:-clang++}
CFLAGS=${CFLAGS:--g}
GNATMAKE=${GNATMAKE:-gnatmake}
LDFLAGS=
prefix=/usr/local
libdirsuffix=lib/ghdl
libdirreverse=../..
gcc_src_dir=
llvm_config=
backtrace_lib=
llvm_be=llvm
build=
build_mode=
enable_werror=true
enable_checks=true
enable_openieee=unknown
EXEEXT=
SOEXT=.so
PIC_FLAGS=-fPIC
show_help=no
progname=$0