Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Newbie
vladstamate
Posts: 2
Registered: ‎05-31-2012
0
Accepted Solution

Macros not working

Hi all,

 

I am having problems with macros not being recognized. So I made this simple test:

 

`timescale 1ns / 1ps

`define VLAD 5

module main(
);

reg [7:0] test;

initial
begin
assign test= VLAD + 1;
end

endmodule

 

When I Synthetize it I get this error:

 

ERROR:HDLCompilers:28 - "main.v" line 12 'VLAD' has not been declared

 

Any idea why? What I am doing wrong? 

 

I tried both Verilog-200X and Verilog-93 to no avail. I am using the latest ISE available (14.1?)

 

Regards,

Vlad.

Expert Contributor
eilert
Posts: 2,086
Registered: ‎08-14-2007

Re: Macros not working

Hi Vlad,

shouldn't it belike this:

 

assign test= 'VLAD + 1;

                               ^

                               see the little tick there?

 

Have a nice synthesis

  Eilert

Newbie
vladstamate
Posts: 2
Registered: ‎05-31-2012
0

Re: Macros not working

Ah!! Yes, thank you very much! That worked! I can now get back to my design.

 

Regards,

Vlad.