Skip to content

Commit

Permalink
cellhelp: Split gate-level and word-level cells
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed May 2, 2024
1 parent 37c655e commit d1f758d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ docs/source/cmd/abc.rst: $(TARGETS) $(EXTRA_TARGETS)
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-command-reference-manual'
$(Q) rsync -rc temp/docs/source/cmd docs/source
$(Q) rm -rf temp
docs/source/cell/add.rst: $(TARGETS) $(EXTRA_TARGETS)
docs/source/cell/word_add.rst: $(TARGETS) $(EXTRA_TARGETS)
$(Q) mkdir -p docs/source/cell
$(Q) mkdir -p temp/docs/source/cell
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-cells-manual'
Expand Down Expand Up @@ -1020,7 +1020,7 @@ docs/reqs:
$(Q) $(MAKE) -C docs reqs

DOC_TARGET ?= html
docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
docs: docs/source/cmd/abc.rst docs/source/cell/word_add.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
$(Q) $(MAKE) -C docs $(DOC_TARGET)

clean:
Expand Down
9 changes: 9 additions & 0 deletions docs/source/cell_gate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Gate-level cells
----------------

.. toctree::
:caption: Gate-level cells
:maxdepth: 1
:glob:

/cell/gate_*
9 changes: 5 additions & 4 deletions docs/source/cell_ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Internal cell reference
================================================================================

.. toctree::
:caption: Internal cell reference
:maxdepth: 1
:glob:
:caption: Internal cell reference
:maxdepth: 2
:glob:

/cell/*
cell_word
cell_gate
9 changes: 9 additions & 0 deletions docs/source/cell_word.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Word-level cells
----------------

.. toctree::
:caption: Word-level cells
:maxdepth: 1
:glob:

/cell/word_*
5 changes: 4 additions & 1 deletion kernel/register.cc
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,10 @@ struct SimHelper {
string name;
inline string filesafe_name() {
if (name.at(0) == '$')
return name.substr(1);
if (name.at(1) == '_')
return "gate" + name.substr(1);
else
return "word_" + name.substr(1);
else
return name;
}
Expand Down

0 comments on commit d1f758d

Please sign in to comment.