The first part refers to this par statement:../src/main.xc:305:3: error: use of `usage.anon.38' violates parallel usage rules
par
^~~
D:/CSSD Documents/XMOS/Workspace/500 Rack Application/V0-4/lib_ethernet/src/mii_ethernet_rt_mac.xc:394:7: note: object used here
global_tile_id = get_tile_id_from_chanend(c_macaddr_filter);
^~~~~~~~~~~~~~
called by usage.anon.39
called by mii_ethernet_rt_mac
called by usage.anon.169
D:/CSSD Documents/XMOS/Workspace/500 Rack Application/V0-4/lib_ethernet/src/mii_ethernet_rt_mac.xc:394:7: note: object used here
global_tile_id = get_tile_id_from_chanend(c_macaddr_filter);
^~~~~~~~~~~~~~
called by usage.anon.39
called by mii_ethernet_rt_mac
called by usage.anon.163
../src/main.xc:305:3: error: use of `usage.anon.23' violates parallel usage rules
par
^~~
D:/CSSD Documents/XMOS/Workspace/500 Rack Application/V0-4/lib_ethernet/src/mii_filter.xc:68:19: note: object used here
c_conf :> local_tile_id;
^~~~~~~~~~~~~
called by mii_ethernet_rt_mac
called by usage.anon.169
D:/CSSD Documents/XMOS/Workspace/500 Rack Application/V0-4/lib_ethernet/src/mii_filter.xc:68:19: note: object used here
c_conf :> local_tile_id;
^~~~~~~~~~~~~
called by mii_ethernet_rt_mac
called by usage.anon.163
xmake[1]: *** [bin//500RACK.xe] Error 1
xmake: *** [bin//500RACK.xe] Error 2
Code: Select all
par
{
on tile[1]: mii_ethernet_rt_mac(i_eth_cfg, NUM_ETH_CFG_CLIENTS,
i_eth_rx_lp, NUM_ETH_RX_LP_CLIENTS,
i_eth_tx_lp, NUM_ETH_TX_LP_CLIENTS,
c_eth_rx_hp, c_eth_tx_hp,
p_eth_rxclk, p_eth_rxerr,
p_eth_rxd, p_eth_rxdv,
p_eth_txclk, p_eth_txen, p_eth_txd,
eth_rxclk, eth_txclk,
ETH_RX_BUFFER_SIZE_WORDS,
ETH_TX_BUFFER_SIZE_WORDS,
ETHERNET_ENABLE_SHAPER);
Code: Select all
case i_cfg[int i].get_tile_id_and_timer_value(unsigned &tile_id, unsigned &time_on_tile): {
tile_id = get_tile_id_from_chanend(c_macaddr_filter);
global_tile_id = get_tile_id_from_chanend(c_macaddr_filter);
timer tmr;
tmr :> time_on_tile;
break;
Code: Select all
static unsigned int global_tile_id = 0;
Code: Select all
chan c_conf;
par {
mii_master_rx_pins(rx_mem,
(mii_packet_queue_t)&incoming_packets,
p_rx_rdptr,
p_rxdv, p_rxd, p_rxer, c);
mii_master_tx_pins(tx_mem_lp,
tx_mem_hp,
(mii_packet_queue_t)&tx_packets_lp,
(mii_packet_queue_t)&tx_packets_hp,
ts_queue, p_txd,
p_port_state);
mii_ethernet_filter(c, c_conf,
(mii_packet_queue_t)&incoming_packets,
(mii_packet_queue_t)&rx_packets_lp,
(mii_packet_queue_t)&rx_packets_hp);
mii_ethernet_server(rx_mem,
(mii_packet_queue_t)&rx_packets_lp,
(mii_packet_queue_t)&rx_packets_hp,
p_rx_rdptr,
tx_mem_lp,
tx_mem_hp,
(mii_packet_queue_t)&tx_packets_lp,
(mii_packet_queue_t)&tx_packets_hp,
ts_queue,
i_cfg, n_cfg,
i_rx_lp, n_rx_lp,
i_tx_lp, n_tx_lp,
c_rx_hp,
c_tx_hp,
c_conf,
p_port_state);
}
Code: Select all
case i_cfg[int i].add_macaddr_filter(size_t client_num, int is_hp,
ethernet_macaddr_filter_t entry) ->
ethernet_macaddr_filter_result_t result:
unsafe {
c_macaddr_filter <: 0;
eth_global_filter_info_t * unsafe p;
c_macaddr_filter :> p;
result = ethernet_add_filter_table_entry(*p, client_num, is_hp, entry);
c_macaddr_filter <: global_tile_id;
}
break;
Code: Select all
case c_conf :> int:
// Give the routing table to the ethernet server to reconfigure
unsafe {
eth_global_filter_info_t * unsafe p = &filter_info;
c_conf <: p;
c_conf :> local_tile_id;
}
break;
Code: Select all
static unsigned int local_tile_id = 0;
How can sending data on a channel violate parallel usage rules?
Any other ideas how I can get the tile id into the mii_filter?