opencomputeproject / Time-Appliance-Project

Develop an end-to-end hypothetical reference model, network architectures, precision time tools, performance objectives and the methods to distribute, operate, monitor time synchronization within data center and much more...
MIT License
1.32k stars 101 forks source link

Some questions about MAC and Address mapped #66

Open Satoshier opened 2 years ago

Satoshier commented 2 years ago
  1. I noticed that MAC your official recommend is SA53. Can I use some other MAC or OCXO ,TCXO which can offer 10MHZ frequency source? If possible,how to deal with the problem of pins which are mismatch with the PCB of Beta-V1. I just wanna to replace it with our company’s MAC

  2. You opened source the implementation of FPGA then I imported the Vivado project. According the TC_SmaSelector IP CORE , I can configure the SMA input/ouput ports. If I change the configuration, does it means that I should regenerate the bitstream files? I think it is a bit of trouble. In /Time Appliance Project/Time Card/Usage, by using the LINUX command such as " echo OUT: MAC >> sma1" which can also configure the ports. Both of them are equivalent???

  3. In /SOM/FPGA/TestApp/TestAPP.c, I can only read result form the register, how do I write data to the register?

Looking forward your reply, THX.

Satoshier commented 2 years ago

@thschaub @leoleovich @ahmadexp

julianstj1 commented 1 year ago
  1. You can use different MACs , OCXOs, and TCXOs. We will release an OCXO daughter card that sits in the same footprint as the SA53 to support this soon. Please take a look at the latest v7 board, it has some options to support different types of MACs.
  2. I personally use the echo OUT: MAC >> sma1 method to configure ports and it works great.
  3. Unsure of this one, I haven't used the testapp.
thschaub commented 1 year ago
  1. The idea of the SMA selector is that you can change them on run time via the registers. So no there is no regeneration of the bitstream required if you would like to change the mapping.

  2. The TestApp.c uses /dev/mem and mmap and then basic pointer operations in C. (btw it's not the idea to use the TestApp and the driver, The idea of the TestApp was to do some basic checks even there is no driver running).

Here an example how you can do a write:

virt_addr = (char*)pcie_base + NTL_CLK_REGSET_BASE+NTL_CLK_CLKCONTROL_REG;
 write_value = NTL_CLK_CONTROL_ENABLE_BIT | NTL_CLK_CONTROL_TIME_ADJ_BIT;
*(volatile uint32_t*)virt_addr = write_value;