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

floogen: Render endpoint enums to index into Sam #111

Merged
merged 5 commits into from
Feb 28, 2025
Merged

Conversation

fischeti
Copy link
Collaborator

@fischeti fischeti commented Feb 27, 2025

Adds an initial enum sam_idx_e in the generated package which can be used to index into the System Address Map (SAM). The index is not equal to the ep_ide_e, since there are potentially multiple address ranges for each endpoint.

If an endpoint has multiple address ranges, the user can also give a description of each of them (which is optional). For instance:

  - name: "hostcore"
    addr_range:
      - start: 0x4000
        end: 0x5000
        desc: "uart"
      - start: 0x7000
        end: 0x8000
        desc: "spi"

which will result in:

  typedef enum logic [2:0] {
    ...
    HostcoreUartSamIdx = 4,
    HostCoreSpiSamIdx = 5,
    ...
  } sam_idx_e;

@fischeti fischeti marked this pull request as ready for review February 28, 2025 09:05
@fischeti fischeti enabled auto-merge (squash) February 28, 2025 09:21
@fischeti fischeti merged commit 38a1b70 into main Feb 28, 2025
7 checks passed
@fischeti fischeti deleted the floogen-fix-addridx branch February 28, 2025 09:27
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.

1 participant