I'm currently experimenting with the implementation of an Ethernet Stack in RTL logic. Nothing too complicated, just receiving and transmitting bare metal Ethernet packages.
However I'm struggling a little bit how to receive the correct traffic. For sending packages on the PC side I'm using Ostinato. I'm Debugging the received traffic via an Uart Interface. For some strange reason the FPGA seems to swallow Bytes.
A couple of Questions:
Regarding the preamble and start frame delimiter. Is it true that Always 7 Bytes have to be sent with 0x55 as Content following the 8th Byte with 0x5D or can the number of preamble Bytes also be shorter ?
During the Transmission of the data from the PC to the FPGA I would expect that the eth_rx_dv signal is always set to '1' as long as the message is. Is this correct?
What might it be that bytes are lost? Any ideas to track down the bug?
I'm using the 100Mbit Connection which was connected to a 25Mhz Clock.
I used the following Code from an FPGA UDP send example found online to connect the Clocks. Is anything missing or is the Receiver Clock recovered from the PC?:
-- Clocks ...
----------------------------------------------------
-- Correctly forward the clock out,so rising edge
-- will be in the middle of the valid data
----------------------------------------------------
clock_fwd_ddr : ODDR
generic map(
DDR_CLK_EDGE => "SAME_EDGE",
INIT => '0',
SRTYPE => "SYNC")
port map (
Q => eth_ref_clk,
C => clk25MHz,
CE => '1', R => '0', S => '0',
D1 => '0', D2 => '1'
);
-------------------------------------------------------
-- Generate a 25MHz and 50Mhz clocks from the 100MHz
-- system clock
-------------------------------------------------------
i_bufg: bufg port map (i => CLK100MHz, o => CLK100MHz_buffered);
clocking : PLLE2_BASE
generic map (
BANDWIDTH => "OPTIMIZED",
CLKFBOUT_MULT => 8,
CLKFBOUT_PHASE => 0.0,
CLKIN1_PERIOD => 10.0,
Question
wolfgangmeyerle
Hi,
I'm currently experimenting with the implementation of an Ethernet Stack in RTL logic. Nothing too complicated, just receiving and transmitting bare metal Ethernet packages.
However I'm struggling a little bit how to receive the correct traffic. For sending packages on the PC side I'm using Ostinato. I'm Debugging the received traffic via an Uart Interface. For some strange reason the FPGA seems to swallow Bytes.
A couple of Questions:
Regarding the preamble and start frame delimiter. Is it true that Always 7 Bytes have to be sent with 0x55 as Content following the 8th Byte with 0x5D or can the number of preamble Bytes also be shorter ?
During the Transmission of the data from the PC to the FPGA I would expect that the eth_rx_dv signal is always set to '1' as long as the message is. Is this correct?
What might it be that bytes are lost? Any ideas to track down the bug?
I'm using the 100Mbit Connection which was connected to a 25Mhz Clock.
I used the following Code from an FPGA UDP send example found online to connect the Clocks. Is anything missing or is the Receiver Clock recovered from the PC?:
-- Clocks ...
----------------------------------------------------
-- Correctly forward the clock out,so rising edge
-- will be in the middle of the valid data
----------------------------------------------------
clock_fwd_ddr : ODDR
generic map(
DDR_CLK_EDGE => "SAME_EDGE",
INIT => '0',
SRTYPE => "SYNC")
port map (
Q => eth_ref_clk,
C => clk25MHz,
CE => '1', R => '0', S => '0',
D1 => '0', D2 => '1'
);
-------------------------------------------------------
-- Generate a 25MHz and 50Mhz clocks from the 100MHz
-- system clock
-------------------------------------------------------
i_bufg: bufg port map (i => CLK100MHz, o => CLK100MHz_buffered);
clocking : PLLE2_BASE
generic map (
BANDWIDTH => "OPTIMIZED",
CLKFBOUT_MULT => 8,
CLKFBOUT_PHASE => 0.0,
CLKIN1_PERIOD => 10.0,
-- CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for each CLKOUT (1-128)
CLKOUT0_DIVIDE => 32, CLKOUT1_DIVIDE => 16, CLKOUT2_DIVIDE => 16,
CLKOUT3_DIVIDE => 16, CLKOUT4_DIVIDE => 16, CLKOUT5_DIVIDE => 16,
-- CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for each CLKOUT (0.001-0.999).
CLKOUT0_DUTY_CYCLE => 0.5, CLKOUT1_DUTY_CYCLE => 0.5, CLKOUT2_DUTY_CYCLE => 0.5,
CLKOUT3_DUTY_CYCLE => 0.5, CLKOUT4_DUTY_CYCLE => 0.5, CLKOUT5_DUTY_CYCLE => 0.5,
-- CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for each CLKOUT (-360.000-360.000).
CLKOUT0_PHASE => 0.0, CLKOUT1_PHASE => 0.0, CLKOUT2_PHASE => 0.0,
CLKOUT3_PHASE => 0.0, CLKOUT4_PHASE => 0.0, CLKOUT5_PHASE => 0.0,
DIVCLK_DIVIDE => 1,
REF_JITTER1 => 0.0,
STARTUP_WAIT => "FALSE"
)
port map (
CLKIN1 => CLK100MHz_buffered,
CLKOUT0 => CLK25MHz, CLKOUT1 => CLK50Mhz,
CLKOUT2 => open, CLKOUT3 => open,
CLKOUT4 => open, CLKOUT5 => open,
LOCKED => open,
PWRDWN => '0',
RST => '0',
CLKFBOUT => clkfb,
CLKFBIN => clkfb
);
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.