Moved placer definitions to place.h, main automatically runs placer now

This commit is contained in:
ZipCPU 2018-06-07 09:49:21 -04:00
parent f32b9622d5
commit c352f6536b
3 changed files with 29 additions and 6 deletions

View File

@ -30,9 +30,7 @@
#include "log.h"
#include "design.h"
namespace Placer {
};
#include "place.h"
void place_design(Design *design) {
std::set<IdString> types_used;

26
common/place.h Normal file
View File

@ -0,0 +1,26 @@
/*
* nextpnr -- Next Generation Place and Route
*
* Copyright (C) 2018 Clifford Wolf <clifford@clifford.at>
*
* 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.
*
*/
#ifndef PLACE_H
#define PLACE_H
#include "design.h"
extern void place_design(Design *design);
#endif // PLACE_H

View File

@ -26,6 +26,7 @@
#include "pybindings.h"
#include "version.h"
#include "log.h"
#include "place.h"
void svg_dump_el(const GraphicElement &el)
{
@ -241,6 +242,7 @@ int main(int argc, char *argv[])
std::istream *f = new std::ifstream(filename);
parse_json_file(f, filename, &design);
place_design(&design);
}
if (vm.count("run")) {
@ -250,9 +252,6 @@ int main(int argc, char *argv[])
execute_python_file(filename.c_str());
}
extern void place_design(Design *d);
place_design(&design);
if (vm.count("gui")) {
QApplication a(argc, argv);