2018-05-26 17:17:50 +08:00
|
|
|
/*
|
|
|
|
* nextpnr -- Next Generation Place and Route
|
|
|
|
*
|
2018-06-22 22:19:17 +08:00
|
|
|
* Copyright (C) 2018 Clifford Wolf <clifford@symbioticeda.com>
|
2018-05-26 17:17:50 +08:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-06-13 01:56:03 +08:00
|
|
|
#ifdef MAIN_EXECUTABLE
|
2018-06-08 17:17:04 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
#include <fstream>
|
|
|
|
#include "command.h"
|
|
|
|
#include "design_utils.h"
|
2018-06-21 19:52:58 +08:00
|
|
|
#include "log.h"
|
2018-08-05 22:13:34 +08:00
|
|
|
#include "timing.h"
|
2018-05-23 23:58:57 +08:00
|
|
|
|
2018-06-12 20:24:59 +08:00
|
|
|
USING_NEXTPNR_NAMESPACE
|
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
class GenericCommandHandler : public CommandHandler
|
2018-05-23 23:58:57 +08:00
|
|
|
{
|
2018-08-05 22:13:34 +08:00
|
|
|
public:
|
|
|
|
GenericCommandHandler(int argc, char **argv);
|
|
|
|
virtual ~GenericCommandHandler(){};
|
|
|
|
std::unique_ptr<Context> createContext() override;
|
|
|
|
void setupArchContext(Context *ctx) override{};
|
|
|
|
void customBitstream(Context *ctx) override;
|
2018-06-21 23:44:18 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
protected:
|
2018-11-13 21:03:48 +08:00
|
|
|
po::options_description getArchOptions() override;
|
2018-08-05 22:13:34 +08:00
|
|
|
};
|
2018-06-21 23:44:18 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
GenericCommandHandler::GenericCommandHandler(int argc, char **argv) : CommandHandler(argc, argv) {}
|
2018-06-23 20:32:18 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
po::options_description GenericCommandHandler::getArchOptions()
|
|
|
|
{
|
|
|
|
po::options_description specific("Architecture specific options");
|
|
|
|
specific.add_options()("generic", "set device type to generic");
|
|
|
|
return specific;
|
|
|
|
}
|
2018-06-27 17:45:19 +08:00
|
|
|
|
2019-04-02 03:16:29 +08:00
|
|
|
void GenericCommandHandler::customBitstream(Context *ctx) {}
|
2018-06-27 17:45:19 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
std::unique_ptr<Context> GenericCommandHandler::createContext()
|
|
|
|
{
|
|
|
|
return std::unique_ptr<Context>(new Context(chipArgs));
|
|
|
|
}
|
2018-06-21 23:44:18 +08:00
|
|
|
|
2018-08-05 22:13:34 +08:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GenericCommandHandler handler(argc, argv);
|
|
|
|
return handler.exec();
|
2018-05-23 23:58:57 +08:00
|
|
|
}
|
2018-06-08 17:17:04 +08:00
|
|
|
|
|
|
|
#endif
|