Interfaces LCS/Proposal Notes

View Structure

Views give mode control to composite type objects declared in interface lists of entity structures.

Views have a slightly altered syntax, dependant on whether they apply to a record type or an array type.

Record View

Given a record type - 'MyRecordType':


type MyRecordType is
   record
      ElementA : ElementAType;
      ElementB : ElementBType;
      ElementC : ElementCType;
      ElementD,
      ElementE,
      ElementF : ElementDEFType;
   end record MyRecordType;

A view (MyRecordView) defining a particular mode definition for a given interface object of record type 'MyRecordType':


view MyRecordView of MyRecordType is
   record
      ElementA : ElementAMode;
      ElementB : ElementBMode;
      ElementC : ElementCMode;
      ElementD,
      ElementE,
      ElementF : ElementDEFMode;
   end record view MyRecordView;

Array View

Given an array type - 'MyArrayType':


type MyArrayType is
   array(
      of ElementType;

A view (MyArrayView) defining a particular mode definition for a given interface object of record type 'MyArrayType':


view MyArrayView of MyArrayType is
   array(
      TypeRangeZ : TypeRangeZMode,
      TypeRangeY : TypeRangeYMode,
      TypeRangeX : TypeRangeXMode)
   end array view MyArrayView;

Examples

Some general examples of usage.

Bottom level is a general peripheral interface:


type MyPeripheralType is
   record
      Select     : Std_uLogic;
      Enable     : Std_uLogic;
      Read_Write : Std_uLogic;
      ReadData   : Std_uLogic_Vector(31 downto 0);
      WriteData  : Std_uLogic_Vector(31 downto 0);
   end record MyPeripheralType;


view MyPeripheralView of MyPeripheralType is
   record
      Select     : in;
      Enable     : in;
      Read_Write : in;
      ReadData   : in;
      WriteData  : out;
end record view MyPeripheralView;

One peripheral interface is then mapped into an array of many peripheral interfaces. The new mode null is used to disconnect all other peripheral interfaces and allow one to be connected using a generic value:


type MyInterfaceType is
   array(50 downto 1)
      of MyPeripheralType;


view MyInterfaceView of MyInterfaceType is
   generic(
      constant value_g : Positive);
   array(
      50      : in,
      value_g : view MyPeripheralView,
      others  : null);
   end array view MyInterfaceView;
The top level adds in interface clock and reset:


type MyTopBusType is
   record
      Reset       : Std_uLogic;
      Clock       : Std_uLogic;
      MyInterface : MyInterfaceType;
   end record MyTopBusType;


view MyTopBusView of MyTopBusType is
   generic(
      constant item_g : Positive)
   record
      Reset       : in;
      Clock       : in;
      MyInterface : view MyInterfaceView(value_g => item_g);
end record view MyTopBusView;

Bundles

We need bundle objects to provide interconnect and bundle interface objects to define entity structure interfaces.

With a normal object we have:

object_class object_name : subtype indication ;

e.g.

signal MySignal : Natural ;

We need a similar syntax for a bundle:

bundle MyBundle : ????? ;

The association with a bundle is not a type because it has a composite object structure, so let's call it a group type. The only valid format for this(???) is record based:


group type MyGrype is
   record
      signal      ElementA : ElementAType;
      signal      ElementB : ElementBType;
      shared
         variable ElementC : ElementCType;
      signal      ElementD,
      signal      ElementE,
      signal      ElementF : ElementDEFType;
   end record MyGrype;

A bundle can only be declared in a concurrent code region?

But what about passing into a subprogram. Then we may want variables and constant classes in the bundle group type as well.

This may imply a view of a group type should be able to modify the object class structure??

A bundle of signal declarations may need to be passed into a function as a bundle of constant declarations.

Topic revision: r5 - 2016-12-29 - 17:13:31 - BrentHahoe
 
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback