Any ways,
Finally I have removed the eth_switch and one pkt_buff thread completely. I use two threads mii_main & eth_server from main function and that two threads are connected with two streaming channels for both way data transfer.
Mac filter has not implemented properly. Actually I am very much confuse for where to implement the mac filter. I want it in mii_rx_buf(..) function but here no mac information is present. ethServer(…) function has mac & IP addr ready.
Please give your opinion & go through the following reference below & tell me is it ok or you need some different approach.
Code: Select all
Main.xc
----------
par
{
// Threads constrained by I/O or latency requirements
on stdcore[2]: miimain(c_mii_client_0, c_mii_tx_0,
clk_mii_rx_0, p_mii_rxclk_0, p_mii_rxd_0, p_mii_rxdv_0, p_mii_rxer_0,
clk_mii_tx_0, p_mii_txclk_0, p_mii_txd_0, p_mii_txen_0,
clk_mii_ref, clk_smi, p_smi_mdc_0, p_smi_mdio_0, p_mii_resetn
);
on stdcore[0]: leddrive(c_led_data_out, c_led_cmds_out,
p_led_out_r0, p_led_out_g0, p_led_out_b0, p_led_out_r1, p_led_out_g1, p_led_out_b1,
p_led_out_addr, p_led_out_clk , p_led_out_ltch, p_led_out_oe ,
b_led_clk, b_led_data, b_led_gsclk, b_ref);
on stdcore[0]: spiFlash(cSpiFlash, p_flash_miso, p_flash_ss, p_flash_clk, p_flash_mosi, b_flash_clk, b_flash_data);
// Unconstrained threads
on stdcore[2]: ethServer(c_mii_client_0, c_mii_tx_0, c_led_data_in, c_led_cmds_in, cSpiFlash);
on stdcore[2]: ledbuffer(c_led_data_in, c_led_data_out);
on stdcore[2]: pktbuffer(c_led_cmds_in, c_led_cmds_out);
}
jags