|
LCS-2016-045c |
|
5 |
|
26-Mar-17 |
|
Voting |
|
Brent Hayhoe and Patrick Lehmann |
|
|
|
Interface Construct and Port Mode Configurations Use Case - Complex RTL Signal CPU Interface |
|
History |
|
This LCS details a new attribute for the mode view construct. |
|
LCS-2016-045a LCS-2016-045b |
M'CONVERSE | Kind: | Mode view. |
Prefix: | Any named mode view M of composite type T, or an alias thereof. |
-- 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;
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 & 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.
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. |