Skip to content

Commit

Permalink
Added calibration device to gp4tchar. Added function to Greenpak4Devi…
Browse files Browse the repository at this point in the history
…ce to print timing data (not yet implemented)
azonenberg committed Jun 2, 2017
1 parent 396c094 commit c87f1bc
Showing 6 changed files with 22 additions and 35 deletions.
33 changes: 0 additions & 33 deletions src/gp4tchar/TimingData.h
Original file line number Diff line number Diff line change
@@ -32,37 +32,4 @@ class DevkitCalibration
//For now, only pins 3-4-5 and 13-14-15 are used
};

//DUT measurements
typedef std::pair<int, int> PinPair;
class DeviceProperties
{
public:

/*
//Map from (src, dst) pin to delay tuple
typedef std::map<PinPair, DelayPair> IODelayMap;
//Map from drive strength to delay tuples
std::map<Greenpak4IOB::DriveStrength, IODelayMap> ioDelays;
*/
};

/*
//Delays from FPGA to DUT, one way, per pin
//TODO: DelayPair for these
//Delays within the device for input/output buffers
//Map from (src, dst) to delay
map<pair<int, int>, CellDelay> g_pinToPinDelaysX1;
map<pair<int, int>, CellDelay> g_pinToPinDelaysX2;
//TODO: x4 drive strength
//Delay through each cross connection
DelayPair g_eastXconnDelays[10];
DelayPair g_westXconnDelays[10];
//Propagation delay through each LUT to the output
map<Greenpak4LUT*, CellDelay> g_lutDelays;
*/

#endif
2 changes: 1 addition & 1 deletion src/gp4tchar/gp4tchar.h
Original file line number Diff line number Diff line change
@@ -46,6 +46,6 @@ bool MeasureCrossConnectionDelays(Socket& sock, hdevice hdev);
void WaitForKeyPress();

extern DevkitCalibration g_devkitCal;
extern DeviceProperties g_deviceProperties;
extern Greenpak4Device g_calDevice;

#endif
1 change: 0 additions & 1 deletion src/gp4tchar/main.cpp
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
using namespace std;

DevkitCalibration g_devkitCal;
DeviceProperties g_deviceProperties;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Entry point
8 changes: 8 additions & 0 deletions src/gp4tchar/measurements.cpp
Original file line number Diff line number Diff line change
@@ -26,6 +26,14 @@ Greenpak4Device::GREENPAK4_PART part = Greenpak4Device::GREENPAK4_SLG46620;
Greenpak4IOB::PullDirection unused_pull = Greenpak4IOB::PULL_DOWN;
Greenpak4IOB::PullStrength unused_drive = Greenpak4IOB::PULL_1M;

/**
@brief The "calibration device"
We never actually modify the netlist or create a bitstream from this. It's just a convenient repository to put
timing data in before we serialize to disk.
*/
Greenpak4Device g_calDevice(part, unused_pull, unused_drive);

bool PromptAndMeasureDelay(Socket& sock, int src, int dst, float& value);
bool MeasureCrossConnectionDelay(
Socket& sock,
8 changes: 8 additions & 0 deletions src/greenpak4/Greenpak4Device.cpp
Original file line number Diff line number Diff line change
@@ -1251,3 +1251,11 @@ bool Greenpak4Device::GenerateBitstream(bool* bitstream, uint8_t userid, bool re

return ok;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Timing analysis

void Greenpak4Device::PrintTimingData()
{
//TODO
}
5 changes: 5 additions & 0 deletions src/greenpak4/Greenpak4Device.h
Original file line number Diff line number Diff line change
@@ -326,6 +326,11 @@ class Greenpak4Device

void SetNVMRetryCount(int count);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TIMING

void PrintTimingData();

protected:

bool GenerateBitstream(bool* bitstream, uint8_t userid, bool readProtect);

0 comments on commit c87f1bc

Please sign in to comment.