Re: [rtl] generating random numbers
On Wed, Aug 09, 2000 at 12:58:20PM +0700, Adi Sudewa wrote: > how to generate random integers from within real-time thread. > I need to generate random numbers so my simulation can be unpredictable. > It is not cool to have a train running with 20.00 m/s speed > all the time so I'd like to have the speed fluctuate round 20.00 m/s. You could used get_random_bytes(). See linux/random.h for the prototype. -- Nathan Paul Simons, Programmer for FSMLabs http://www.fsmlabs.com/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
>However, the problem WRT accuracy is the "afterglow time" (or whatever >the correct term is) of the CRT. In order to minimize flickering, all >CRTs have a certain time constant on the light emitting phosphorus >layer, and although this is a very short time compared to that of an >LCD, or even a PAL/NTSC TV set CRT, I'm afraid it might stretch those 40 >ms a few percent. This "afterglow time" is more affectionately known as the "persistence of the phosphor". Warmest and humblest regards, Ray Minich Dresser Equipment Group -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
Hello RTers This is a bit off the RTL and RTAI topic but I have a quetion similar to Patricks regarding RT display. I am willing to accept the course grained timing given by the reciprocol of the refresh rate but I would like to be able to draw the image to screen with hard RT scheduling. There exists a register in most cards that "resets" the sequencer. I am not sure what reset means and can find no documentation to tell so. I am wondering if anyone knows whether this resets the sequencer so that I can start at a well defined spot in the sequencer cycle and therefore achieve hard RT scheduling. Of course there may be latencies for the reset which would have to be taken into account. Any help, references (besides Ferraro's book), mailing list, video card manufacturer contact, etc would be greatly appreciated. Does anyone know how the November RT Linux workshop is shaping up? Thanks once again, Daniel >From: kumsta <[EMAIL PROTECTED]> >To: berger patrick <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: [rtl] rt display in usec >Date: Wed, 09 Aug 2000 17:31:00 +0200 > >Hi, > >- make a dga access to a X(gtk-canvas) in Xwindow apps >- give throught rt-fifo physical address to your rt-process >- remap the dga buffer in kernel space >- and use a real-time process to do image processing (including >formatting your picture in dga buffer). > >Normally your dga-buffer is position independant ... but take care if >you iconify your Xapps !!! > >Chris. > >berger patrick wrote: > > I'd like to display a picture for 40 usec exactly (this value can be >changed) > > with gtk or qt (i may use X for use matrox dual head) > > is it possible with rtlinux? > >-- >don't forget to remove NOSPAM_ for reply >Kumsta Christophe <[EMAIL PROTECTED]> >Real-Time image processing developper >RT-Linux/RTAI ( Use the Source Luck !) >-- [rtl] --- >To unsubscribe: >echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR >echo "unsubscribe rtl " | mail [EMAIL PROTECTED] >--- >For more information on Real-Time Linux see: >http://www.rtlinux.org/rtlinux/ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
berger patrick wrote: > > [EMAIL PROTECTED] wrote: > > > > I'd like to display a picture for 40 usec exactly (this value can be changed) > > > with gtk or qt (i may use X for use matrox dual head) > > > is it possible with rtlinux? > > > > Your CRT display displays a frame for at least 10 ms. > > (Assuming 100 frame/sec, non-interlaced.) > > There is no way to change the picture durint this interval. > > The electron beam won't run back in the middle of the screen > > if you change the video RAM after 40 usec. > > > > BTW. What is this? Some subliminal advertisement? ;-) > > > > Gabor > > sorry :))) i'd say 40 ms and it's for a priming manip Ok... Still close to the refresh rates though, and I wouldn't expect anything like *exactly* 40 ms, even if you can quite easily construct a suitable video timing to do that. Check out svgalib and the function vga_addtiming(), the config file etc - this should be able to let you set up a suitable refresh rate so that a certain number of frames would produce the required 40 ms. X could probably do it as well, but if you really need a thorough *guaratee* on those 40 ms, you're probably best off with svgalib and SCHED_FIFO on a Linux kernel with Mingo's lowlatency patch. RTL + shared memory could do as well; catch the VGA retrace IRQ with an RTL ISR, and put code to blit in/remove the image there, or preferably in an RTL thread that the ISR wakes up. (I think this could be done with X as well, as it's really a hardware and memory management thing, rather than anything that involves the driver in the time critical stuff. The driver is only used to set up the mode and to make the video RAM available as shared memory.) GGI on fbdev or KGI are two other options, but it seems like at least the fbdev target lacks raster sync... (That rules out the Linux/lowlatency + SCHED_FIFO way, but makes no difference to the RTL way of using the IRQ directly.) However, the problem WRT accuracy is the "afterglow time" (or whatever the correct term is) of the CRT. In order to minimize flickering, all CRTs have a certain time constant on the light emitting phosphorus layer, and although this is a very short time compared to that of an LCD, or even a PAL/NTSC TV set CRT, I'm afraid it might stretch those 40 ms a few percent. Also, you may have to consider the fact that the image is drawn scan line by scan line, from top to bottom, which actually takes the major part of the refresh time. You can see this clearly if you take a photo of a TV screen with a fast film and short shutter time; you'll actually see pretty clearly where on the screen the raster beam was drawing when the shutter was open! BTW, LED displays (exist in RGB graphic configurations as well, at least in large, or rather, huge formats) have the capability of being very fast, and if the drivers permit it; could be "flashed" full-screen with any frame duration. (Unfortunately, most standard LED display drivers for bigger displays work pretty much like CRTs in this respect - by repeatedly flashing one row, group or figure at a time, in order to save components by not throwing in one driver stage per LED segment...) Oh, well... Does that cover your questions? :-) //David -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
Hi, - make a dga access to a X(gtk-canvas) in Xwindow apps - give throught rt-fifo physical address to your rt-process - remap the dga buffer in kernel space - and use a real-time process to do image processing (including formatting your picture in dga buffer). Normally your dga-buffer is position independant ... but take care if you iconify your Xapps !!! Chris. berger patrick wrote: > I'd like to display a picture for 40 usec exactly (this value can be changed) > with gtk or qt (i may use X for use matrox dual head) > is it possible with rtlinux? -- don't forget to remove NOSPAM_ for reply Kumsta Christophe <[EMAIL PROTECTED]> Real-Time image processing developper RT-Linux/RTAI ( Use the Source Luck !) -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec (add-on;)
reHi, This solution is used by the bttv module to do overmay access (video-acquisition-card -> video-display-card) And it works great even if stall Xfree the video continues look at the drivers sources. Chris. -- don't forget to remove NOSPAM_ for reply Kumsta Christophe <[EMAIL PROTECTED]> Real-Time image processing developper RT-Linux/RTAI ( Use the Source Luck !) -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
[EMAIL PROTECTED] wrote: > > I'd like to display a picture for 40 usec exactly (this value can be changed) > > with gtk or qt (i may use X for use matrox dual head) > > is it possible with rtlinux? > > Your CRT display displays a frame for at least 10 ms. > (Assuming 100 frame/sec, non-interlaced.) > There is no way to change the picture durint this interval. > The electron beam won't run back in the middle of the screen > if you change the video RAM after 40 usec. > > BTW. What is this? Some subliminal advertisement? ;-) > > Gabor sorry :))) i'd say 40 ms and it's for a priming manip -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
RE: [rtl] rt display in usec
Exactly what do you mean by display? Even top-quality video monitors have vertical refresh times less than 200 Hz which means that the minimum image time would be one vertical period which is no shorter than 50 milliseconds! Norm > -Original Message- > From: berger patrick [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, August 09, 2000 7:15 AM > To: [EMAIL PROTECTED] > Subject: [rtl] rt display in usec > > Hi all, > > I'd like to display a picture for 40 usec exactly (this value can be > changed) > with gtk or qt (i may use X for use matrox dual head) > is it possible with rtlinux? > > > thanx > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > --- > For more information on Real-Time Linux see: > http://www.rtlinux.org/rtlinux/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] cli()/sti() in usermode
Hi Victor, I don't really want to get into that now, just need a quick and dirty way for the moment. Currently I have -02 in my Makefile and I defined __KERNEL__. I know the -02 is working because I am also using outb_p and inb_p successfully. It could be that I just don't know the proper place for the -D__KERNEL__. Do you have any ideas. I am including is that the right header? Thanks Again, Adam At 03:59 AM 8/9/00 -0600, [EMAIL PROTECTED] wrote: >On Tue, Aug 08, 2000 at 11:46:37PM -0400, Adam Meyerowitz wrote: > > When doing some initial prototyping and just plain fooling around with > some new > > hardware it is very easy just to use it. I would never use it with > > production level > > code, it will moved into a kernel module. > >You could also try the rtlinux_sigaction method on RTLinux which >allows user code to install handlers that run in kernel mode with >interrupts disabled. > > > > > > > > > these seem > > > > to be defined by I'm getting undefined references to __cli(void) and > > > > __sti(void). What > > > > do I have to link with to grab these functions? Do I have to > compile with > > > > -O to get these? > > > > > >Try defining __KERNEL__ if you must. > > > > Thanks, I will see if that works. > >Good luck. > > > > Adam > > > > > > > > -- [rtl] --- > > To unsubscribe: > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > > --- > > For more information on Real-Time Linux see: > > http://www.rtlinux.org/rtlinux/ > >-- >- >Victor Yodaiken >Finite State Machine Labs: The RTLinux Company. > www.fsmlabs.com www.rtlinux.com -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt display in usec
> I'd like to display a picture for 40 usec exactly (this value can be changed) > with gtk or qt (i may use X for use matrox dual head) > is it possible with rtlinux? Your CRT display displays a frame for at least 10 ms. (Assuming 100 frame/sec, non-interlaced.) There is no way to change the picture durint this interval. The electron beam won't run back in the middle of the screen if you change the video RAM after 40 usec. BTW. What is this? Some subliminal advertisement? ;-) Gabor -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] rt display in usec
Hi all, I'd like to display a picture for 40 usec exactly (this value can be changed) with gtk or qt (i may use X for use matrox dual head) is it possible with rtlinux? thanx -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] cli()/sti() in usermode
On Tue, Aug 08, 2000 at 11:46:37PM -0400, Adam Meyerowitz wrote: > When doing some initial prototyping and just plain fooling around with some new > hardware it is very easy just to use it. I would never use it with > production level > code, it will moved into a kernel module. You could also try the rtlinux_sigaction method on RTLinux which allows user code to install handlers that run in kernel mode with interrupts disabled. > > > > > these seem > > > to be defined by I'm getting undefined references to __cli(void) and > > > __sti(void). What > > > do I have to link with to grab these functions? Do I have to compile with > > > -O to get these? > > > >Try defining __KERNEL__ if you must. > > Thanks, I will see if that works. Good luck. > > Adam > > > > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > --- > For more information on Real-Time Linux see: > http://www.rtlinux.org/rtlinux/ -- - Victor Yodaiken Finite State Machine Labs: The RTLinux Company. www.fsmlabs.com www.rtlinux.com -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] generating random numbers
On Wed, Aug 09, 2000 at 12:58:20PM +0700, Adi Sudewa wrote: > > Hi all, > > how to generate random integers from within real-time thread. > I need to generate random numbers so my simulation can be unpredictable. > It is not cool to have a train running with 20.00 m/s speed > all the time so I'd like to have the speed fluctuate round 20.00 m/s. The GNU Scientific Library has one of the finest collections of PRNGs, from the trvially simple to ones capable of real work, and then some capable of Real Work (tm). I'd pick a relatively simple one and port it to RT. dave... -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] networking
SERES Lucian wrote: > > Hi there! > I want to use RTLinux as suport in a distributed Realtime Java > application.Is there a modull which I can use to send/recive data in a > network? I only know about the rt_com modull, but I don't know if there is a > modull which has the same behaviour like socket, and so on, from the > traditional Linux. > Thank's a lot. Hi Lucian, If what you need is UDP/IP from a berkley sockets API, then take a look at: ftp://ftp.lineoisg.com/pub/rtnet/rtnet-0.9.0.tgz Regards, Stuart -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/