Package: MdioPkg
- File: MdioPkg.vhd
Constants
Name | Type | Value | Description |
---|---|---|---|
MDIO_CMD_INIT_C | MdioCommandType | ( rdNotWr => '1', phyAddr => (others => '0'), regAddr => (others => '0'), dataOut => (others => '1') ) |
Types
Name | Type | Description |
---|---|---|
MdioCommandType | A command to be submitted to the MdioCore. Use the 'mdioReadCommand()/mdioWriteCommand() convenience functions to initialize/create a MdioCommandType object. | |
MdioInstType | An mdio instruction. This record is intended to be used as an element in a MdioProgramArray which is a list of MdioCommandTypes amended with a 'last' bit. The 'last' bit marks the last command of a sequence. | |
MdioProgramArray | array (natural range <>) of MdioInstType | A sequence of instructions. The 'MdioSeqCore' module processes a sequence of commands up to and including one that has the 'theLast' flag set. An array may typically contain more than one sequence of instructions. The user submits the index of the first instruction to the MdioSeqCore which then executes commands up to the next one that has the 'last' flag set. Example: constant seq1 : MdioProgramArray := ( mdioWriteInst( PHY, REG0, DATA0 ); mdioWriteInst( PHY, REG1, DATA1 ); mdioWriteInst( PHY, REG2, DATA2, true ); ); constant seq2 : MdioProgramArray := ( mdioWriteInst( PHY, REGx, DATAx ); mdioWriteInst( PHY, REGy, DATAy, true ); ); constant PROGRAMS_C : MdioProgramArray := ( seq1 & seq2 ); constant SEQ_1_START_C : natural := 0; constant SEQ_2_START_C : natural := SEQ_1_START_C + seq1'length; PROGRAMS_C is then used as the MDIO_PROG_G generic (MdioSeqCore) and the indices 'SEQ_1_START_C', 'SEQ_2_START_C' etc. are used to initiate processing of the respective sequences. |
Functions
- mdioReadCommand ( phyAddr : in natural;
regAddr : in natural ) return MdioCommandType
Description
create a READ command
- mdioWriteCommand ( phyAddr : in natural;
regAddr : in natural;
dataOut : in slv(15 downto 0) ) return MdioCommandType
Description
create a WRITE command
- mdioReadInst ( phyAddr : in natural;
regAddr : in natural;
theLast : in boolean := false ) return MdioInstType
Description
create/initialize a READ instruction. 'theLast' must
be set to 'true' if this instruction is the last one
of a sequence.
- mdioWriteInst ( phyAddr : in natural;
regAddr : in natural;
dataOut : in slv(15 downto 0);
theLast : in boolean := false ) return MdioInstType
Description
create/initialize a WRITE instruction. 'theLast' must
be set to 'true' if this instruction is the last one
of a sequence.
- mdioProgNumReadTransactions ( prog : in MdioProgramArray ) return natural
Description
calculate the number of read transactions in a sequence