Skip to content

Add ability to extend Mavis forms/extractors/tests for internal forks#129

Open
bdutro-mips wants to merge 16 commits intomainfrom
dev/bdutro/support-internal-forms
Open

Add ability to extend Mavis forms/extractors/tests for internal forks#129
bdutro-mips wants to merge 16 commits intomainfrom
dev/bdutro/support-internal-forms

Conversation

@bdutro-mips
Copy link
Copy Markdown
Collaborator

@bdutro-mips bdutro-mips commented Apr 24, 2026

This PR has 3 changes to make life easier for those who have to maintain internal Mavis forks:

  1. The Mavis CMake config can be extended via an optional config file cmake/internal.cmake
  2. The form and extractor registries can be extended by defining the following preprocessor macros:
    • INTERNAL_EXTRACTOR_REGISTRY: the class name of an additional extractor registry for non-public extractor definitions
    • INTERNAL_EXTRACTOR_REGISTRY_HEADER: the name of the header file where INTERNAL_EXTRACTOR_REGISTRY is defined
    • INTERNAL_FORM_REGISTRY: the class name of an additional form registry for non-public form definitions
    • INTERNAL_FORM_REGISTRY_HEADER: the name of the header file where INTERNAL_FORM_REGISTRY is defined
  3. ExtensionManager ISA spec JSONs (e.g. riscv_isa_spec.json) now support an includes field that can be used to include additional ISA spec JSONs
    • Includes are processed after all other fields in the JSON, which means the included JSON can reference extensions defined in any parent JSON

I also added a make regress target and added the regression tests to the pre-merge checks.

Comment thread mavis/GenericRegistry.h
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, I assume this header/template is only included with the FormRegistry, right? In other words, in the model, this header is never seen. The reason I ask is 'cause of increased compile times which I've always battled with Mavis.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's included once in FormRegistry.cpp and once in ExtractorRegistry.cpp

Copy link
Copy Markdown
Member

@klingaard klingaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Thank you, Thank you for adding a proper regression and CI!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants