SURF  1.0
I2cPkg Package Reference
Package Body >> I2cPkg

Functions

I2cAxiLiteDevType   MakeI2cAxiLiteDevType (
i2cAddress: in slv
dataSize: in integer
addrSize: in integer
endianness: in sl
repeatStart: in sl '0'
)
natural   maxAddrSize ( constant devMap: in I2cAxiLiteDevArray )

Libraries

ieee 

Use Clauses

std_logic_1164 
StdRtlPkg  Package <StdRtlPkg>

Components

i2c_master_byte_ctrl  <Entity i2c_master_byte_ctrl>

Constants

I2C_INVALID_ADDR_ERROR_C  slv ( 7 downto 0 ) := X " 01 "
I2C_WRITE_ACK_ERROR_C  slv ( 7 downto 0 ) := X " 02 "
I2C_ARBITRATION_LOST_ERROR_C  slv ( 7 downto 0 ) := X " 03 "
I2C_REG_MASTER_IN_INIT_C  I2cRegMasterInType := ( i2cAddr = > ( others = > ' 0 ' ) , tenbit = > ' 0 ' , regAddr = > ( others = > ' 0 ' ) , regWrData = > ( others = > ' 0 ' ) , regOp = > ' 0 ' , regAddrSkip = > ' 0 ' , regAddrSize = > ( others = > ' 0 ' ) , regDataSize = > ( others = > ' 0 ' ) , regReq = > ' 0 ' , busReq = > ' 0 ' , endianness = > ' 0 ' , repeatStart = > ' 0 ' )
I2C_REG_MASTER_OUT_INIT_C  I2cRegMasterOutType := ( regAck = > ' 0 ' , regFail = > ' 0 ' , regFailCode = > ( others = > ' 0 ' ) , regRdData = > ( others = > ' 0 ' ) )
I2C_SLAVE_IN_INIT_C  I2cSlaveInType := ( enable = > ' 0 ' , txValid = > ' 0 ' , txData = > ( others = > ' 0 ' ) , rxAck = > ' 0 ' )
I2C_SLAVE_OUT_INIT_C  I2cSlaveOutType := ( rxActive = > ' 0 ' , rxValid = > ' 0 ' , rxData = > ( others = > ' 0 ' ) , txActive = > ' 0 ' , txAck = > ' 0 ' , nack = > ' 0 ' )
I2C_AXIL_DEV_ARRAY_DEFAULT_C  I2cAxiLiteDevArray ( 0 to 3 ) := ( 0 = > ( MakeI2cAxiLiteDevType ( " 0000000 " , 8 , 8 , ' 0 ' ) ) , 1 = > ( MakeI2cAxiLiteDevType ( " 0000010 " , 16 , 16 , ' 0 ' ) ) , 2 = > ( MakeI2cAxiLiteDevType ( " 0000100 " , 32 , 8 , ' 0 ' ) ) , 3 = > ( MakeI2cAxiLiteDevType ( " 0001000 " , 32 , 32 , ' 0 ' ) ) )

Types

i2c_in_array array ( natural range <> ) of i2c_in_type
i2c_out_array array ( natural range <> ) of i2c_out_type
I2cRegMasterInArray array ( natural range <> ) of I2cRegMasterInType
I2cRegMasterOutArray array ( natural range <> ) of I2cRegMasterOutType
I2cAxiLiteDevArray array ( natural range <> ) of I2cAxiLiteDevType

Records

i2c_in_type  
scl  std_ulogic
sda  std_ulogic
i2c_out_type  
scloen  std_ulogic
sdaoen  std_ulogic
enable  std_ulogic
I2cMasterInType  
enable  sl
prescale  slv ( 15 downto 0 )
filter  slv ( 15 downto 0 )
txnReq  sl
stop  sl
op  sl
busReq  sl
addr  slv ( 9 downto 0 )
tenbit  sl
wrValid  sl
wrData  slv ( 7 downto 0 )
rdAck  sl
I2cMasterOutType  
busAck  sl
txnError  sl
wrAck  sl
rdValid  sl
rdData  slv ( 7 downto 0 )
I2cRegMasterInType  
i2cAddr  slv ( 9 downto 0 )
regAddr  slv ( 31 downto 0 )
regWrData  slv ( 31 downto 0 )
regOp  sl
regAddrSkip  sl
regAddrSize  slv ( 1 downto 0 )
regDataSize  slv ( 1 downto 0 )
regReq  sl
endianness  sl
repeatStart  sl
I2cRegMasterOutType  
regAck  sl
regFail  sl
regFailCode  slv ( 7 downto 0 )
regRdData  slv ( 31 downto 0 )
I2cSlaveInType  
txValid  sl
txData  slv ( 7 downto 0 )
rxAck  sl
I2cSlaveOutType  
rxActive  sl
rxValid  sl
rxData  slv ( 7 downto 0 )
txActive  sl
txAck  sl
nack  sl
I2cAxiLiteDevType  
i2cAddress  slv ( 9 downto 0 )
i2cTenbit  sl
dataSize  integer
addrSize  integer

Detailed Description

Definition at line 32 of file I2cPkg.vhd.

Member Function Documentation

◆ MakeI2cAxiLiteDevType()

I2cAxiLiteDevType MakeI2cAxiLiteDevType (   i2cAddress in slv ,
  dataSize in integer ,
  addrSize in integer ,
  endianness in sl ,
  repeatStart in sl ' 0 '  
)
Function

Definition at line 168 of file I2cPkg.vhd.

◆ maxAddrSize()

natural maxAddrSize (   devMap in I2cAxiLiteDevArray  
)
Function

Definition at line 184 of file I2cPkg.vhd.

Member Data Documentation

◆ ieee

ieee
Library

Definition at line 28 of file I2cPkg.vhd.

◆ std_logic_1164

std_logic_1164
Package

Definition at line 29 of file I2cPkg.vhd.

◆ StdRtlPkg

StdRtlPkg
Package

Definition at line 30 of file I2cPkg.vhd.

◆ i2c_in_type

i2c_in_type
Record

Definition at line 34 of file I2cPkg.vhd.

◆ scl

scl std_ulogic
Record

Definition at line 35 of file I2cPkg.vhd.

◆ sda

sda std_ulogic
Record

Definition at line 36 of file I2cPkg.vhd.

◆ i2c_in_array

i2c_in_array array ( natural range <> ) of i2c_in_type
Type

Definition at line 39 of file I2cPkg.vhd.

◆ i2c_out_type

i2c_out_type
Record

Definition at line 41 of file I2cPkg.vhd.

◆ scloen

scloen std_ulogic
Record

Definition at line 43 of file I2cPkg.vhd.

◆ sdaoen

sdaoen std_ulogic
Record

Definition at line 45 of file I2cPkg.vhd.

◆ enable [1/2]

enable std_ulogic
Record

Definition at line 46 of file I2cPkg.vhd.

◆ i2c_out_array

i2c_out_array array ( natural range <> ) of i2c_out_type
Type

Definition at line 49 of file I2cPkg.vhd.

◆ I2C_INVALID_ADDR_ERROR_C

I2C_INVALID_ADDR_ERROR_C slv ( 7 downto 0 ) := X " 01 "
Constant

Definition at line 52 of file I2cPkg.vhd.

◆ I2C_WRITE_ACK_ERROR_C

I2C_WRITE_ACK_ERROR_C slv ( 7 downto 0 ) := X " 02 "
Constant

Definition at line 53 of file I2cPkg.vhd.

◆ I2C_ARBITRATION_LOST_ERROR_C

I2C_ARBITRATION_LOST_ERROR_C slv ( 7 downto 0 ) := X " 03 "
Constant

Definition at line 54 of file I2cPkg.vhd.

◆ I2cMasterInType

Definition at line 56 of file I2cPkg.vhd.

◆ enable [2/2]

enable sl
Record

Definition at line 57 of file I2cPkg.vhd.

◆ prescale

prescale slv ( 15 downto 0 )
Record

Definition at line 58 of file I2cPkg.vhd.

◆ filter

filter slv ( 15 downto 0 )
Record

Definition at line 59 of file I2cPkg.vhd.

◆ txnReq

txnReq sl
Record

Definition at line 60 of file I2cPkg.vhd.

◆ stop

stop sl
Record

Definition at line 61 of file I2cPkg.vhd.

◆ op

op sl
Record

Definition at line 62 of file I2cPkg.vhd.

◆ busReq

busReq sl
Record

Definition at line 63 of file I2cPkg.vhd.

◆ addr

addr slv ( 9 downto 0 )
Record

Definition at line 64 of file I2cPkg.vhd.

◆ tenbit

tenbit sl
Record

Definition at line 65 of file I2cPkg.vhd.

◆ wrValid

wrValid sl
Record

Definition at line 66 of file I2cPkg.vhd.

◆ wrData

wrData slv ( 7 downto 0 )
Record

Definition at line 67 of file I2cPkg.vhd.

◆ rdAck

rdAck sl
Record

Definition at line 68 of file I2cPkg.vhd.

◆ I2cMasterOutType

Definition at line 71 of file I2cPkg.vhd.

◆ busAck

busAck sl
Record

Definition at line 72 of file I2cPkg.vhd.

◆ txnError

txnError sl
Record

Definition at line 73 of file I2cPkg.vhd.

◆ wrAck

wrAck sl
Record

Definition at line 74 of file I2cPkg.vhd.

◆ rdValid

rdValid sl
Record

Definition at line 75 of file I2cPkg.vhd.

◆ rdData

rdData slv ( 7 downto 0 )
Record

Definition at line 76 of file I2cPkg.vhd.

◆ I2cRegMasterInType

Definition at line 79 of file I2cPkg.vhd.

◆ i2cAddr

i2cAddr slv ( 9 downto 0 )
Record

Definition at line 80 of file I2cPkg.vhd.

◆ regAddr

regAddr slv ( 31 downto 0 )
Record

Definition at line 82 of file I2cPkg.vhd.

◆ regWrData

regWrData slv ( 31 downto 0 )
Record

Definition at line 83 of file I2cPkg.vhd.

◆ regOp

regOp sl
Record

Definition at line 84 of file I2cPkg.vhd.

◆ regAddrSkip

regAddrSkip sl
Record

Definition at line 85 of file I2cPkg.vhd.

◆ regAddrSize

regAddrSize slv ( 1 downto 0 )
Record

Definition at line 86 of file I2cPkg.vhd.

◆ regDataSize

regDataSize slv ( 1 downto 0 )
Record

Definition at line 87 of file I2cPkg.vhd.

◆ regReq

regReq sl
Record

Definition at line 88 of file I2cPkg.vhd.

◆ endianness

endianness sl
Record

Definition at line 90 of file I2cPkg.vhd.

◆ repeatStart

repeatStart sl
Record

Definition at line 91 of file I2cPkg.vhd.

◆ I2C_REG_MASTER_IN_INIT_C

I2C_REG_MASTER_IN_INIT_C I2cRegMasterInType := ( i2cAddr = > ( others = > ' 0 ' ) , tenbit = > ' 0 ' , regAddr = > ( others = > ' 0 ' ) , regWrData = > ( others = > ' 0 ' ) , regOp = > ' 0 ' , regAddrSkip = > ' 0 ' , regAddrSize = > ( others = > ' 0 ' ) , regDataSize = > ( others = > ' 0 ' ) , regReq = > ' 0 ' , busReq = > ' 0 ' , endianness = > ' 0 ' , repeatStart = > ' 0 ' )
Constant

Definition at line 94 of file I2cPkg.vhd.

◆ I2cRegMasterInArray

I2cRegMasterInArray array ( natural range <> ) of I2cRegMasterInType
Type

Definition at line 108 of file I2cPkg.vhd.

◆ I2cRegMasterOutType

Definition at line 110 of file I2cPkg.vhd.

◆ regAck

regAck sl
Record

Definition at line 111 of file I2cPkg.vhd.

◆ regFail

regFail sl
Record

Definition at line 112 of file I2cPkg.vhd.

◆ regFailCode

regFailCode slv ( 7 downto 0 )
Record

Definition at line 113 of file I2cPkg.vhd.

◆ regRdData

regRdData slv ( 31 downto 0 )
Record

Definition at line 114 of file I2cPkg.vhd.

◆ I2C_REG_MASTER_OUT_INIT_C

I2C_REG_MASTER_OUT_INIT_C I2cRegMasterOutType := ( regAck = > ' 0 ' , regFail = > ' 0 ' , regFailCode = > ( others = > ' 0 ' ) , regRdData = > ( others = > ' 0 ' ) )
Constant

Definition at line 117 of file I2cPkg.vhd.

◆ I2cRegMasterOutArray

I2cRegMasterOutArray array ( natural range <> ) of I2cRegMasterOutType
Type

Definition at line 123 of file I2cPkg.vhd.

◆ I2cSlaveInType

Definition at line 126 of file I2cPkg.vhd.

◆ txValid

txValid sl
Record

Definition at line 128 of file I2cPkg.vhd.

◆ txData

txData slv ( 7 downto 0 )
Record

Definition at line 129 of file I2cPkg.vhd.

◆ rxAck

rxAck sl
Record

Definition at line 130 of file I2cPkg.vhd.

◆ I2C_SLAVE_IN_INIT_C

I2C_SLAVE_IN_INIT_C I2cSlaveInType := ( enable = > ' 0 ' , txValid = > ' 0 ' , txData = > ( others = > ' 0 ' ) , rxAck = > ' 0 ' )
Constant

Definition at line 133 of file I2cPkg.vhd.

◆ I2cSlaveOutType

Definition at line 139 of file I2cPkg.vhd.

◆ rxActive

rxActive sl
Record

Definition at line 140 of file I2cPkg.vhd.

◆ rxValid

rxValid sl
Record

Definition at line 141 of file I2cPkg.vhd.

◆ rxData

rxData slv ( 7 downto 0 )
Record

Definition at line 142 of file I2cPkg.vhd.

◆ txActive

txActive sl
Record

Definition at line 143 of file I2cPkg.vhd.

◆ txAck

txAck sl
Record

Definition at line 144 of file I2cPkg.vhd.

◆ nack

nack sl
Record

Definition at line 145 of file I2cPkg.vhd.

◆ I2C_SLAVE_OUT_INIT_C

I2C_SLAVE_OUT_INIT_C I2cSlaveOutType := ( rxActive = > ' 0 ' , rxValid = > ' 0 ' , rxData = > ( others = > ' 0 ' ) , txActive = > ' 0 ' , txAck = > ' 0 ' , nack = > ' 0 ' )
Constant

Definition at line 148 of file I2cPkg.vhd.

◆ I2cAxiLiteDevType

Definition at line 159 of file I2cPkg.vhd.

◆ i2cAddress

i2cAddress slv ( 9 downto 0 )
Record

Definition at line 160 of file I2cPkg.vhd.

◆ i2cTenbit

i2cTenbit sl
Record

Definition at line 161 of file I2cPkg.vhd.

◆ dataSize

dataSize integer
Record

Definition at line 162 of file I2cPkg.vhd.

◆ addrSize

addrSize integer
Record

Definition at line 163 of file I2cPkg.vhd.

◆ I2cAxiLiteDevArray

I2cAxiLiteDevArray array ( natural range <> ) of I2cAxiLiteDevType
Type

Definition at line 176 of file I2cPkg.vhd.

◆ I2C_AXIL_DEV_ARRAY_DEFAULT_C

I2C_AXIL_DEV_ARRAY_DEFAULT_C I2cAxiLiteDevArray ( 0 to 3 ) := ( 0 = > ( MakeI2cAxiLiteDevType ( " 0000000 " , 8 , 8 , ' 0 ' ) ) , 1 = > ( MakeI2cAxiLiteDevType ( " 0000010 " , 16 , 16 , ' 0 ' ) ) , 2 = > ( MakeI2cAxiLiteDevType ( " 0000100 " , 32 , 8 , ' 0 ' ) ) , 3 = > ( MakeI2cAxiLiteDevType ( " 0001000 " , 32 , 32 , ' 0 ' ) ) )
Constant

Definition at line 178 of file I2cPkg.vhd.

◆ i2c_master_byte_ctrl

Definition at line 188 of file I2cPkg.vhd.


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