From 1df81f92ce171ba63cf0e4d10e6f203ca5f7f64e Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 1 Feb 2015 13:38:46 +0100 Subject: Added "make mklibyosys", some minor API changes --- misc/example.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 misc/example.cc (limited to 'misc/example.cc') diff --git a/misc/example.cc b/misc/example.cc new file mode 100644 index 00000000..a8244ac4 --- /dev/null +++ b/misc/example.cc @@ -0,0 +1,21 @@ +// clang -o example -std=c++11 -I/usr/include/tcl8.5 -I include/ example.cc objs/*.o -lstdc++ -lm -lrt -lreadline -lffi -ldl -ltcl8.5 + +#include + +int main() +{ + Yosys::log_streams.push_back(&std::cout); + Yosys::log_error_stderr = true; + + Yosys::yosys_setup(); + Yosys::yosys_banner(); + + Yosys::run_pass("read_verilog example.v"); + Yosys::run_pass("synth -noabc"); + Yosys::run_pass("clean -purge"); + Yosys::run_pass("write_blif example.blif"); + + Yosys::yosys_shutdown(); + return 0; +} + -- cgit v1.2.3