MMIO classes

Martin Stein martin.stein at ...1...
Tue Apr 8 12:53:11 CEST 2014


Hi Aditya,

Nice to hear that you like the MMIO framework :-) Personally, I can't
see a benefit in constructing an object of a class that does nothing
else than inheriting from an Mmio::Register. When trying to compile your
example, my compiler complains that I can't use 'ob' in the constant
expression 'write<...>', which sounds reasonable to me. Why do you think
that 'Register_array' isn't what you're looking for? It may be helpful
if you could explain your use case more precisely.

Cheers,
Martin

On 08.04.2014 11:29, Aditya Kousik wrote:
> Hello,
>
> This doubt is more C++ than Genode. The MMIO framework is brilliant
> for R/W access. The way it goes is that, I create structures and
> successively inherit Register and Bitfield structures. But would it be
> wrong if I create an object of the structures and call 'write' and
> 'read' methods?
>
> Say, struct Register_New : Register<0x4a, 32> { };
>
> and struct Register_New ob;
>       write<ob>(0x5);
>
> The above is just an example. What is normally done is
> write<Register_New>(0x5).
> The template in the Mmio class if of Register::Register_base type. But
> an object to this struct is also Register. So, is there any negative
> aspect to this?
>
> What I am currently trying out is trying to hold an array of Registers
> that has such objects for some level of automation. And I don't think
> Register_array is what I'd look for.
>
> Thanks for your patient replies
> Aditya
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment 
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
>
>
> _______________________________________________
> Genode-main mailing list
> Genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20140408/4cbe4ec6/attachment.html>


More information about the users mailing list