On 10/02/2015 14:34, boddu pavan wrote:
> Yes its hardware block, and yes they are of same SOC. status is 16bit.
For simplicity you can make them the same DeviceState.
In order of increasing accuracy:
- save the AES module's address in a global variable, and add a qemu_irq
raised by the AES module when the status changes. When the irq is
raised, the register module uses the global variable to find the AES
module and fetch the status
- store the AES module's address using object_property_add_child, add a
qemu_irq raised by the AES module when the status changes. The register
module uses object_resolve_path() to get a pointer to the AES module.
When the irq is raised, the register module uses the pointer to fetch
- add a link property in the register module that points to the AES
module (object_property_add_link), and a qemu_irq raised by the AES
module when the status changes. Initialize the link property in the
creation function for the board. When the irq is raised, the register
module uses the DeviceState* field corresponding to the link to find the
AES module and fetch the status
> On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini
> [no private messages please]
> On 10/02/2015 14:27, boddu pavan wrote:
>> Hi paolo,
>> I have a aes module and its status should also be updated in register of
>> another block, which is said to be public register. The one in which its
>> updating is a private register.
>> How to get the data passed and updated in another module. I see using a
>> dma for register update is heavy, is there any simple one.
> How do you define a "module"? Is it a hardware block that you're
> emulating (a DeviceState)? Are the two modules part of the same SoC?
> How large is the status?