Giter Site home page Giter Site logo

vxapps / cmake-ghdl-compiler Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 33 KB

GHDL Compiler Definition for CMake

Home Page: https://vxapps.com

License: BSD 3-Clause "New" or "Revised" License

CMake 91.57% VHDL 8.43%
vhdl cmake cmake-modules cmake-examples ghdl vhd vhdl-code vhdl-examples vhdl-testbench cmake-toolchain

cmake-ghdl-compiler's Introduction

cmake-ghdl-compiler

Compiler Definition for GHDL usage. Use VHDL projects with outside build and standard CMake configuration as known for other applications.

Build

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=Debug|Release ../cmake-ghdl-compiler
make -j`nproc`

Dependencies

GHDL and GtkWave is required to use this example.

Compiler Definition

Just use cmake/modules inside your project to compile and run VHDL projects with GHDL.

Simulation Targets

Create a simulation target for testbench. Example:

add_custom_target(sim_example COMMAND ${CMAKE_GHDL_COMPILER} -r ${PROJECT_NAME} --stop-time=1000ns --disp-time --wave=${PROJECT_NAME}.ghw WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

Display the wave output from simulation of testbench. Example:

add_custom_target(sim_example_wave COMMAND ${GTKWAVE} ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.ghw DEPENDS sim_example WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

Run a custom target

make sim_example|sim_example_wave

Known Issues

Currently the Ninja generator is not able to elaborate the designs, because he write too fast into the same definition file of GHDL.

cmake-ghdl-compiler's People

Contributors

florianbecker avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.