jotego wrote:I have been able to render the first image out of simulation with the rom file created with your MRA tool. Thanks a lot!
Now, I'm not sure why you need the pattern attribute for first 64-bit group parts. I remember you told us it was a way to interleave files but I don't see how it is relevant there and how it works.
Code: Select all
<!-- take two bytes from each file -->
<part name="wlm-7.7a" pattern="01"/>
<part name="wlm-5.9a" pattern="01"/>
<part name="wlm-3.3a" pattern="01"/>
<part name="wlm-1.5a" pattern="01"/>
I started writing the MRA for Willow to test the format. However, there is a 16-bit file whose bytes need be swapped for endianness correction. I am not sure what was the final syntax you went for. What should I write?
That's great. I'm glad I can help.
So, the doc is missing, right? Here's the short(?) version:
So basically, if you say a group has a width of 64(bits), it means you will provide 64/8 = 8 bytes per value. What's inside the group describes where to read those 8 bytes from. You can also add a "repeat" attribute on groups. It will repeat that group in the output file. On the other hand, parts within groups do not support repeat, offset or length attributes. Only name and pattern.
Each character in the pattern attribute means "read 1 byte at that offset", so here, you're reading byte 0 and byte 1 (16bits) from each part, effectively interleaving them. For the next 64 bits, it will go back at the start and continue reading the files, again, using the offset in the pattern. If you wanted to change endianness you would say pattern="10".
Note1: if you don't specify a group width, it's 8 by default. If you don't specify a pattern it actually means pattern="0" (ie. read 1 byte). So, by default, you're just interleaving all the parts under the same group, byte by byte. I plan to add an attribute 'interleave="0"' for groups in order to achieve what slingshot wanted.
Note2: you can mix pattern lengths in the same group.
From all this, you get a set of rules (that are actually checked by the tool):
- (total number of bytes read from patterns in a group) * 8 must equal group width
- the offsets in a pattern must be < at the length of the pattern
- each individual part size, divided by the length of the pattern, must be equal (to avoid missing data while iterating on the group). That means a part that is read with pattern="0" (ie. byte by byte) must be twice smaller than a part that is read with pattern "01" or "10".