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

SpinalFormalConfig: Set _hasAsync accodring to clock config; set includeFormal as default in SpinalFormalConfig #1320

Closed

Conversation

janschiefer
Copy link

Closes #

SpinalHDL/SpinalTemplateSbt#39
#1314

Context, Motivation & Description

  • SymbiYosys multiclock mode has to be used when using ResetKind == ASYNC, so enable multiclock mode when using this reset mode in the default clock domain
  • always use ".includeFormal" in FormalConfig, to generate the "right" kind of "assert" depending on mode ( simulation vs. verification )

Impact on code generation

RTL:

  • use .includeFormal as default and therefore do not generate "assert(...) else ... begin" blocks in formal verification mode

SymbiYosis configuration file:

  • use "multiclock on" when an using an ASYNC reset in the default clock domain

Checklist

  • API changes are or will be documented: No changes on outward facing API

@@ -118,7 +119,8 @@ case class SpinalFormalConfig(
}

def withConfig(config: SpinalConfig): this.type = {
_spinalConfig = config
_spinalConfig = config.includeFormal
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about only keep this line to help user easily work around the config problem?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Multiclock features of formal tools only good for the design which is really have several clocks. It might work slower.

Copy link
Author

Choose a reason for hiding this comment

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

You have a actually working alternative with ASYNC reset without multiclock?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You have a actually working alternative with ASYNC reset without multiclock?

The tester in located in tester/ subproject are all use ASYNC reset as default. The SYNC reset has not been tested.
However, although the design itself use ASYNC reset, the verification actually run is still in SYNC manner.
So I think it doesn't matter.

@Readon
Copy link
Collaborator

Readon commented Jun 13, 2024

according to #1435 this can be closed.

@Readon Readon closed this Jun 13, 2024
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