开发者

how can one compile .vhd under ghdl?

My first question : I wonder how you compile your vhdl file under ghdl ?

In c/c++, we use

  • -Werror
  • -Wunused-variable
  • -Wunused-value
  • -Wunused-function
  • -Wfloat-equal -Wall

.My second question : are there a way one can use ghdl with those 开发者_StackOverflow社区things ?


The user manual for GHDL would be a good starting point, specifically sections 3.1 (building) and 3.4 (warnings).

It is difficult to compare a set of C/C++ compiler flags to that of a VHDL compiler, but there may be some similar functionality between them, such as warnings become errors and alerting the user to unused design components. For example (from the documentation):

--warn-unused
   Emit a warning when a subprogram is never used. 
--warn-error
   When this option is set, warnings are considered as errors.


I have a nice example for makefile and GHDL:

"...Recently I added a makefile for this project. It is done based on the example c code interface for GHDL and IP TTL filter using VHDL. The makefile is described at makefile..."

http://bknpk.ddns.net/my_web/IP_STACK/start_1.html and " VHDL IP Stack Makefile This is a makefile for IP stack project.

#variables
CC = gcc
CFLAGS = -c -g
#-MD
SHELL := /bin/bash
GG = ghdl
GG_LIB = --ieee=synopsys --workdir=work
AFLAGS = -a --work=work
IFLAGS = -e
EFLAGS = -m -Wl,g_rand.o

..." http://bknpk.ddns.net/my_web/IP_STACK/ip_stack_makefile.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜