Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Terminal Emulation for Console I/O

Reply
Thread Tools

Terminal Emulation for Console I/O

 
 
rickman
Guest
Posts: n/a
 
      01-06-2009
I was expecting that it would be a simple matter to send control
sequences to the console which would allow code to be written that can
control the console in a system independent way. But I don't seem to
be able to find any code for this. When an app needs to put
information on the screen in other than a scrolling display, isn't
there a simple, system independent way to do that?

I am looking to define fields on the screen with numbers and labels.
The user will be able to move the cursor using the arrow keys and
update some of the fields. Then pressing the Enter key the data will
be sent to the target. Results will be collected from the target and
displayed in the various fields. This will be a bit like a the
register and memory display of a software debugger.

The idea was to be that the app would be written in a system
independent way, but it is looking like this is not going to be
practical.

Rick
 
Reply With Quote
 
 
 
 
Marcus Harnisch
Guest
Posts: n/a
 
      01-06-2009
Jonathan Bromley <> writes:

> Way back when dinosaurs roamed, there was a Unix tool
> called "curses" that tried to automate some of this stuff
> and provide a uniform API to a variety of different terminals.
> I don't know whether it still exists.


http://www.gnu.org/software/ncurses/ncurses.html

Curses is still in use. Try this to get a taste:
http://freshmeat.net/browse/227/

Regards
Marcus

--
note that "property" can also be used as syntaxtic sugar to reference
a property, breaking the clean design of verilog; [...]

(seen on http://www.veripool.com/verilog-mode_news.html)
 
Reply With Quote
 
 
 
 
rickman
Guest
Posts: n/a
 
      01-06-2009
Opps, I shouldn't post in my sleep. I posted this to the wrong
group. Sorry...


On Jan 6, 12:38*am, rickman <gnu...@gmail.com> wrote:
> I was expecting that it would be a simple matter to send control
> sequences to the console which would allow code to be written that can
> control the console in a system independent way. *But I don't seem to
> be able to find any code for this. *When an app needs to put
> information on the screen in other than a scrolling display, isn't
> there a simple, system independent way to do that?
>
> I am looking to define fields on the screen with numbers and labels.
> The user will be able to move the cursor using the arrow keys and
> update some of the fields. *Then pressing the Enter key the data will
> be sent to the target. *Results will be collected from the target and
> displayed in the various fields. *This will be a bit like a the
> register and memory display of a software debugger.
>
> The idea was to be that the app would be written in a system
> independent way, but it is looking like this is not going to be
> practical.
>
> Rick


 
Reply With Quote
 
HT-Lab
Guest
Posts: n/a
 
      01-07-2009

"Jonathan Bromley" <> wrote in message
news:...
> On Mon, 5 Jan 2009 21:38:41 -0800 (PST), rickman wrote:
>

...
> But it's always been a mess, since time immemorial.
> Way back when dinosaurs roamed, there was a Unix tool
> called "curses" that tried to automate some of this stuff


I think you are wrong, curses came after the dinosaurs, ASR33 terminal were
used during that time (if my memory serves me correctly)

...
> If I were you I would write the user front-end using Tcl/Tk,
> which is completely portable across various windowing OS,
> and have that Tcl/Tk app communicate with your real system
> over whatever comms scheme is convenient - sockets communication


I can't agree more, here is a simple example:

http://www.ht-lab.com/howto/remotemt..._modelsim.html

> Hah! There is an "ANSI standard" for smart VDUs - it's what
> the old DEC VT100 family used to do, and many console programs
> on windowing operating systems implement it to some extent.


I just had another look at the VT100 spec and it is actually quite powerful.
Apart from the graphics based characters (to create borders/boxes etc) it
also supports a "report cursor position" ESC sequence. I know the OP posted
this to the wrong newsgroup, but for anybody who want to add a portable text
based UI to their testbench/virtual prototype then check out the good old
VT100 standard.

> if the two processes are both running on desktop machines,
> UART-style serial line if the user front end is on your
> desktop and the real app is in an embedded system.
> Getting
> Tcl/Tk to do this takes a bit of getting used to, but is
> really easy when you know how. And it means that your "real"
> application doesn't need to know anything at all about the
> user front end, but can communicate in terms of simple
> machine-friendly commands to update and read values.
> And of course you can still use that "real" interface
> from a normal console for low-level debugging.
>
> We've even played with this to put a GUI-style front end
> on a VHDL simulation using Tcl's "command pipeline"
> mechanism, although that takes some jumping through hoops.
>
> If this idea is interesting, I can post some toy examples.


Please do. I am pretty sure that a lot of EDA users (incl myself) don't
fully appreciate the power of Tcl/TK. I spend considerable time create a
Modelsim Terminal interface using Modelsim's FLI. Using Tcl (or a thin
SystemC layer) is much much easier.

Hans
www.ht-lab.com


> --
> Jonathan Bromley, Consultant
>
> DOULOS - Developing Design Know-how
> VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
>
> Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
>
> http://www.MYCOMPANY.com
>
> The contents of this message may contain personal views which
> are not the views of Doulos Ltd., unless specifically stated.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Terminal Emulation for Console I/O Jan Pech VHDL 0 01-06-2009 11:13 AM
Terminal Emulation Modules? lysdexia Python 0 04-11-2006 02:42 PM
Terminal Emulation with IBM ES9672 mainframe via multiplexer. vidiv@gmx.net Python 1 01-14-2004 08:56 PM
ruby for IBM terminal emulation { vidya } Ruby 3 09-01-2003 05:39 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57