cellhelp: Split gate-level and word-level cells

This commit is contained in:
Krystine Sherwin 2024-05-03 09:16:55 +12:00
parent 1a4ada40fe
commit d629aa6bf1
No known key found for this signature in database
5 changed files with 29 additions and 7 deletions

View File

@ -986,7 +986,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'
@ -1034,7 +1034,7 @@ docs/reqs:
$(Q) $(MAKE) -C docs reqs
.PHONY: docs/prep
docs/prep: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage
docs/prep: docs/source/cmd/abc.rst docs/source/cell/word_add.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage
DOC_TARGET ?= html
docs: docs/prep

View File

@ -0,0 +1,9 @@
Gate-level cells
----------------
.. toctree::
:caption: Gate-level cells
:maxdepth: 1
:glob:
/cell/gate_*

View File

@ -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

View File

@ -0,0 +1,9 @@
Word-level cells
----------------
.. toctree::
:caption: Word-level cells
:maxdepth: 1
:glob:
/cell/word_*

View File

@ -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;
}