RE: [vhdl-200x] conditional compilation proposal

From: Scott Thibault <thibault@gmvhdl.com>
Date: Tue Aug 16 2011 - 12:52:14 PDT

The example below would be nicely handled by a generate for the whole
function.

For fine-grained control of statements inside a function, I would use a
standard if statement and allow the compiler to eliminate unused cases. All
you would need is a builtin function like defined("compile_var_name").

--Scott

>
> -----------------------------------------------
> function real _$ID23;
> input dummy;
> `ifdef __EDA_VENDOR_1__
> real t;
> begin
> t = $time;
> _$ID23 = t / 1.000000e+00;
> end
> `elsif __EDA_VENDOR_2__
> reg[63:0] t;
> begin
> t = $time;
> _$ID23 = $itor(t) / 1.000000e+00;
> end
> `else
> _$ID23 = $time / 1.000000e+00;
> `endif
> endfunction
>
>
>
>
>
> Please consider the environment before printing this email.
>
> This message should be regarded as confidential. If you have received this
> email in error please notify the sender and destroy it immediately.
>
> Statements of intent shall only become binding when confirmed in hard copy
> by an authorised signatory.
>
> The contents of this email may relate to dealings with other companies
under
> the control of BAE Systems plc details of which can be found at
> http://www.baesystems.com/Businesses/index.htm.
>
> Detica Limited is a BAE Systems company trading as BAE Systems Detica.
> Detica Limited is registered in England and Wales under No: 1337451.
> Registered office: Surrey Research Park, Guildford, Surrey, GU2 7YP,
England.
>
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Aug 16 12:53:02 2011

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2011 - 12:53:22 PDT