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

Optimize preconditions related to buffer index type #548

Closed
treiher opened this issue Jan 14, 2021 · 0 comments · Fixed by #549
Closed

Optimize preconditions related to buffer index type #548

treiher opened this issue Jan 14, 2021 · 0 comments · Fixed by #549
Assignees
Labels
generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented Jan 14, 2021

Loosening of field location and size constraints

In the current implementation the field location and maximum field size is restricted by the used buffer index type: Field_Last (Ctx, Fld) <= Types.Bit_Index'Last / 2 and Field_Size (Ctx, Fld) <= Types.Bit_Length'Last / 2. It should be possible to loosen these overly restrictive constraints.

Removing unnecessary precondition in setter functions

The field setter functions check the field location (Field_Last (Ctx, F_Length) <= Types.Bit_Index'Last / 2) as well as the available space in the buffer (Available_Space (Ctx, F_Length) >= Field_Size (Ctx, F_Length)). It should be sufficient to check the latter.

@treiher treiher added the generator Related to generator package (SPARK code generation) label Jan 14, 2021
@treiher treiher self-assigned this Jan 14, 2021
@treiher treiher added this to To do in RecordFlux 0.5 via automation Jan 14, 2021
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Jan 14, 2021
treiher added a commit that referenced this issue Jan 15, 2021
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Jan 15, 2021
RecordFlux 0.5 automation moved this from Done to Merged Jan 15, 2021
treiher added a commit that referenced this issue Jan 15, 2021
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Related to generator package (SPARK code generation)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant