Skip to content

Commit

Permalink
Continued work on GreenPAK characterization driver. Refactored into m…
Browse files Browse the repository at this point in the history
…ultiple source files.
  • Loading branch information
azonenberg committed Jun 1, 2017
1 parent a55ed2c commit 33f09eb
Showing 5 changed files with 414 additions and 185 deletions.
1 change: 1 addition & 0 deletions src/gp4tchar/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_executable(gp4tchar
setup.cpp
main.cpp)

target_link_libraries(gp4tchar
43 changes: 43 additions & 0 deletions src/gp4tchar/TimingData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/***********************************************************************************************************************
* Copyright (C) 2016-2017 Andrew Zonenberg and contributors *
* *
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General *
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for *
* more details. *
* *
* You should have received a copy of the GNU Lesser General Public License along with this program; if not, you may *
* find one here: *
* https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt *
* or you may search the http://www.gnu.org website for the version 2.1 license, or you may write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
**********************************************************************************************************************/

#ifndef TimingData_h
#define TimingData_h

//Delay values
class DelayPair
{
public:
DelayPair(float r = 0, float f = 0)
: rising(r)
, falling(f)
{ }

float rising;
float falling;
};

//Propagation delay through a cell (only one output supported for now)
class CellDelay
{
public:
//map from pin name to delay
std::map<std::string, DelayPair> delays;
};

#endif
38 changes: 38 additions & 0 deletions src/gp4tchar/gp4tchar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/***********************************************************************************************************************
* Copyright (C) 2016-2017 Andrew Zonenberg and contributors *
* *
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General *
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for *
* more details. *
* *
* You should have received a copy of the GNU Lesser General Public License along with this program; if not, you may *
* find one here: *
* https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt *
* or you may search the http://www.gnu.org website for the version 2.1 license, or you may write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
**********************************************************************************************************************/

#ifndef gp4tchar_h
#define gp4tchar_h

#include <cstdlib>
#include <cstring>
#include <cmath>
#include <unistd.h>
#include <log.h>
#include <gpdevboard.h>
#include <Greenpak4.h>
#include "../xptools/Socket.h"
#include "TimingData.h"

bool InitializeHardware(hdevice hdev, SilegoPart expectedPart);
bool PostProgramSetup(hdevice hdev);
bool IOReset(hdevice hdev);
bool IOSetup(hdevice hdev);
bool PowerSetup(hdevice hdev);

#endif
Loading

0 comments on commit 33f09eb

Please sign in to comment.