We have virtual [interface] which allows us to hook an object to a (statically elaborated) interface instance at runtine. A standard idiom for using this feature is for a modport to export a clocking block to the client object... interface I (input bit clk); logic A, B; clocking C @(posedge clk); input #1step A; output #0 B; endclocking : C modport M(clocking C); endinterface : I ... class X; virtual I.M V; ... @(V.C) if (V.C.A) V.C.B <= '0; ... endclass : X This is good, but note the extreme clumsiness of the repeated "V.C." paths. Is there any insuperable difficulty with creating some more "virtual" types, and in particular a "virtual clocking"? class X2; // speculative use of virtual clocking virtual interface I.M V; // prefer "interface" to be explicit now virtual clocking I.M.C C; ... C = V.C; ... @(C) if (C.A) C.B <= '0; ... endclass : X2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even more speculatively: would that allow me to say virtual clocking C; default clocking C; so that I can freely use ## cycle-delay syntax within my class? Probably not, because of the possibility of C being null, or being re-targeted, at runtime. Thanks -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 Email: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com This e-mail and any attachments are confidential and Doulos Ltd. reserves all rights of privilege in respect thereof. It is intended for the use of the addressee only. If you are not the intended recipient please delete it from your system, any use, disclosure, or copying of this document is unauthorised. The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.Received on Thu Nov 16 07:01:30 2006
This archive was generated by hypermail 2.1.8 : Thu Nov 16 2006 - 07:02:02 PST