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

Implement full DPE validation #286

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

sree-revoori1
Copy link
Contributor

@sree-revoori1 sree-revoori1 commented Dec 11, 2023

DPE validation does two things:

  1. Checks for illegal state in DPE
  2. Checks that the DPE context tree is well-formed

2 was done in a previous commit, but this commit improves upon that implementation in a few ways:

  1. Previously we were returning a bool from the context tree validation function. Now we return an error code so the caller knows exactly what is wrong with the shape of the DPE context tree
  2. We weren't considering simulation contexts before. Simulation contexts forming a different connected component is not an error.

fixes #279
fixes #284

@sree-revoori1
Copy link
Contributor Author

Tests in progress. Please suggest other validations to check if you have any ideas.

@sree-revoori1 sree-revoori1 force-pushed the validation branch 2 times, most recently from e8f2660 to 4503517 Compare December 12, 2023 15:18
@sree-revoori1
Copy link
Contributor Author

Tests are done and PR is ready for review.

dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Show resolved Hide resolved
dpe/src/validation.rs Show resolved Hide resolved
dpe/src/validation.rs Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
dpe/src/context.rs Show resolved Hide resolved
dpe/src/validation.rs Outdated Show resolved Hide resolved
DPE validation does two things:
1. Checks for illegal state in DPE
2. Checks that the DPE context tree is well-formed

2 was done in a previous commit, but this commit improves upon that
implementation in a few ways:

1. Previously we were returning a bool from the context tree validation
function. Now we return an error code so the caller knows exactly what
is wrong with the shape of the DPE context tree
2. We weren't considering simulation contexts before. Simulation contexts
forming a different connected component is not an error.
@jhand2 jhand2 merged commit 473b756 into chipsalliance:main Dec 13, 2023
1 check passed
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.

Multiple connected components bug in DPE Validation Allow DPE to check for illegal state
3 participants