[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [openrisc] [PATCH] Would you like to have UART0 in a xterm ?




It's done (CVS).  This weekend, there was some (2) 'Test failed' on ATS
but I fix them (some forgotten files).

About txfile and rxfile, I could.  I just didn't do it because I am tired
of all those 'if' in 16450.c.  It is not too hard to change two lines in
sim.cfg.  If it is absolutely needed I will.  For now an error msg will
tell you to change your sim.cfg with an example how to do it.

Regards

Richard

On Mon, 28 Oct 2002, Marko Mlinar wrote:

> Great work!
> I like your solution very much!
>
> Is it possible to add functionality for txfile and rxfile:
> when they are defined and channel variable is not defined,
> channel variable is generated?
>
> Is it possible that you commit the patch?
> If you have registered to OC, you already have CVS write access.
>
> Marko
>
> On Thursday 24 October 2002 19:44, Richard Prescott wrote:
> > Hello everybody !
> >
> > Here is a patch to improve simulator interraction with host.
> > Interraction is made through "channels".  It is possible to associate
> > a channel with a peripheral (only UART for the momment).  It obseletes
> > txfile and rxfile (UART only for now).  Sorry to break compatibility :-(
> >
> > Did I tell you it is for UART only for now ?!
> >
> > sim.cfg have to change in the following way :
> >
> > section uart
> >   enabled = 1
> >   nuarts = 1
> >
> >   device 0
> >     baseaddr = 0x90000000
> >     irq = 2
> >     jitter = -1
> >     16550 = 1
> >     /*
> >      * txfile = "oldway.tx"
> >      * rxfile = "oldway.rx"
> >      */
> >     channel = "file:newway.rx,newway.tx"
> >   enddevice
> > end
> >
> >
> > One thing I like to do is:
> >
> > section uart
> >   enabled = 1
> >   nuarts = 1
> >
> >   device 0
> >     baseaddr = 0x90000000
> >     irq = 2
> >     jitter = -1
> >     16550 = 1
> >     channel = "file:/dev/tty10"
> >   enddevice
> > end
> >
> > But make sure the user running the simulation have the appropriate
> > permission on /dev/tty10.  (Do Ctrl-Atl-F10 to see result and enjoy!)
> >
> > Two other kind of channels are also available.  The first one use file
> > descriptors provided at sim startup.  To configure do:
> >
> > section uart
> >   enabled = 1
> >   nuarts = 1
> >
> >   device 0
> >     baseaddr = 0x90000000
> >     irq = 2
> >     jitter = -1
> >     16550 = 1
> >     channel = "fd:3,4"
> >   enddevice
> > end
> >
> > And launch sim this way:
> > $ or32-uclinux-sim linux 3< uart.rx 4> uart.tx
> >
> >
> > It is also possible to specify a fifo instead:
> >
> > section uart
> >   enabled = 1
> >   nuarts = 1
> >
> >   device 0
> >     baseaddr = 0x90000000
> >     irq = 2
> >     jitter = -1
> >     16550 = 1
> >     channel = "fd:3"
> >   enddevice
> > end
> >
> > Launch with:
> > $ mkfifo allo
> > $ or32-uclinux-sim linux 3<> allo
> >
> >
> > But the most useful one is with:
> >
> > section uart
> >   enabled = 1
> >   nuarts = 1
> >
> >   device 0
> >     baseaddr = 0x90000000
> >     irq = 2
> >     jitter = -1
> >     16550 = 1
> >     channel = "xterm"
> >   enddevice
> > end
> >
> >
> > Enjoy!
> >
> > Richard Prescott
>

--------------------------------------------------------------
"Coffee should be black as hell, strong as death, and sweet as love."
				-Turkish Proverb

--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml