[sv-bc] Two action items from 4/26 meeting (issues 12 and 20)

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Sat May 08 2004 - 10:52:46 PDT

As noted in http://www.eda.org/sv-bc/minutes/sv-bc_04_04_26.txt ,
I was assigned two action items on 4/26, namely, investigating
    http://www.eda.org/sv-bc/display_issue.cgi?issue_num=12
and
    http://www.eda.org/sv-bc/display_issue.cgi?issue_num=20 .

The erratum of issue 20 was fixed in Draft 3 as an addition to LRM-58.
See 22.1 of http://www.eda.org/sv/SystemVerilog_3.1a_draft3.pdf .

Issue 12 is about about how to refer to a slice of an array of
interface instances when the elements of the slice are connected
using modports.

Connecting an entire array of 'server' instances, each of which is
to be connected using the same kind of 'slave' modport, would be
denoted by

         servers.slave

But, for slices, should we write

         servers.master[0], servers.slave[1:7]

or
         servers[0].master, servers[1:7].slave

??

I now think the second form is the logically correct choice. The first
form seems to suggest that it's the modport, instead of the array, that
has elements.

Here's an example of the second form in context,

  localparam P = 8 ;

  interface IFC ( input clk ) ;
     ...
     modport master( input clk, input a, ... ) ;
     modport slave( input clk, output a, ... ) ;
     ...
  endinterface

  module top( input clk ) ;
    IFC servers [0:P-1] ( clk ) ;
    bottom bot ( servers[0].master, servers[1:P-1].slave ) ;
  endmodule

  module bottom ( IFC.master initiator , IFC.slave targets [1:P-1] ) ;
  generate for (genvar i = 1 ; i < P ; i++) begin : GENFOR
      assign targets[i].a = ... ;
      ...
  end
     ...
  endmodule

Two questions then. Is there general agreement that the second form
is the correct syntax? And should we add an example to the LRM?

Two arguments against adding such an example is that

  1) Logically, only the second form makes sense, so there's no need
      to point that out explicitly.

  2) There is little discussion of arrays of interfaces in the LRM,
      so there's little need to add an example of this particular
      aspect of them.

I suggest that we take a vote confirming that the second form is
the correct syntax, record an example in the minutes, and close
Issue 12 as fixed without making any modification to the LRM.

-- Brad

  
Received on Sat May 8 10:52:48 2004

This archive was generated by hypermail 2.1.8 : Sat May 08 2004 - 10:53:21 PDT