From 4569a747f8af3880e23408eb93323afc8088b78b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 10 Oct 2014 16:59:44 +0200 Subject: Renamed SIZE() to GetSize() because of name collision on Win32 --- manual/PRESENTATION_Prog/my_cmd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manual/PRESENTATION_Prog') diff --git a/manual/PRESENTATION_Prog/my_cmd.cc b/manual/PRESENTATION_Prog/my_cmd.cc index 381b05871..3e3cf13a0 100644 --- a/manual/PRESENTATION_Prog/my_cmd.cc +++ b/manual/PRESENTATION_Prog/my_cmd.cc @@ -12,7 +12,7 @@ struct MyPass : public Pass { log("Modules in current design:\n"); for (auto mod : design->modules()) log(" %s (%zd wires, %zd cells)\n", log_id(mod), - SIZE(mod->wires()), SIZE(mod->cells())); + GetSize(mod->wires()), GetSize(mod->cells())); } } MyPass; -- cgit v1.2.3 From b9f2127f5d5a78bab74f511a71b6a369065a0383 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 8 Nov 2014 10:59:48 +0100 Subject: Various documentation updates --- manual/PRESENTATION_Prog/my_cmd.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manual/PRESENTATION_Prog') diff --git a/manual/PRESENTATION_Prog/my_cmd.cc b/manual/PRESENTATION_Prog/my_cmd.cc index 3e3cf13a0..1d28ce974 100644 --- a/manual/PRESENTATION_Prog/my_cmd.cc +++ b/manual/PRESENTATION_Prog/my_cmd.cc @@ -1,6 +1,9 @@ #include "kernel/yosys.h" #include "kernel/sigtools.h" +USING_YOSYS_NAMESPACE +PRIVATE_NAMESPACE_BEGIN + struct MyPass : public Pass { MyPass() : Pass("my_cmd", "just a simple test") { } virtual void execute(std::vector args, RTLIL::Design *design) @@ -25,6 +28,7 @@ struct Test1Pass : public Pass { log_error("A module with the name absval already exists!\n"); RTLIL::Module *module = design->addModule("\\absval"); + log("Name of this module: %s\n", log_id(module)); RTLIL::Wire *a = module->addWire("\\a", 4); a->port_input = true; @@ -38,7 +42,7 @@ struct Test1Pass : public Pass { module->addNeg(NEW_ID, a, a_inv, true); module->addMux(NEW_ID, a, a_inv, RTLIL::SigSpec(a, 3), y); - log("Name of this module: %s\n", log_id(module)); + module->fixup_ports(); } } Test1Pass; @@ -69,3 +73,4 @@ struct Test2Pass : public Pass { } } Test2Pass; +PRIVATE_NAMESPACE_END -- cgit v1.2.3 From abf81d76835d3ebb372ea128ee15cf6fb2c8f03a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 4 Dec 2014 13:37:58 +0100 Subject: Added some missing .gitignore in manual/ --- manual/PRESENTATION_Prog/.gitignore | 1 + 1 file changed, 1 insertion(+) (limited to 'manual/PRESENTATION_Prog') diff --git a/manual/PRESENTATION_Prog/.gitignore b/manual/PRESENTATION_Prog/.gitignore index 7fd560762..ccdd6bd5c 100644 --- a/manual/PRESENTATION_Prog/.gitignore +++ b/manual/PRESENTATION_Prog/.gitignore @@ -1 +1,2 @@ my_cmd.so +my_cmd.d -- cgit v1.2.3