All Classes Namespaces Files Functions Variables Groups Pages
Use Clauses | Constants | Subtypes | Types | Components | Functions
ExamplePkg Package Reference

This package serves as an example package used by the ExampleComponent. More...

Package Body >> ExamplePkg

Functions

MyType   myFunction ( )
 An array of records.
MyType   myArgFunction (
x: in MyType
y: in integer
z: in integer
)
 An example function with no arguments.
ExampleSubSystemInfo   init ( num_dma: in natural :=DEFAULT_EXAMPLE_SUB_SYSTEM_INFO.NUM_DMA_ENGINES )
 Create an array type of the ExampleSubSystemInfo for dealing with multiples.
ExampleSubSystemInfoArray   toArray ( info: in ExampleSubSystemInfo :=DEFAULT_EXAMPLE_SUB_SYSTEM_INFO , num: in natural :=1 )
 Create an init function for easier maintenace if new parameters are ever added.

Use Clauses

numeric_std 
UtilityPkg 
BoardInfoPkg 
AvalonPkg 
DMAPkg 

Components

ExampleComponent  <Entity ExampleComponent>
 An example function with an argument list.
ExampleSubSystem  <Entity ExampleSubSystem>
 Create a toArray function to easily construct arrays of the same info.

Constants

CONST_VALUE  integer := 128
 An example constant.
MY_CONSTANT  integer := bitWidth ( CONST_VALUE )
DEFAULT_EXAMPLE_SUB_SYSTEM_INFO  ExampleSubSystemInfo := ( NUM_DMA_ENGINES = >1 )
 The number of DMA Engines of both types instantiated so NUM_DMA_ENGINES = 2 would result in 2 DMA_Readers and 2 DMA Writers being instantiated.

Types

MyType is array ( natural range<> ) of std_logic
 An example custom type.
MyDataArray is array ( natural range<> ) of std_logic_vector ( CONST_VALUE - 1 downto 0 )
 An example custom type array.
record: MyRecord valid : std_logic
data : std_logic_vector ( MY_DATA_RANGE )
 An example record.
ArrayOfMyRecord is array ( natural range<> ) of MyRecord
 This is a data field.
record: ExampleSubSystemInfo NUM_DMA_ENGINES : natural range 1 to DMA_MAX_ENGINES / 2
 ExampleSubSystem Configuration Parameters.
ExampleSubSystemInfoArray is array ( natural range<> ) of ExampleSubSystemInfo
 A default ExampleSubSystemInfo.

Subtypes

MY_DATA_RANGE  natural range 7 downto 0
 An example subtype.

Detailed Description

This package serves as an example package used by the ExampleComponent.

Definition at line 60 of file ExamplePkg.vhd.

Member Function Documentation

MyType myFunction ( )
Function

An array of records.

Definition at line 110 of file ExamplePkg.vhd.

MyType myArgFunction (   x in MyType ,
  y in integer ,
  z in integer  
)
Function

An example function with no arguments.

Returns
Some value of type MyType.

Definition at line 118 of file ExamplePkg.vhd.

ExampleSubSystemInfo init (   num_dma in natural :=DEFAULT_EXAMPLE_SUB_SYSTEM_INFO .NUM_DMA_ENGINES  
)
Function

Create an array type of the ExampleSubSystemInfo for dealing with multiples.

Definition at line 172 of file ExamplePkg.vhd.

ExampleSubSystemInfoArray toArray (   info in ExampleSubSystemInfo :=DEFAULT_EXAMPLE_SUB_SYSTEM_INFO ,
  num in natural := 1  
)
Function

Create an init function for easier maintenace if new parameters are ever added.

Definition at line 175 of file ExamplePkg.vhd.

Member Data Documentation

numeric_std
Package

Definition at line 21 of file ExamplePkg.vhd.

UtilityPkg
Package

Definition at line 23 of file ExamplePkg.vhd.

BoardInfoPkg
Package

Definition at line 24 of file ExamplePkg.vhd.

AvalonPkg
Package

Definition at line 25 of file ExamplePkg.vhd.

DMAPkg
Package

Definition at line 26 of file ExamplePkg.vhd.

CONST_VALUE integer := 128
Constant

An example constant.

Definition at line 72 of file ExamplePkg.vhd.

MY_CONSTANT integer := bitWidth ( CONST_VALUE )
Constant

bitWidth(AVALON_ST_MAX_DATA_WIDTH) is the largest it can ever be. (log2) That is assuming all but ONE 1 bit symbols are empty during the beat.

Definition at line 76 of file ExamplePkg.vhd.

MY_DATA_RANGE natural range 7 downto 0
Subtype

An example subtype.

Definition at line 83 of file ExamplePkg.vhd.

MyType is array ( natural range<> ) of std_logic
Type

An example custom type.

Definition at line 86 of file ExamplePkg.vhd.

MyDataArray is array ( natural range<> ) of std_logic_vector ( CONST_VALUE - 1 downto 0 )
Type

An example custom type array.

Definition at line 89 of file ExamplePkg.vhd.

MyRecord ( valid : std_logic
data : std_logic_vector ( MY_DATA_RANGE )  
)
Type

An example record.

Definition at line 93 of file ExamplePkg.vhd.

ArrayOfMyRecord is array ( natural range<> ) of MyRecord
Type

This is a data field.

Definition at line 101 of file ExamplePkg.vhd.

ExampleComponent
Component

An example function with an argument list.

Parameters
[in]xPassed in MyType
[in]yPassed in first argument.
[in]zPassed in second argument.
Returns
Some value of MyType.

Definition at line 124 of file ExamplePkg.vhd.

ExampleSubSystemInfo ( NUM_DMA_ENGINES : natural range 1 to DMA_MAX_ENGINES / 2
 
)
Type

ExampleSubSystem Configuration Parameters.

Definition at line 158 of file ExamplePkg.vhd.

DEFAULT_EXAMPLE_SUB_SYSTEM_INFO ExampleSubSystemInfo := ( NUM_DMA_ENGINES = >1 )
Constant

The number of DMA Engines of both types instantiated so NUM_DMA_ENGINES = 2 would result in 2 DMA_Readers and 2 DMA Writers being instantiated.

Definition at line 166 of file ExamplePkg.vhd.

ExampleSubSystemInfoArray is array ( natural range<> ) of ExampleSubSystemInfo
Type

A default ExampleSubSystemInfo.

Definition at line 169 of file ExamplePkg.vhd.

ExampleSubSystem
Component

Create a toArray function to easily construct arrays of the same info.

Definition at line 181 of file ExamplePkg.vhd.


The documentation for this class was generated from the following file: