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 26 and 31

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 26 Rev 31
Line 133... Line 133...
      cpu_data_i = 0x0;
      cpu_data_i = 0x0;
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_addr_i = 0x00000000;
      cpu_addr_i = 0x00000000;
      cpu_data_i = 0x400;
      cpu_data_i = 0x400;
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_wr(cpu_addr_i, cpu_data_i);
 
      do {
 
        cpu_addr_i = 0x00000000;
 
        cpu_rd(cpu_addr_i, &cpu_data_o);
 
        //printf("%08x\n", (cpu_data_o & 0x1));
 
      } while ((cpu_data_o & 0x400) == 0x0);
      cpu_addr_i = 0x00000050;
      cpu_addr_i = 0x00000050;
      cpu_rd(cpu_addr_i, &cpu_data_o);
      cpu_rd(cpu_addr_i, &cpu_data_o);
      printf("\nRx stamp: \n%08x\n", cpu_data_o);
      printf("\nRx stamp: \n%08x\n", cpu_data_o);
      cpu_addr_i = 0x00000054;
      cpu_addr_i = 0x00000054;
      cpu_rd(cpu_addr_i, &cpu_data_o);
      cpu_rd(cpu_addr_i, &cpu_data_o);
Line 156... Line 161...
      cpu_data_i = 0x0;
      cpu_data_i = 0x0;
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_addr_i = 0x00000000;
      cpu_addr_i = 0x00000000;
      cpu_data_i = 0x100;
      cpu_data_i = 0x100;
      cpu_wr(cpu_addr_i, cpu_data_i);
      cpu_wr(cpu_addr_i, cpu_data_i);
 
      do {
 
        cpu_addr_i = 0x00000000;
 
        cpu_rd(cpu_addr_i, &cpu_data_o);
 
        //printf("%08x\n", (cpu_data_o & 0x1));
 
      } while ((cpu_data_o & 0x100) == 0x0);
      cpu_addr_i = 0x00000058;
      cpu_addr_i = 0x00000058;
      cpu_rd(cpu_addr_i, &cpu_data_o);
      cpu_rd(cpu_addr_i, &cpu_data_o);
      printf("\nTx stamp: \n%08x\n", cpu_data_o);
      printf("\nTx stamp: \n%08x\n", cpu_data_o);
      cpu_addr_i = 0x0000005C;
      cpu_addr_i = 0x0000005C;
      cpu_rd(cpu_addr_i, &cpu_data_o);
      cpu_rd(cpu_addr_i, &cpu_data_o);

powered by: WebSVN 2.1.0

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