From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scvlf-0003QI-UD for qemu-devel@nongnu.org; Fri, 08 Jun 2012 05:46:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Scvla-0004lJ-Pt for qemu-devel@nongnu.org; Fri, 08 Jun 2012 05:46:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34457 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scvla-0004l3-G9 for qemu-devel@nongnu.org; Fri, 08 Jun 2012 05:46:02 -0400 Message-ID: <4FD1C9D2.80206@suse.de> Date: Fri, 08 Jun 2012 11:45:54 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] QOMification of AXI stream List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Anthony Liguori , "qemu-devel@nongnu.org Developers" , Michal Simek , Paul Brook , "Edgar E. Iglesias" , John Williams Am 08.06.2012 06:23, schrieb Peter Crosthwaite: > Each of the two core has three interfaces (+interrupt pins): >=20 > 1: Sysbus attachment for device control > 2: AXI stream TX link > 3: AXI stream RX link [...] > struct XilinxDMAConnection { > void *dma; > void *client; >=20 > DMAPushFn to_dma; > DMAPushFn to_client; > }; >=20 > So what im proposing is AXI stream is implemented as a unidirectional > point to point bus. The xilinx ethernet system would consist of two of > these buses one for tx, one for rx. [...] > A: Make AXI_STREAM_SLAVE an interface (not a sub-class of DEVICE). Its > kind of annoying though if someone in the future whats the create a > device thats only and axi stream slave, as they would have to > explicitly inherit from DEVICE as well. >=20 > or >=20 > B: Have the slave attachment be a device within a device. Hard part is > getting an accessor so machine models can retrieve the slave > attachment and hook it up. If you dive into busses, note that Anthony has refactored QBus on qom-next branch. As Paul has already mentioned, the concept of tree-structured qdev busses is deprecated by QOM in favor of link<> properties. SysBus is also in the process of being deprecated, and Anthony is working on Pin objects for simple qemu_irq-style messaging. What you could try as option C today is deriving a type from SysBus with one added DMAPushFn and a link<> property of that type for unidirectional connection and form circular links for RX and TX... That would of course limit the number of channels to one. Otherwise you need a dedicated child<> object, of which a device can have multiple. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg