OpenCores

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [sim/] [top/] [ptp_drv_bfm/] [ptp_drv_bfm.c] - Rev 21

Go to most recent revision | Compare with Previous | Blame | View Log

#include <stdio.h>
 
#include "svdpi.h"
#include "../dpiheader.h"
int ptp_drv_bfm_c(double fw_delay)
{
  int cpu_addr_i;
  int cpu_data_i;
  int cpu_data_o;
 
  int t;
  for (t=0; t<=4000; t=t+4) 
  {
 
      cpu_addr_i = 0x00000000+t;
      cpu_data_i = t+0;
      cpu_wr(cpu_addr_i, cpu_data_i);
 
      //cpu_hd(50);
 
      cpu_addr_i = 0x00000000+t;
      cpu_rd(cpu_addr_i, &cpu_data_o);
 
      //cpu_hd(100);
  }
 
  return(0); /* Return success (required by tasks) */
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2014 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.