[fpga] Generalize gen_vivado_mem_image.py #15552
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
After merging #15163, we should try to remove OTP- and ROM-specific behavior from gen_vivado_mem_image.py.
gen_vivado_mem_image.py
,gen_vivado_mem_image_test.py
to//hw/bitstream/vivado/util
.mem.py
, which generally deals with MEM files to//util
, for lack of a better location.--swap-nibbles
flag.--word-width-bits WIDTH
: The width of the architecture, not the width baked into the filename.--word-transform=(reverse_bits|reverse_nibbles)
: The word→word function to apply to each input word.--zero-padding-words ZERO_PADDING_WORDS
: The number of zero words to insert after each word.UpdatememSimulator
class works for non-OTP sized things.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.The text was updated successfully, but these errors were encountered: