OpenCores
URL https://opencores.org/ocsvn/ha1588/ha1588/trunk

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [sim/] [top/] [ptp_drv_bfm/] [ptp_drv_bfm.c] - Diff between revs 44 and 46

Show entire file | Details | Blame | View Log

Rev 44 Rev 46
Line 74... Line 74...
#define TSU_TXQUE_DATA_LL 0x0000007C
#define TSU_TXQUE_DATA_LL 0x0000007C
// define TSU control values
// define TSU control values
#define TSU_SET_CTRL_0  0x00
#define TSU_SET_CTRL_0  0x00
#define TSU_GET_RXQUE   0x01
#define TSU_GET_RXQUE   0x01
#define TSU_SET_RXRST   0x02
#define TSU_SET_RXRST   0x02
#define TSU_SET_RXMSGID 0xFF000000  // FF to enable 0x0 to 0x7
 
#define TSU_GET_TXQUE   0x01
#define TSU_GET_TXQUE   0x01
#define TSU_SET_TXRST   0x02
#define TSU_SET_TXRST   0x02
#define TSU_SET_TXMSGID 0xFF000000  // FF to enable 0x0 to 0x7
// define TSU data values
 
#define TSU_MASK_RXMSGID 0xFF000000  // FF to enable 0x0 to 0x7
 
#define TSU_MASK_TXMSGID 0xFF000000  // FF to enable 0x0 to 0x7
 
 
int ptp_drv_bfm_c(double fw_delay)
int ptp_drv_bfm_c(double fw_delay)
{
{
  unsigned int cpu_addr_i;
  unsigned int cpu_addr_i;
  unsigned int cpu_data_i;
  unsigned int cpu_data_i;
Line 231... Line 232...
  int rx_queue_num;
  int rx_queue_num;
  int tx_queue_num;
  int tx_queue_num;
 
 
  // CONFIG TSU
  // CONFIG TSU
  cpu_addr_i = TSU_RXQUE_STATUS;
  cpu_addr_i = TSU_RXQUE_STATUS;
  cpu_data_i = TSU_SET_RXMSGID;
  cpu_data_i = TSU_MASK_RXMSGID;
  cpu_wr(cpu_addr_i, cpu_data_i);
  cpu_wr(cpu_addr_i, cpu_data_i);
 
 
  cpu_addr_i = TSU_TXQUE_STATUS;
  cpu_addr_i = TSU_TXQUE_STATUS;
  cpu_data_i = TSU_SET_TXMSGID;
  cpu_data_i = TSU_MASK_TXMSGID;
  cpu_wr(cpu_addr_i, cpu_data_i);
  cpu_wr(cpu_addr_i, cpu_data_i);
 
 
  // RESET TSU
  // RESET TSU
  cpu_addr_i = TSU_RXCTRL;
  cpu_addr_i = TSU_RXCTRL;
  cpu_data_i = TSU_SET_CTRL_0;
  cpu_data_i = TSU_SET_CTRL_0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.