Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2e8f215dcafc
Choose a base ref
...
head repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 06feeed2484d
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 10, 2017

  1. Copy the full SHA
    24ede80 View commit details
  2. Copy the full SHA
    06feeed View commit details
Showing with 3 additions and 24 deletions.
  1. +0 −5 src/gp4tchar/main.cpp
  2. +3 −19 src/gp4tchar/measurements.cpp
5 changes: 0 additions & 5 deletions src/gp4tchar/main.cpp
Original file line number Diff line number Diff line change
@@ -125,13 +125,9 @@ int main(int argc, char* argv[])
LogNotice("Loading timing data...\n");
string tfname = "timing.json";
if(!g_calDevice.LoadTimingData(tfname))
{
LogWarning("Couldn't load existing timing data file\n");
return 1;
}

//Measure delay through each element
/*
if(!MeasurePinToPinDelays(sock, hdev))
return 1;
if(!MeasureCrossConnectionDelays(sock, hdev))
@@ -142,7 +138,6 @@ int main(int argc, char* argv[])
return 1;
if(!MeasureDelayLineDelays(sock, hdev))
return 1;
*/

//Save to disk
LogNotice("Saving timing data to file %s\n", tfname.c_str());
22 changes: 3 additions & 19 deletions src/gp4tchar/measurements.cpp
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@

#include "gp4tchar.h"
#include "solver.h"
#include <time.h>

using namespace std;

@@ -322,30 +323,12 @@ bool MeasureDelay(Socket& sock, int src, int dst, CombinatorialDelay& delay, boo
return false;
if(!sock.RecvLooped((uint8_t*)&delay.m_rising, sizeof(float)))
return false;

if(!ok)
{
LogError("Couldn't measure rising delay (open circuit?)\n");
return false;
}

//Repeat for falling edge
if(invertOutput)
sendbuf[2] = 1;
else
sendbuf[2] = 0;
if(!sock.SendLooped(sendbuf, sizeof(sendbuf)))
return false;

//Read the results back
if(!sock.RecvLooped(&ok, 1))
return false;
if(!sock.RecvLooped((uint8_t*)&delay.m_falling, sizeof(float)))
return false;

if(!ok)
{
LogError("Couldn't measure falling delay (open circuit?)\n");
LogError("Couldn't measure delays (open circuit?)\n");
return false;
}

@@ -447,6 +430,7 @@ bool MeasurePinToPinDelays(Socket& sock, hdevice hdev)
//TODO: ↓ edges
//TODO: x4 drive (if supported on this pin)
//TODO: Tri-states and open-drain/open-source outputs
//TODO: more pins?
CombinatorialDelay delay;
for(auto src : pins)
{