Named composite modes would be "invoked" within a port list, but they need not be declared within the port or component/entity/procedure declaration. The mode could be defined in the context of a record type (thereby limiting its use to connect to objects of that type, but allowing its use on any port of that type). More than one mode (e.g. master, slave) could be defined for that record type. And the same way a port type must be visible to the component entity declaration, so must the port mode, so it would seem logical to place both the record type and its associated modes in a package invoked by the both the entity and the instantiating architecture.
Proposed usage model:
1. Declare a record type (e.g. bus_type)
2. Declare one or more modes (e.g. master_mode, slave_mode) for that record type which define the mode to be used for each element of the record (in, out, inout, etc.).
3. Declare one or more signals of that record type (e.g. my_bus).
4. Declare one or more entities/components/procedures with ports using the record type and mode(s) (e.g. slave_device, master_device).
5. Instantiate one or more entities/components or call procedures, and bind their port(s) to the signal(s).
Arrays and/or arrays of records:
Should named modes be usable with composite types in general (arrays and records), or just with records?
How would we handle a port for an array of records, for which each array element uses the same named mode, as opposed to a named mode declared for an array of records (assuming a named mode could include other named modes for sub-elements)? Maybe it would be as simple as declaring a mode for the array type that is just (others => mode). Would an array mode definition such as (1 => master, others => slave) make sense?
Could/should we be able to declare a named mode for an unconstrained array type (probably only if it was of the form (others => mode)), or would the sub-element record's mode be implicitly applicable to all elements of an array of same (the same way in, out, inout, etc. work)? Think of a component that instantiates an array of devices connected to an array of busses; it would be beneficial to be able to parameterize the number of devices/busses, but perhaps not necessary to be able to invoke different modes on different records within the array.
Maybe the first-order approach would be that a named mode can only be declared for a record type, but that mode is applicable both to ports of that type and also to ports of any array of that type on a per-record basis.
Andy D Jones
Electrical Engineering
Lockheed Martin Missiles and Fire Control
Dallas TX
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Mar 8 07:24:16 2011
This archive was generated by hypermail 2.1.8 : Tue Mar 08 2011 - 07:24:42 PST