Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs generation from cells help output #4332

Merged
merged 68 commits into from
Oct 16, 2024
Merged

Commits on Oct 14, 2024

  1. Configuration menu
    Copy the full SHA
    a6641da View commit details
    Browse the repository at this point in the history
  2. Docs: Put cell library help strings into a struct

    Allows for more expressive code when constructing help messages for cells.
    Will also move extra logic in parsing help strings into the initial python parse instead of doing it in the C++ at export time.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    6bbe763 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    600149a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4662476 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1e5a50f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7842926 View commit details
    Browse the repository at this point in the history
  7. cellhelp: Add source line to help

    Include Source file and line number in SimHelper struct, and use it for verilog code caption in rst dump.
    Also reformat python string conversion to iterate over a list of fields instead of repeating code for each.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    a2b2904 View commit details
    Browse the repository at this point in the history
  8. cellhelp: Add default format parse for simcells

    Since `simcells.v` uses consistent formatting we can handle it specifically to help tidy up sphinx warnings about the truth tables, and instead chuck them in a code block which when printing to rst.
    Also has the side effect that rst code blocks can be added manually with `//- ::` followed by a blank line.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    57cd8d2 View commit details
    Browse the repository at this point in the history
  9. Docs: Add cell gen to makefile

    Generate in a temp directory and use `rsync -rc` to only update rst files that have changed.  This prevents sphinx from having to re-generate every cmd/cell page any time the git sha changes.
    Also change cmd gen to match.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    1a4ada4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d629aa6 View commit details
    Browse the repository at this point in the history
  11. cellhelp: Extra newline

    Fix `$macc` page.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    c98d134 View commit details
    Browse the repository at this point in the history
  12. Docs: Add cell reference

    Subclass the command reference code in order to support smart references to the internal cells.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    f9b4e04 View commit details
    Browse the repository at this point in the history
  13. Docs: Add autoref role

    Use new `autoref` role when using single backticks. Allows automatic mapping to a cmd ref or a cell ref.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    c0f9828 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e4ec371 View commit details
    Browse the repository at this point in the history
  15. Docs: Shorten cmd:ref

    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    829e02e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    40ba92e View commit details
    Browse the repository at this point in the history
  17. Docs: Improve cell_help usage

    - Drop `cell_code` and instead map code lookups to the `cell_help` dict.
    - Add helper functions to struct for checking and getting the right cell.
    - Add `CellType` for cell to `write_cell_rst` function declaration in
      preparation for use in future.
    - Iterate over `yosys_celltypes.cell_types` when exporting cell rst files,
      reporting errors for any cells defined in `cell_types` but not
      `cell_help_messages`.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    21747c4 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4c9c4c1 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    063a6bc View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    06e5e18 View commit details
    Browse the repository at this point in the history
  21. Docs: Cell reference as a custom documenter

    Use autodocs to perform cell reference docs generation instead of generating rst files directly.
    e.g.
    ```
    .. autocell:: simlib.v:$alu
       :source:
       :linenos:
    ```
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    e5f54dd View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a66e94c View commit details
    Browse the repository at this point in the history
  23. Docs: Add root to ToC

    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    1b0d863 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ccd3bac View commit details
    Browse the repository at this point in the history
  25. cellref: Better name checking

    Fix RTD not including source with warning
    `WARNING: invalid signature for autocellsource ('/home/docs/checkouts/readthedocs.org/user_builds/yosys/checkouts/manual-rewrite/source/generated/simlib.v:$alu::__source')`.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    84f2968 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    7eb33f1 View commit details
    Browse the repository at this point in the history
  27. cellref: Add json dump

    New `help -dump-cells-json <file>` to dump cells list.
    Add 'group' field to SimHelper class/struct with defaults to gate_other and word_other depending on source (simcells or simlib).
    Add 'unary' group to unary operator cells for testing (based on internal cell library docs page).
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    7c5b10f View commit details
    Browse the repository at this point in the history
  28. Docs: Move appendix toc to main toc

    Adds an Appendix header to sidebar toc instead of being an (empty) subpage.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    a119d41 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    9533cf2 View commit details
    Browse the repository at this point in the history
  30. Docs: Use json for cellref

    e.g.
    ```
    .. autocell:: $alu
       :source:
       :linenos:
    ```
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    37573a6 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    6572320 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5a4a419 View commit details
    Browse the repository at this point in the history
  33. Docs: Preliminary autocellgroup usage

    Remove `/source/cell` from .gitignore.
    Add a few initial cell pages.
    Add YosysCellGroup documenter and cell:group directive.
    Update Documenters to use nested json.
    Better nested tocs for group.module.source layout.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    b127ac0 View commit details
    Browse the repository at this point in the history
  34. Docs: Move binary operators to cell appendix

    Add binary group tag to relevant cells.
    Remove content from `cell_library.rst` that is already moved.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    c662529 View commit details
    Browse the repository at this point in the history
  35. cellref: Move default help message to register.cc

    Drop the default help message from rst while still displaying it on the command line.
    Fix command line formatting for older style help messages.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    04b0ae5 View commit details
    Browse the repository at this point in the history
  36. cellref: Deprecate cell_library.rst

    Most of the word/coarse level cells have an assigned group and individual page.
    The gate/fine level cells are all on one page.
    Fix links to `cell_library.rst`.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    1374fc2 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    46580ce View commit details
    Browse the repository at this point in the history
  38. Docs: Fix fsm.rst

    `$mux-tree` should be `$mux`-tree.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    2b4a4cb View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    be5572c View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    6aceb6a View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    e78841b View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    11d2cbc View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    c6414e0 View commit details
    Browse the repository at this point in the history
  44. Docs: Assign remaining word cells to groups

    Move todos to correct place.
    Add todo for x-prop cells.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    78b9dbd View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    596d914 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    b0bc29e View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    5473b60 View commit details
    Browse the repository at this point in the history
  48. Docs: Add gate_other page

    Drop word_other block since it raises a warning, which will cause the RTDs build to fail.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    0005083 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    217c2a1 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    5c4f7b4 View commit details
    Browse the repository at this point in the history
  51. Docs: Assert cell has group

    Explicitly assign $_TBUF_ to `gate_other` and remove catch if a cell has no group.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    f70a66f View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    9ce6952 View commit details
    Browse the repository at this point in the history
  53. cellhelp.py: Cells can have tags

    Tags are added to the list of properties when exporting to `cells.json`.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    b1025db View commit details
    Browse the repository at this point in the history
  54. simlib.v: Update case equality operators to v2

    Also tag as x-aware cells and add titles.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    ed92374 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    1a24018 View commit details
    Browse the repository at this point in the history
  56. Docs: Drop fifo.out and fifo.stat

    These two files can now be safely .gitignore'd.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    e3d939b View commit details
    Browse the repository at this point in the history
  57. docs/util: Cells now have properties

    Properties are both an option:
    ```
    .. cell:def:: $add
       :properties: is_evaluable
    ```
    and a field:
    ```
    .. cell:def:: $eqx
    
       :property x-aware:
       :property is_evaluable:
    ```
    
    Properties as an option appear in the property index: linking a given property to all cells with that property; while properties as a field display with the cell.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    ce6a7fe View commit details
    Browse the repository at this point in the history
  58. simlib.v: Add x-output tag

    Also a few extra cell help texts.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    4d84d7e View commit details
    Browse the repository at this point in the history
  59. Docs: Update for properties

    Add properties page, move cell_gate and cell_word under a singular cell_index along with properties.  Fix links accordingly.
    
    Also drop x-aware and x-output todos since they are resolved.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    e40134c View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    9d808ca View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    7216f07 View commit details
    Browse the repository at this point in the history
  62. Docs: Render cell titles

    Also put property lists *after* cell description.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    927dc44 View commit details
    Browse the repository at this point in the history
  63. Docs: Comments from @jix

    - Unswap shift/shiftx
    - Add brief overview to cell lib
    - Clarify $div cell B input
    - Clarify unary operators
    - What is $modfloor
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    dfe803b View commit details
    Browse the repository at this point in the history
  64. Docs: Adding mux cell descriptions

    Also making ver2 cell descriptions consistently spaced.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    1513366 View commit details
    Browse the repository at this point in the history
  65. Docs: Fix missing groups

    $lut and $sop were missed in the rebase, and $buf is new to main since the last rebase.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    27b8b4e View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    c93fd54 View commit details
    Browse the repository at this point in the history
  67. Docs: Fix word_logic.rst

    It somehow got lost in the rebase.
    KrystalDelusion committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    bc77575 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. Configuration menu
    Copy the full SHA
    e9d9e92 View commit details
    Browse the repository at this point in the history