mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-20 17:09:45 +00:00
Update documentation/demos based on cleanup
This commit is contained in:
parent
75dcbe03c6
commit
35d13e1c32
3 changed files with 9 additions and 10 deletions
|
|
@ -230,8 +230,7 @@ Use ``log_error()`` to report a non-recoverable error:
|
|||
.. code:: C++
|
||||
|
||||
if (design->modules.count(module->name) != 0)
|
||||
log_error("A module with the name %s already exists!\n",
|
||||
RTLIL::id2cstr(module->name));
|
||||
log_error("A module with the name %s already exists!\n", module);
|
||||
|
||||
Use ``log_cmd_error()`` to report a recoverable error:
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ pointer ``f`` to the output file, or stdout if none is given.
|
|||
|
||||
For this minimal example all we are doing is printing out each node. The
|
||||
``node.name()`` method returns an ``RTLIL::IdString``, which we convert for
|
||||
printing with ``id2cstr()``. Then, to print the function of the node, we use
|
||||
printing with ``unescape()``. Then, to print the function of the node, we use
|
||||
``node.to_string()`` which gives us a string of the form ``function(args)``. The
|
||||
``function`` part is the result of ``Functional::IR::fn_to_string(node.fn())``;
|
||||
while ``args`` is the zero or more arguments passed to the function, most
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue