diff options
author | ZipCPU <dgisselq@ieee.org> | 2018-06-07 09:49:21 -0400 |
---|---|---|
committer | ZipCPU <dgisselq@ieee.org> | 2018-06-07 09:49:21 -0400 |
commit | c352f6536b8f9eb4ad8d108e692a149348284723 (patch) | |
tree | 51a425e31e379f998ac07a4fdc1416fb401ee73b | |
parent | f32b9622d5c61610f6027f6544ab9683cd57282b (diff) | |
download | nextpnr-c352f6536b8f9eb4ad8d108e692a149348284723.tar.gz nextpnr-c352f6536b8f9eb4ad8d108e692a149348284723.tar.bz2 nextpnr-c352f6536b8f9eb4ad8d108e692a149348284723.zip |
Moved placer definitions to place.h, main automatically runs placer now
-rw-r--r-- | common/place.cc | 4 | ||||
-rw-r--r-- | common/place.h | 26 | ||||
-rw-r--r-- | ice40/main.cc | 5 |
3 files changed, 29 insertions, 6 deletions
diff --git a/common/place.cc b/common/place.cc index d3348820..e27a46be 100644 --- a/common/place.cc +++ b/common/place.cc @@ -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; diff --git a/common/place.h b/common/place.h new file mode 100644 index 00000000..483f11f3 --- /dev/null +++ b/common/place.h @@ -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 diff --git a/ice40/main.cc b/ice40/main.cc index b723c1fd..24897164 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -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); |