Guest
Hi,
I have to implement control interface in an FPGA connected to the bus with certain width of data bus (let's assume, that it is 32 bits wide). In the control interface I have to implement some 32-bit registers, and this is not a problem. However additionally I have to implement some bit fields with different widths (e.g 5 bits, 9 bits and so on).
As description of the FPGA system is still evolving, to avoid continuous manual adjustments, I'd like to prepare an algorithm, which could automatically find the optimal distribution of those bit fields, so that they fit in the minimal number of registers.
Of course later on there will be generated VHDL code and address table for the software.
In the first version the above is the only requirement. Later on I consider adding certain constraints, like: "fields A and B should be if possible in the same register", "fields C and D should NOT be in the same register" etc.
Thank you in advance,
Best regards,
Wojtek
I have to implement control interface in an FPGA connected to the bus with certain width of data bus (let's assume, that it is 32 bits wide). In the control interface I have to implement some 32-bit registers, and this is not a problem. However additionally I have to implement some bit fields with different widths (e.g 5 bits, 9 bits and so on).
As description of the FPGA system is still evolving, to avoid continuous manual adjustments, I'd like to prepare an algorithm, which could automatically find the optimal distribution of those bit fields, so that they fit in the minimal number of registers.
Of course later on there will be generated VHDL code and address table for the software.
In the first version the above is the only requirement. Later on I consider adding certain constraints, like: "fields A and B should be if possible in the same register", "fields C and D should NOT be in the same register" etc.
Thank you in advance,
Best regards,
Wojtek