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

Support Pkl format #202

Open
taichi-ishitani opened this issue Apr 11, 2024 · 1 comment
Open

Support Pkl format #202

taichi-ishitani opened this issue Apr 11, 2024 · 1 comment

Comments

@taichi-ishitani
Copy link
Member

Add support Pkl for configuration and register map format.

@taichi-ishitani
Copy link
Member Author

taichi-ishitani commented Apr 11, 2024

Register map written in Pkl may be like below.

// rggen.pkl
module rggen
register_block {
  __type = "register_block"
}
register_file {
  __type = "register_file"
}
register {
  __type = "register"
}
bit_field {
  __type = "bit_field"
}
import "rggen.pkl"

register_block = (rggen.register_block) {
  name = "uart_csr"
  byte_size = 32

  (rggen.register) {
    name            = "rbr"
    offset_address  = 0x00
    type            = new { "indirect"; ["lcr.dlab"] = 0 }
    comment         = "Receiver Buffer Register"

    (rggen.bit_field) {
      bit_assignment  = new { lsb = 0; width = 8 }
      type            = "rotrg"
    }
  }
}

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

No branches or pull requests

1 participant