Re: [sv-ec] Should it be allowed to use interface(virtual and not virtual) in conditional expr

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Oct 28 2008 - 07:19:01 PDT
Daniel,

I think that the rules do cover this.  Draft 7a 25.9 clearly
talks about "types" of interfaces and of virtual interfaces
of "the same type".  The language there is a bit informal;
it should probably say "matching" type (with a corresponding
extension to the definition in 6.22.1) but clearly that is the
intent of the interface assignment compatibility description.
So, if you read "the same type" as "matching type", then the
conditional operator rules in 11.4.11 directly apply, including
the handling of null.


I do have some very substantial issues regarding the entire
handling of interface "types" in the LRM but that goes way
beyond the question here.

Gord

Neil Korpusik wrote:
> <Forwarding bounced email from Daniel Mlynek>
> 
> -------- Original Message --------
> Subject: RE: [Fwd: Should it be allowed to use interface(virtual and not 
> virtual) in conditional expr]
> Date: Mon, 27 Oct 2008 15:06:46 -0700
> From: Daniel Mlynek <DanielM2@aldec.com>
> To: Neil.Korpusik@Sun.COM
> 
> Should it be allowed to use interface(virtual and not virtual) in
> conditional expr:
> 
> COND? ARG1 : ARG2
> As ARG1 ARG2 arguments  virtual interfaces and interfaces instance?
> 
> This would be usefull feature while LRM seams to forbid that. See
> example
> 
> 
> interface iface;
>           int a,b;
> endinterface
> 
> module top;
>           iface ifc1();
>           iface ifc2();
> 
>           virtual iface v_ifc, v_ifc1, v_ifc2;
> 
>           int a;
> 
>           initial
>           begin
>                   v_ifc = (a == 1)? ifc1:ifc2; //iface instances used
> 
>                   v_ifc = (a == 1)? v_ifc1:v_ifc2;// virtual iface
> variable used
>           end
> endmodule
> 
> DANiel
> 
> 
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Oct 28 07:24:06 2008

This archive was generated by hypermail 2.1.8 : Tue Oct 28 2008 - 07:24:59 PDT