From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0LsY-00061Z-AB for qemu-devel@nongnu.org; Fri, 29 Dec 2006 12:50:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0LsX-00060j-Iw for qemu-devel@nongnu.org; Fri, 29 Dec 2006 12:50:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0LsX-00060U-ED for qemu-devel@nongnu.org; Fri, 29 Dec 2006 12:50:49 -0500 Received: from [158.109.168.138] (helo=istanbul.uab.es) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H0LsW-0007a0-PY for qemu-devel@nongnu.org; Fri, 29 Dec 2006 12:50:49 -0500 Received: from istanbul.uab.es (localhost [127.0.0.1]) by istanbul.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with ESMTP id <0JB100AOFQWJC3B0@istanbul.uab.es> for qemu-devel@nongnu.org; Fri, 29 Dec 2006 18:50:44 +0100 (CET) Received: from [158.109.70.47] by istanbul.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with ESMTP id <0JB1003O0QWJT582@istanbul.uab.es> for qemu-devel@nongnu.org; Fri, 29 Dec 2006 18:50:43 +0100 (CET) Date: Fri, 29 Dec 2006 18:53:37 +0100 From: =?ISO-8859-1?Q?M=E0rius_Mont=F3n?= Subject: Re: [Qemu-devel] time inside qemu In-reply-to: <200612291743.05983.paul@codesourcery.com> Message-id: <45955621.2030301@uab.cat> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_EWf6sgF7z5aJgS+Guu8RDw)" References: <459540A8.8020209@uab.cat> <200612291743.05983.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --Boundary_(ID_EWf6sgF7z5aJgS+Guu8RDw) Content-type: multipart/alternative; boundary="Boundary_(ID_sy6MP8ISnVExfLVimY7UBA)" --Boundary_(ID_sy6MP8ISnVExfLVimY7UBA) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE Hi, As I understand, OSes running inside qemu "have" notion of time: (its date and time works, time(1) command works, etc.). My question is about how qemu manages time. I need to stop and start again this "virtual-time". I just tried with cpu_disable_ticks() and cpu_enable_ticks(). It seem= s to work partially: at least now system date and time are out of sync.= . M=E0rius Paul Brook wrote: > On Friday 29 December 2006 16:22, M=E0rius Mont=F3n wrote: > =20 >> Hi, >> >> For my work on QEMU-SC, I need to stop time inside qemu. >> I need it in order to simulate HW modules with SystemC simulator, = and >> meanwhile stop qemu time. >> In this way, applications running on qem should see its time freez= e, and >> measurements of total time spent by application + specific HW be m= ore >> realistic (now, total time is the sum of SW + HW simulation ) >> =20 > > qemu is not cycle accurate or even deterministic. > > Fabrice was working on some code to make it deterministic, but he n= ever posted=20 > the code. > > Paul > > =20 --=20 M=E0rius Mont=F3n i Maci=E1n marius.monton@uab.cat http://cephis.uab.es Hardware Engineer CEPHIS Centre de Prototips i Solucions Hardware-Software Dep. Microelectr=F2nica i Sistemes Electr=F2nics ETSE - Universitat Aut=F2noma de Barcelona (UAB) =09Phone: +34 935 81= 3 534 Fax: +34 935 813 033 QC-2090D. ETSE. Campus UAB. 080193 Bellaterra --Boundary_(ID_sy6MP8ISnVExfLVimY7UBA) Content-type: text/html; charset=ISO-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE Hi,

As I understand, OSes running inside qemu "have" notion of time: (its date and time works, time(1) command works, etc.).
My question is about how qemu manages time. I need to stop and start again this "virtual-time".

I just tried with cpu_disable_ticks() and cpu_enable_ticks(). It seem= s to work partially: at least now system date and time are out of sync.= .

Màrius

Paul Brook wrote:
On Friday 29 December 2006 16:22, Màrius Mont=
ón wrote:
  
Hi,

For my work on QEMU-SC, I need to stop time inside qemu.
I need it in order to simulate HW modules with SystemC simulator, and
meanwhile stop qemu time.
In this way, applications running on qem should see its time freeze, =
and
measurements of total time spent by application + specific HW be more
realistic (now, total time is the sum of SW + HW simulation )
    

qemu is not cycle accurate or even deterministic.

Fabrice was working on some code to make it deterministic, but he nev=
er posted=20
the code.

Paul

  

--
Màrius Montón i Macián   <= font color=3D"#00ffff">marius.monton@uab.cat   http://cephis.uab.es
Hardware Engine= er
Centre de Proto= tips i Solucions Hardware-Software
Dep. Microelectrònica i Sistemes Electrònics
ETSE - Universitat Autònoma de Barcelona (UAB)
=
Phone: +34 = 935 813 534
Fax: +3= 4 935 813 033
QC-2090= D. ETSE. Campus UAB.
080193 Bellaterra
--Boundary_(ID_sy6MP8ISnVExfLVimY7UBA)-- --Boundary_(ID_EWf6sgF7z5aJgS+Guu8RDw) Content-type: text/x-vcard; charset=utf-8; name=marius.monton.vcf Content-transfer-encoding: QUOTED-PRINTABLE Content-disposition: attachment; filename=marius.monton.vcf begin:vcard fn;quoted-printable:M=3DC3=3DA0rius Mont=3DC3=3DB3n n;quoted-printable;quoted-printable:Mont=3DC3=3DB3n;M=3DC3=3DA0rius org;quoted-printable:CEPHIS;Microelectr=3DC3=3DB2nica i Sistemes Elec= tronics adr:Campus de la UAB;;QC-2090D, ETSE;Bellaterra;Barcelona;08193;Spain email;internet:marius.monton@uab.es title:HW Engineer tel;work:+34935813534 tel;fax:+34935813033 x-mozilla-html:TRUE url:http://cephis.uab.es version:2.1 end:vcard --Boundary_(ID_EWf6sgF7z5aJgS+Guu8RDw)--