Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is VHDL equivalent for this verilog code

Status
Not open for further replies.

raghava

Member level 2
Joined
Jul 31, 2008
Messages
51
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,870
HI all,

I am in the process of conversting some verilog code snippet to VHDL.
WHat might be the equivalent VHDL code for the following verilog code.
This code is part of my verilog header file.

Expecting answers.

************************8

`define SHAPES 1


`ifdef SHAPES
parameter INPUT_BMP = "../data/input/shapes.bmp";
parameter WL = 8;
parameter IR = 13'd384;
parameter IC = 13'd512;
parameter THRESHOLD = 200;
parameter OUTPUT_BMP = "../data/output/corner_shapes.bmp";
`endif

Added after 1 hours 33 minutes:

HI all,

The equivalent for 'ifdef is in VHDL is

if <boolean expression> generate
<conditional compiled code>
end generate;

But my issue is where it should be placed in the code.

I am expecting answers.
 

VHDL has no similar method to supply conditional parameters as with a Verilog 'ifdef. The best solution depends on the
respective purpose. Promising candidates are:

- constant arrays and a generic constant as index

- define all conditional parameters in a package and change the package to get a different variant

Generally, I suggest to consult a verbose VHDL text book or reference manual to learn about the VHDL language concepts. The
Synopsys manual is profound.
 

    raghava

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top