Language Change Specification for Interface Construct and Port Mode Configurations Proposal

LCS Number: LCS-2016-045c
Version: 5
Date: 26-Mar-17
Status: Voting
Author: Brent Hayhoe and Patrick Lehmann
Email:  
Source Doc: Interface Construct and Port Mode Configurations
Use Case - Complex RTL Signal CPU Interface
History Doc: History
Summary: This LCS details a new attribute for the mode view construct.
Related LCS: LCS-2016-045a
LCS-2016-045b

Voting Results: Cast your votes here

  • Yes:
    1. Brent Hayhoe - 2017-03-21 - Version 4
    2. Jim Lewis - 2017-03-12 - Version 5
    3. Steve Grout - 2017-03-16 - Version 1
    4. Rob Gaddi - 2017-03-30 - Version 5 - conditional of course on approval of 045a
    5. Patrick Lehmann - 2017-03-26 - Version 5

  • Abstain:

Style Notes

  • LRM text is shown between single quotes '... P1076 LRM quoted text ...'
  • Existing LRM text is shown in BLACK coloured font
  • Additional LRM text is shown in RED coloured font
  • Deleted LRM text is shown in RED with strike-through
  • In order to try and emphasize text in italic font:
    • Italic font in existing LRM text is shown in GRAY italic font
    • Italic font in new LRM text is shown in ORANGE italic font
    • Italic font in deleted LRM text is shown in ORANGE with strike-through
  • Editing instructions (and informative annotations) are shown in GREEN coloured font

Reviewing Notes

Version 5: 26-Mar-2017
  • Improved attribute 'CONVERSE
  • Shrank example to a minimum

Details of Language Change:

16.2.1 General

Predefined attributes denote values, functions, types, subtypes, mode views, signals, and ranges associated with various kinds of named entities. These attributes are described as follows. For each attribute, the following information is provided:
 — The kind of attribute: value, type, subtype, mode view, range, function, or signal
 — The prefixes for which the attribute is defined
 — A description of the parameter or argument, if one exists
 — The result of evaluating the attribute, and the result type (if applicable)
 — Any further restrictions or comments that apply

16.2.7 Predefined attributes of named mode views [New section]

%TABLE{disableallsort="on" tableframe="void" tablerules ="none" valign="baseline" dataalign="left" tablewidth ="800" columnwidths="15%,10%,70%"}%

M'CONVERSE Kind: Mode view.
  Prefix: Any named mode view M of composite type T, or an alias thereof.
| | Result: |>> A mode view of composite type T with each element mode EM declared as the converse as that of mode view M.
  • If EM is of mode in, the converse mode is out.
  • If EM is of mode out, the converse mode is in.
  • If EM is of mode inout, the converse mode is inout.
  • If EM is of mode buffer, the converse mode is in.
  • If EM is of mode null, the converse mode is null. [If LCS 045b is approved]
  • If EM is a mode view, the converse mode is EM'CONVERSE. <<|

Example:


-- A FIFO like streaming interface:
type StreamingIf is record
  Valid  : Std_uLogic;
  Data   : Std_uLogic_Vector(7 downto 0);
  Ack    : Std_uLogic;
end record StreamingIf;

view MasterView of StreamingIf is
   Valid : out;
   Data  : out;
   Ack   : in;
end view MasterView;

alias SlaveView is MasterView'CONVERSE;
-- Equivalent mode view declaration
-- view SlaveView of MasterView is
--    Valid : in;
--    Data  : in;
--    Ack   : out;
-- end view SlaveView;

-- A stream processing element
entity SPE is
  port (
    Clock  : in   Std_uLogic;
    Reset  : in   Std_uLogic;
    Input  : view SlaveView;   -- input from previous SPE
    Output : view MasterView   -- output to next SPE
  );
end entity;

Comments

This LCS does not show where the attribute is used.

-- Peter Flake - 2017-03-16

@PF: Use is shown in the new examples block.

Version 2

  • Attribute mode description updated for subviews.
  • Examples of use added.

-- Brent Hayhoe - 2017-03-19

The list of possible kinds must be edited (16.2.1).

Why are aliases excluded from the prefix?

Why is M'converse'converse not allowed?

Why uses the example 9-bit for e.g. RdData?

Why uses BusSlaveView such a heavy construct instead of an alias? alias BusSlaveView is BusMasterView'CONVERSE.

-- Patrick Lehmann - 2017-03-20

@PL2: Likewise. For an example, see array attributes or LCS 018

@PL5: Likewise. Example seems to be inconsistent with syntax. If 'CONVERSE is a record view, then it should be stand-alone or used with an alias and not inside of a view declaration.

-- Jim Lewis - 2017-03-20

@PL1: Added modifications to include mode view entity class kind.

@PL2 &
@JL1: Added missing alias reference in attribute prefix.

@PL3: Why is it disallowed?

@PL4: Why not? This is example code. Have you not heard of parity?

@PL5: The examples are there to indicate how one can define views and not necessarily in the most efficient manner. I have added an alias based declaration example.

@JL2: 'CONVERSE returns a mode view. Mode view declarations may contain mode views of composite elements within that declaration.

Version 3

  • Added modifications to section 16.2.1
  • Added alias to attribute prefix section 16.2.6
  • Added extra example illustrating use of alias to declare a mode view

-- Brent Hayhoe - 2017-03-20

@BH WRT 'CONVERSE the example I object to is:

view BusSlaveView of BusRecordType is
   BusMasterView'CONVERSE
end view BusSlaveView;
Mode view declarations contain mode_view_element_definition. They may contain a choice whose mode is specified with a mode view as you demonstrated with SyncBusSlaveView. However, there are no syntax provisions for BusMasterView'CONVERSE by itself.

I think this example should be done with an alias as follows

alias BusSlaveView is  BusMasterView'CONVERSE ;

-- Jim Lewis - 2017-03-20

In 16.2.1, why did you change "named entities" to "named entity classes". The LRM uses "named entity" and "named entities" to mean any named object in numerous places. OTOH, "named entity classes" is probably not defined anywhere.

-- Jim Lewis - 2017-03-20

I'm with Jim there, I think that you can have


type HoldTheBus is record
  busstop : BusRecordType
end record HoldTheBus;

view BusSlaveView of HoldTheBus is
   busstop : view BusMasterView'CONVERSE
end view BusSlaveView;

but don't see how you can legally have

view BusSlaveView of BusRecordType is
   BusMasterView'CONVERSE
end view BusSlaveView;

-- Rob Gaddi - 2017-03-23

@RG & @JL WRT BusMasterView'CONVERSE

Point taken. I've been thinking about it this way for so long that it seemed natural.

I think alias is the correct way to make this converse declaration.

We now do not need the second example.

@JL WRT 16.2.1 "entity classes"

The BNF in the attribute defines what an entity class is. We seem to have a lot of confusion over entities and the entity class entity in the text. i thought that this may clarify the text.

OTOH, we also talk about objects a lot when we mean object class. I'm not sure how we should go with this one and am happy to leave it as entities. There is a technical grammar here to be followed. I'm not the one to specify that.

Version 4

  • Removed "entity classes" reference.
  • Changed 'CONVERSE mode view declaration to be alias based.
  • Removed second example.

-- Brent Hayhoe - 2017-03-21

Do we really need such a big example in the LRM? I suggest a smaller FIFO/Streaming bus example (Data, Valid, Ack).

The Result row in the attribute description should mention that the modes are in the same order. I somehow dislike the <...> notation.

The wording element mode does not apply to slices.

M'CONVERSE Kind: Mode view.
  Prefix: Any named mode view M of composite type T, or an alias thereof, as defined in 6.5.2.1.
  Result: A mode view of composite type T with each element mode EM declared as the converse as that of mode view M.
    * If EM is of mode in, the converse mode is out.
    * If EM is of mode out, the converse mode is in.
    * If EM is of mode inout, the converse mode is inout.
    * If EM is of mode buffer, the converse mode is in.
    * If EM is of mode null, the converse mode is null.
    * If EM is a mode view, the converse mode is EM'CONVERSE.
  Restrictions: A mode of linkage is disallowed within a mode view.

-- Patrick Lehmann - 2017-03-25

Version 5

Topic revision: r23 - 2017-07-24 - 19:46:30 - JimLewis
 
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback