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: 5f4793935549
Choose a base ref
...
head repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4d4f489b1b3f
Choose a head ref
  • 2 commits
  • 8 files changed
  • 1 contributor

Commits on Jun 5, 2017

  1. Copy the full SHA
    4291452 View commit details
  2. Copy the full SHA
    4d4f489 View commit details
2 changes: 1 addition & 1 deletion src/gp4tchar/gp4tchar.h
Original file line number Diff line number Diff line change
@@ -37,11 +37,11 @@ bool PowerSetup(hdevice hdev, int voltage_mv = 3300);

bool ReadTraceDelays();
bool CalibrateTraceDelays(Socket& sock, hdevice hdev);
bool MeasureDelay(Socket& sock, int src, int dst, float& delay);

bool MeasureLUTDelays(Socket& sock, hdevice hdev);
bool MeasurePinToPinDelays(Socket& sock, hdevice hdev);
bool MeasureCrossConnectionDelays(Socket& sock, hdevice hdev);
bool MeasureInverterDelays(Socket& sock, hdevice hdev);

void WaitForKeyPress();

8 changes: 7 additions & 1 deletion src/gp4tchar/main.cpp
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ int main(int argc, char* argv[])
LogError("Failed to connect to GreenpakTimingTest server\n");
return 1;
}
sock.DisableNagle();

LogNotice("GreenPAK timing characterization helper v0.1 by Andrew Zonenberg\n");

@@ -129,15 +130,20 @@ int main(int argc, char* argv[])
return 1;

//Measure delay through each element
/*
if(!MeasurePinToPinDelays(sock, hdev))
return 1;
if(!MeasureCrossConnectionDelays(sock, hdev))
return 1;
if(!MeasureLUTDelays(sock, hdev))
return 1;
if(!MeasureInverterDelays(sock, hdev))
return 1;
*/
if(!MeasureDelayLineDelays(sock, hdev))
return 1;

//Save to disk

LogNotice("Saving timing data to file %s\n", tfname.c_str());
g_calDevice.SaveTimingData(tfname.c_str());

445 changes: 323 additions & 122 deletions src/gp4tchar/measurements.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/greenpak4/Greenpak4BitstreamEntity.cpp
Original file line number Diff line number Diff line change
@@ -287,7 +287,7 @@ void Greenpak4BitstreamEntity::PrintTimingData() const
{
auto& pair = jt.first;
auto& time = jt.second;
LogNotice("%10s to %10s: %.3f ns rising, %.3f ns falling\n",
LogNotice("%10s to %10s: %6.3f ns rising, %6.3f ns falling\n",
pair.first.c_str(),
pair.second.c_str(),
time.m_rising,
4 changes: 2 additions & 2 deletions src/greenpak4/Greenpak4IOB.cpp
Original file line number Diff line number Diff line change
@@ -257,7 +257,7 @@ void Greenpak4IOB::PrintExtraTimingData(PTVCorner corner) const
CombinatorialDelay bd;
if(GetCombinatorialDelay("IO", "OUT", corner, bd))
{
LogNotice("%10s to %10s: %.3f ns rising, %.3f ns falling\n",
LogNotice("%10s to %10s: %6.3f ns rising, %6.3f ns falling\n",
"IO (Sch)",
"OUT",
time.m_rising + bd.m_rising,
@@ -290,7 +290,7 @@ void Greenpak4IOB::PrintExtraTimingData(PTVCorner corner) const
}
string ioname = string("IO (") + drive + ")";

LogNotice("%10s to %10s: %.3f ns rising, %.3f ns falling\n",
LogNotice("%10s to %10s: %6.3f ns rising, %6.3f ns falling\n",
"IN",
ioname.c_str(),
it.second.m_rising,
10 changes: 10 additions & 0 deletions src/greenpak4/Greenpak4LUT.cpp
Original file line number Diff line number Diff line change
@@ -184,6 +184,16 @@ void Greenpak4LUT::MakeXOR()
}
}

void Greenpak4LUT::MakeNOT()
{
m_truthtable[0] = true;
m_truthtable[1] = false;
m_truthtable[2] = true;

for(int i=3; i<16; i++)
m_truthtable[i] = false;
}

vector<string> Greenpak4LUT::GetOutputPorts() const
{
vector<string> r;
1 change: 1 addition & 0 deletions src/greenpak4/Greenpak4LUT.h
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ class Greenpak4LUT : public Greenpak4BitstreamEntity
virtual bool CommitChanges();

void MakeXOR();
void MakeNOT();

protected:

7 changes: 7 additions & 0 deletions src/xbpar/CombinatorialDelay.h
Original file line number Diff line number Diff line change
@@ -50,6 +50,13 @@ class CombinatorialDelay
m_falling += rhs.m_falling;
return *this;
}

CombinatorialDelay& operator-=(const CombinatorialDelay& rhs)
{
m_rising -= rhs.m_rising;
m_falling -= rhs.m_falling;
return *this;
}
};

#endif