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

[fpga] Generalize gen_vivado_mem_image.py #15552

Open
4 tasks
dmcardle opened this issue Oct 18, 2022 · 1 comment
Open
4 tasks

[fpga] Generalize gen_vivado_mem_image.py #15552

dmcardle opened this issue Oct 18, 2022 · 1 comment
Assignees
Labels
Component:FPGA FPGA related issues Component:MultiTop Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones Priority:P3 Priority: low Type:Cleanup Cleanup tasks
Milestone

Comments

@dmcardle
Copy link
Contributor

dmcardle commented Oct 18, 2022

After merging #15163, we should try to remove OTP- and ROM-specific behavior from gen_vivado_mem_image.py.

  • Reorganize files.
    • Move gen_vivado_mem_image.py, gen_vivado_mem_image_test.py to //hw/bitstream/vivado/util.
    • Move mem.py, which generally deals with MEM files to //util, for lack of a better location.
  • Add flags that enable us to describe both OTP and ROM behavior.
    • Drop the --swap-nibbles flag.
    • Add --word-width-bits WIDTH: The width of the architecture, not the width baked into the filename.
    • Add --word-transform=(reverse_bits|reverse_nibbles): The word→word function to apply to each input word.
    • Add --zero-padding-words ZERO_PADDING_WORDS: The number of zero words to insert after each word.
  • Ensure that the UpdatememSimulator class works for non-OTP sized things.
  • Figure out how to generalize parse_otp_init_strings(). Currently, it's not based on theory, but by observing what Vivado does with the OTP vmem during a full build. I wrote it by comparing the input vmem with the output INIT_XX lines (otp_init_strings.txt). I might be able to generalize it to RAMB18 and then write a separate version for RAMB36 (for ROM). Alternatively, we could punt and add an --enable-otp-self-check flag.
@dmcardle dmcardle added Component:FPGA FPGA related issues Type:Cleanup Cleanup tasks labels Oct 18, 2022
@dmcardle dmcardle added this to the Project: M3 milestone Oct 18, 2022
@dmcardle dmcardle self-assigned this Oct 18, 2022
@dmcardle dmcardle added the Priority:P3 Priority: low label Oct 20, 2022
@msfschaffner msfschaffner added the Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones label Oct 7, 2023
@msfschaffner
Copy link
Contributor

Related issue that needs to be addressed long-term: https://github.com/lowRISC/opentitan-integrated/issues/288

CC @a-will @dbeitel-opentitan @andreaskurth

@msfschaffner msfschaffner added Component:MultiTop Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones and removed Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones labels Nov 8, 2023
@msfschaffner msfschaffner modified the milestones: Discrete: M3, Backlog Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:FPGA FPGA related issues Component:MultiTop Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones Priority:P3 Priority: low Type:Cleanup Cleanup tasks
Projects
None yet
Development

No branches or pull requests

2 participants