Entity: UdpEngineDhcp
- File: UdpEngineDhcp.vhd
Diagram
Description
Company : SLAC National Accelerator Laboratory
Description: DHCP Engine
This file is part of 'SLAC Firmware Standard Library'. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of 'SLAC Firmware Standard Library', including this file, may be copied, modified, propagated, or distributed except according to
the terms contained in the LICENSE.txt file.
Generics
Generic name | Type | Value | Description |
---|---|---|---|
TPD_G | time | 1 ns | Simulation Generics |
CLK_FREQ_G | real | 156.25E+06 | In units of Hz |
COMM_TIMEOUT_G | positive | 30 | |
SYNTH_MODE_G | string | "inferred" | RAM/FIFO synthesis mode |
Ports
Port name | Direction | Type | Description |
---|---|---|---|
localMac | in | slv(47 downto 0) | big-Endian configuration |
localIp | in | slv(31 downto 0) | big-Endian configuration |
dhcpIp | out | slv(31 downto 0) | big-Endian configuration |
ibDhcpMaster | in | AxiStreamMasterType | Interface to DHCP Engine |
ibDhcpSlave | out | AxiStreamSlaveType | |
obDhcpMaster | out | AxiStreamMasterType | |
obDhcpSlave | in | AxiStreamSlaveType | |
clk | in | sl | Clock and Reset |
rst | in | sl |
Signals
Name | Type | Description |
---|---|---|
r | RegType | |
rin | RegType | |
rxMaster | AxiStreamMasterType | |
rxSlave | AxiStreamSlaveType | |
txMaster | AxiStreamMasterType | |
txSlave | AxiStreamSlaveType |
Constants
Name | Type | Value | Description |
---|---|---|---|
DHCP_CONFIG_C | AxiStreamConfigType | ssiAxiStreamConfig(4) | |
TIMER_1_SEC_C | natural | getTimeRatio(CLK_FREQ_G, 1.0) |
|
CLIENT_HDR_C | slv(31 downto 0) | x"00060101" | 0x01010600 |
SERVER_HDR_C | slv(31 downto 0) | x"00060102" | 0x02010600 |
MAGIC_COOKIE_C | slv(31 downto 0) | x"63538263" | 0x63825363 |
COMM_TIMEOUT_C | positive | ite((COMM_TIMEOUT_G > 3), COMM_TIMEOUT_G, 3) |
|
REG_INIT_C | RegType | ( localMac => (others => '0'), heartbeat => '0', cnt => 0, timer => 0, commCnt => 3, -- Default to 3 seconds after bootup renewCnt => (others => '0'), leaseCnt => (others => '0'), leaseTime => (others => '0'), remoteMac => (others => '1'), -- Broadcast MAC Address remoteIp => (others => '1'), -- Broadcast IP Address dhcpIP => (others => '0'), dhcpReq => '0', xid => (others => '0'), yiaddr => (others => '0'), siaddr => (others => '0'), yiaddrTemp => (others => '0'), siaddrTemp => (others => '0'), index => 0, valid => (others => '0'), opCode => (others => '0'), len => (others => '0'), msgType => (others => '0'), rxSlave => AXI_STREAM_SLAVE_INIT_C, txMaster => AXI_STREAM_MASTER_INIT_C, decode => CODE_S, state => IDLE_S) |
Types
Name | Type | Description |
---|---|---|
StateType | ( IDLE_S, REQ_S, BOOTP_S, DHCP_S, VERIFY_S) |
|
DecodeType | ( CODE_S, LEN_S, DATA_S) |
|
RegType |
Processes
- comb: ( localIp, localMac, r, rst, rxMaster, txSlave )
- seq: ( clk )
Instantiations
- FIFO_RX: surf.AxiStreamFifoV2
- FIFO_TX: surf.AxiStreamFifoV2