Moved placer definitions to place.h, main automatically runs placer now
This commit is contained in:
parent
f32b9622d5
commit
c352f6536b
@ -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
26
common/place.h
Normal 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
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user