lnis-uofu / OpenFPGA

An Open-source FPGA IP Generator
https://openfpga.readthedocs.io/en/master/
MIT License
813 stars 161 forks source link

Bitstream Format for the case of Multi Region Configuration Chain #268

Closed zafarali-lm closed 3 years ago

zafarali-lm commented 3 years ago

Is your feature request related to a problem? Please describe. How the bitstream is divided to configure using those multiple ccff_heads in case of multi_region carry chain configuration protocol? Can you tell me the logic behind the bitstream division for those ccff_heads?

Describe the solution you'd like Maybe a custom bitstream file for multi_region_config_protocol will make this less ambiguous?

image

tangxifan commented 3 years ago

@zafarali-lm OpenFPGA allows users to customize the organization of each configuration region through a fabric key file.. It means:

You can always output the fabric key using the option '-write_fabric_key'

zafarali-lm commented 3 years ago

How can we extract out the bits of a particular region from the bitstream file?

tangxifan commented 3 years ago

@zafarali-lm We do not have a direct support on this. It is not difficult to do. You can easily write some codes to enable this feature. If you are interested, we can have a further discussion.

zafarali-lm commented 3 years ago

I am interested in extracting the bitstreams for different configuration regions. Can you please explain how we can divide the bitstreams and append some extra bits with configuration bits to get chunks of bitstream ready to be configured onto the FPGA fabric via the multi-region carry-chain configuration protocol? Thanks

On Fri, 19 Mar 2021 at 20:49, tangxifan @.***> wrote:

@zafarali-lm https://github.com/zafarali-lm We do not have a direct support on this. It is not difficult to do. You can easily write some codes to enable this feature. If you are interested, we can have a further discussion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lnis-uofu/OpenFPGA/issues/268#issuecomment-802930132, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJO3KU62D52RDHAHDYWHLDTENXAZANCNFSM4ZCBYYVA .

tangxifan commented 3 years ago

@zafarali-lm You can look into the Verilog testbenches (the full testbench), where you can find how the bitstream is loaded to FPGA.

When multi-region configuration chain is used, multiple bits are loaded in each programing clock cycle. For example, you can see bitstream from 4 configuration region are loaded.

        prog_cycle_task(4'b0010);
        prog_cycle_task({4{1'b0}});
        prog_cycle_task(4'b0010);
        prog_cycle_task({4{1'b0}});

The first bit comes from the first configuration region. So on so forth.

zafarali-lm commented 3 years ago

@tangxifan I have been already exploring that part and trying to figure out how the configuration bits from fabric_bitstream.xml can be formatted as it is formatted in the testbench. Actually I am interested in writing a script that

tangxifan commented 3 years ago

@zafarali-lm I think it is doable. The only challenge here is that the fabric_bitstream.xml file does not categorize bitstream into different regions. It is better to extract the information from the autocheck_top_tb.v

tangxifan commented 3 years ago

@zafarali-lm I have patched the fabric bitstream writer. Hope it makes your life easier.

zafarali-lm commented 3 years ago

Thanks, I'll check it out.

On Mon, 12 Apr 2021 at 03:53, tangxifan @.***> wrote:

@zafarali-lm https://github.com/zafarali-lm I have patched the fabric bitstream writer. Hope it makes your life easier.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lnis-uofu/OpenFPGA/issues/268#issuecomment-817386672, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJO3KQHH7SKTRTJT4RSOEDTIISANANCNFSM4ZCBYYVA .