VHDL and Emacs (My experience)

M

mans

Guest
Hello,

I am new in VHDL and Emacs and I tried to use Emacs for editing VHDL
and attaching it to ISE. My experience is as follow:



Overall:



Emacs has a very good editor for VHDL editing. It has several good features
such as auto indentation and syntax highlighting. Over all it is very good
if you can use it (I could not!)



What I did:

I download my copy of Emacs from
http://www.ourcomments.org/Emacs/EmacsW32.html . I installed it in my
windows XP professional system and setup ISE to use it. It works well with
ISE.



Problems that I had:



1- Its keyboard shortcuts are not windows based. I tried to configure
wmacsw32 without any success.

2- It is very slow to start ( I didn't use emacs clinets)

3- I read that you can see a hierarchy of your VHDL code, but I can not
turn it on (I don't know how to turn it on!).

4- I can not find any documentation on facilities which are available
in VHDL mode.

5- Some times when I try to click on VHDL menu, this menu item
disappears!



Best regards



Ps: Does Eclipse support VHDL?
 
mans wrote:


1- Its keyboard shortcuts are not windows based.
True, but the the arrow keys, and mouse, and menus
work without knowing any shortcuts.

2- It is very slow to start ( I didn't use emacs clinets)
True. I just leave it running all day.

3- I read that you can see a hierarchy of your VHDL code, but I can not
turn it on (I don't know how to turn it on!).
That requires vhdl-mode and speedbar.
vhdl-mode.el is not included in most windows distributions,
get it here:
http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html

Ps: Does Eclipse support VHDL?
Not like it support Java.


-- Mike Treseler
 
Thanks for telling us about the problems so we may try to get them fixed.
Thank you for helping me to solve the problem.

1- Its keyboard shortcuts are not windows based. I tried to
configure wmacsw32 without any success.

Can you please tell me what you did and how it failed? There is a quick
setup for those things if you use the menus:

Options - Customize EmacsW32 ...
I did use this option and it didn't work for me. I set the CUA in option and
it is working. One point that probably confuse people is that even in this
case, the short cuts in edit menu is not C-x and C-c and so on.


2- It is very slow to start ( I didn't use emacs clinets)

You should use EmacsClient and only start Emacs once.

Making it easy to get started using EmacsClient is one of the main things
the installer for Emacs+EmacsW32 is trying to help you with. Several
shortcuts gets installed that lets you start Emacs through EmacsClient.
There is one in the start menu and you get one in the SendTo menu. If you
prefer working from the command line there is a command line script called
e.cmd for this.

If you use the patched version then Emacs server gets started
automatically through those shortcuts and or the command line scripts.
(For the unpatched version you have to start Emacs server yourself, please
read the Emacs manual.)


I think I don't have the patched version. I will try to see what I can do
with this but as long as I am not closing emacs after each edit, I don't
need to restart it. I am happy!


5- Some times when I try to click on VHDL menu, this menu item
disappears!

Can you please describe this more? Exactly when does this happen?


It happens before to me but it is working well now. I will post the details
if it happens again to me.





More on new and old problems that I have:



1- I can set speedbar and used it. It is a very useful facility. The problem
is that I can not dock it into emacs. Is there any way to dock it into emacs
so it doesn't start as a new window?

2- If I have a file that I modified with ISE, when I open it with Emacs, I
can see a ^M at the end of each line. This generates error during
indentation. I could not find any way to fix it. I only can remove them
manually which is time consuming. Any way to do this in emacs or ISE or by
any other tools?



One suggestion:

As during editing, it is possible to edit several files, is there any way
to save all files just by pressing a button on toolbar or a menu item?



My view of emacs for editing VHDL is no changed and I am very happy to use
it with VHDL.



Best regards and thanks for helping to use emacs.
 
On Apr 29, 7:47 pm, "mans" <(myname_here)_123...@yahoo.com> wrote:
Thanks for telling us about the problems so we may try to get them fixed.

Thank you for helping me to solve the problem.



1- Its keyboard shortcuts are not windows based. I tried to
configure wmacsw32 without any success.

Can you please tell me what you did and how it failed? There is a quick
setup for those things if you use the menus:

Options - Customize EmacsW32 ...

I did use this option and it didn't work for me. I set the CUA in option and
it is working. One point that probably confuse people is that even in this
case, the short cuts in edit menu is not C-x and C-c and so on.







2- It is very slow to start ( I didn't use emacs clinets)

You should use EmacsClient and only start Emacs once.

Making it easy to get started using EmacsClient is one of the main things
the installer for Emacs+EmacsW32 is trying to help you with. Several
shortcuts gets installed that lets you start Emacs through EmacsClient.
There is one in the start menu and you get one in the SendTo menu. If you
prefer working from the command line there is a command line script called
e.cmd for this.

If you use the patched version then Emacs server gets started
automatically through those shortcuts and or the command line scripts.
(For the unpatched version you have to start Emacs server yourself, please
read the Emacs manual.)

I think I don't have the patched version. I will try to see what I can do
with this but as long as I am not closing emacs after each edit, I don't
need to restart it. I am happy!

5- Some times when I try to click on VHDL menu, this menu item
disappears!

Can you please describe this more? Exactly when does this happen?

It happens before to me but it is working well now. I will post the details
if it happens again to me.

More on new and old problems that I have:

1- I can set speedbar and used it. It is a very useful facility. The problem
is that I can not dock it into emacs. Is there any way to dock it into emacs
so it doesn't start as a new window?

2- If I have a file that I modified with ISE, when I open it with Emacs, I
can see a ^M at the end of each line. This generates error during
indentation. I could not find any way to fix it. I only can remove them
manually which is time consuming. Any way to do this in emacs or ISE or by
any other tools?

One suggestion:

As during editing, it is possible to edit several files, is there any way
to save all files just by pressing a button on toolbar or a menu item?

My view of emacs for editing VHDL is no changed and I am very happy to use
it with VHDL.

Best regards and thanks for helping to use emacs.- Hide quoted text -

- Show quoted text -
I downloaded emacs - windows version from http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
(Download Latest EmacsW32 + Emacs patched).
It supports vhdl mode. Its really good. You can give a try.

JK
I
 
"JK" <krishna.janumanchi@gmail.com> wrote in message
news:1177927075.175252.171140@n76g2000hsh.googlegroups.com...
On Apr 29, 7:47 pm, "mans" <(myname_here)_123...@yahoo.com> wrote:
Thanks for telling us about the problems so we may try to get them
fixed.

Thank you for helping me to solve the problem.



1- Its keyboard shortcuts are not windows based. I tried to
configure wmacsw32 without any success.

Can you please tell me what you did and how it failed? There is a quick
setup for those things if you use the menus:

Options - Customize EmacsW32 ...

I did use this option and it didn't work for me. I set the CUA in option
and
it is working. One point that probably confuse people is that even in
this
case, the short cuts in edit menu is not C-x and C-c and so on.







2- It is very slow to start ( I didn't use emacs clinets)

You should use EmacsClient and only start Emacs once.

Making it easy to get started using EmacsClient is one of the main
things
the installer for Emacs+EmacsW32 is trying to help you with. Several
shortcuts gets installed that lets you start Emacs through EmacsClient.
There is one in the start menu and you get one in the SendTo menu. If
you
prefer working from the command line there is a command line script
called
e.cmd for this.

If you use the patched version then Emacs server gets started
automatically through those shortcuts and or the command line scripts.
(For the unpatched version you have to start Emacs server yourself,
please
read the Emacs manual.)

I think I don't have the patched version. I will try to see what I can do
with this but as long as I am not closing emacs after each edit, I don't
need to restart it. I am happy!

5- Some times when I try to click on VHDL menu, this menu item
disappears!

Can you please describe this more? Exactly when does this happen?

It happens before to me but it is working well now. I will post the
details
if it happens again to me.

More on new and old problems that I have:

1- I can set speedbar and used it. It is a very useful facility. The
problem
is that I can not dock it into emacs. Is there any way to dock it into
emacs
so it doesn't start as a new window?

2- If I have a file that I modified with ISE, when I open it with Emacs,
I
can see a ^M at the end of each line. This generates error during
indentation. I could not find any way to fix it. I only can remove them
manually which is time consuming. Any way to do this in emacs or ISE or
by
any other tools?

One suggestion:

As during editing, it is possible to edit several files, is there any
way
to save all files just by pressing a button on toolbar or a menu item?

My view of emacs for editing VHDL is no changed and I am very happy to
use
it with VHDL.

Best regards and thanks for helping to use emacs.- Hide quoted text -

- Show quoted text -

I downloaded emacs - windows version from
http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
(Download Latest EmacsW32 + Emacs patched).
It supports vhdl mode. Its really good. You can give a try.

JK
I
If you use it with ISE, would you please tell me how did you setup ISE to
use it?
In my setup, emacs is runs every time and also when I click on an error in
ISE, it can not bring me to the specific line in the source code.

Best regards
 
On Apr 30, 4:27 pm, "mans" <(myname_here)_123...@yahoo.com> wrote:
"JK" <krishna.januman...@gmail.com> wrote in message

news:1177927075.175252.171140@n76g2000hsh.googlegroups.com...





On Apr 29, 7:47 pm, "mans" <(myname_here)_123...@yahoo.com> wrote:
Thanks for telling us about the problems so we may try to get them
fixed.

Thank you for helping me to solve the problem.

1- Its keyboard shortcuts are not windows based. I tried to
configure wmacsw32 without any success.

Can you please tell me what you did and how it failed? There is a quick
setup for those things if you use the menus:

Options - Customize EmacsW32 ...

I did use this option and it didn't work for me. I set the CUA in option
and
it is working. One point that probably confuse people is that even in
this
case, the short cuts in edit menu is not C-x and C-c and so on.

2- It is very slow to start ( I didn't use emacs clinets)

You should use EmacsClient and only start Emacs once.

Making it easy to get started using EmacsClient is one of the main
things
the installer for Emacs+EmacsW32 is trying to help you with. Several
shortcuts gets installed that lets you start Emacs through EmacsClient.
There is one in the start menu and you get one in the SendTo menu. If
you
prefer working from the command line there is a command line script
called
e.cmd for this.

If you use the patched version then Emacs server gets started
automatically through those shortcuts and or the command line scripts.
(For the unpatched version you have to start Emacs server yourself,
please
read the Emacs manual.)

I think I don't have the patched version. I will try to see what I can do
with this but as long as I am not closing emacs after each edit, I don't
need to restart it. I am happy!

5- Some times when I try to click on VHDL menu, this menu item
disappears!

Can you please describe this more? Exactly when does this happen?

It happens before to me but it is working well now. I will post the
details
if it happens again to me.

More on new and old problems that I have:

1- I can set speedbar and used it. It is a very useful facility. The
problem
is that I can not dock it into emacs. Is there any way to dock it into
emacs
so it doesn't start as a new window?

2- If I have a file that I modified with ISE, when I open it with Emacs,
I
can see a ^M at the end of each line. This generates error during
indentation. I could not find any way to fix it. I only can remove them
manually which is time consuming. Any way to do this in emacs or ISE or
by
any other tools?

One suggestion:

As during editing, it is possible to edit several files, is there any
way
to save all files just by pressing a button on toolbar or a menu item?

My view of emacs for editing VHDL is no changed and I am very happy to
use
it with VHDL.

Best regards and thanks for helping to use emacs.- Hide quoted text -

- Show quoted text -

I downloaded emacs - windows version from
http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
(Download Latest EmacsW32 + Emacs patched).
It supports vhdl mode. Its really good. You can give a try.

JK
I

If you use it with ISE, would you please tell me how did you setup ISE to
use it?
In my setup, emacs is runs every time and also when I click on an error in
ISE, it can not bring me to the specific line in the source code.

Best regards- Hide quoted text -

- Show quoted text -
No, I am not using Emacs with ISE. For Design Entry I am using
Emacs32 only and in this, I set Compiler as Modelsim.
So, once I complete my coding, I do compilation in Emacs32 itself to
check syntax errors if any.

Regards,
JK
 
JK wrote:


I downloaded emacs - windows version from
http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
(Download Latest EmacsW32 + Emacs patched).
It supports vhdl mode. Its really good. You can give a try.
I just did. That's the best windows install I've seen.
Speedbar and vhdl-mode are built-in and *work*.

However, I'll keep my linux box until
there is a real shell integrated
just as well.

-- Mike Treseler
 
mans (myname_here) wrote:

Over all it is very good if you can use it (I could not!)
You could try the Zeus for Windows IDE:

http://www.zeusedit.com
NOTE: Zeus is shareware.

It should be easy enough to configure Zeus for VHDL.

FWIW the next Zeus release will come with better configuration
for VHDL and will also add code folding for the VHDL language.

Problems that I had:

1- Its keyboard shortcuts are not windows based. I tried
to configure wmacsw32 without any success.
The Zeus keyboard is Windows aware and is also fully configurable.

2- It is very slow to start ( I didn't use emacs clinets)
Generally Zeus will load in less than a second.

3- I read that you can see a hierarchy of your VHDL code, but I
can not turn it on (I don't know how to turn it on!).
Zeus provides code hierarchy via the information provided by
the ctags utility.

I am not sure if ctags supports VHDL, but if it does this information
should apear in the class panel of the navigator.

Cheers Jussi Jumppanen
Author: Zeus for Windows IDE
 
If you use it with ISE, would you please tell me how did you setup ISE to
use it?
In my setup, emacs is runs every time and also when I click on an error in
ISE, it can not bring me to the specific line in the source code.

Best regards
I use Emacs with ISE -
go to http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1&iCountryID=1&getPagePath=13713
to find out how to integrate emacs with ISE.
$2 = line number, $1 = file name
 
"mans" <(myname_here)_123456@yahoo.com> writes:
Emacs has a very good editor for VHDL editing. It has several good features
such as auto indentation and syntax highlighting. Over all it is very good
if you can use it (I could not!)
This sounds like a good start. Don't let yourself get discouraged.

1- Its keyboard shortcuts are not windows based. I tried to configure
wmacsw32 without any success.
Personally, I use XEmacs (Linux, Win32 native) which might be a little
different. Here, the old-school windows shortcuts for copy/paste do work
(C-Insert, S-Insert, etc.). The others, C-c in particular won't and I
would not recommend changing the mappings. pc-select mode gives you
the selection behavior using S-right/left/up/down (cursor keys).

2- It is very slow to start ( I didn't use emacs clinets)
Depends on what your config file looks like. I'd consider using the
clients.

3- I read that you can see a hierarchy of your VHDL code, but I can not
turn it on (I don't know how to turn it on!).
You will have to load a package called "speedbar". If that has not
been installed already you can get it from
http://cedet.sourceforge.net/

4- I can not find any documentation on facilities which are available
in VHDL mode.
In VHDL mode type: C-c C-h

5- Some times when I try to click on VHDL menu, this menu item
disappears!
Dunno.

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)
 
On Apr 29, 3:47 pm, "mans" <(myname_here)_123...@yahoo.com> wrote:
2- If I have a file that I modified with ISE, when I open it with Emacs, I
can see a ^M at the end of each line. This generates error during
indentation. I could not find any way to fix it. I only can remove them
manually which is time consuming. Any way to do this in emacs or ISE or by
any other tools?
That indicates that your file is stored with odd line endings.

Generally there are two styles of line ending, "Carriage Return" +
"Line Feed" CRLF which is used in MSDOS. And simple Line-Feed (LF)
endings, used in Unix and now in Windows.

What Emacs does is to read the file and find out which sort of endings
are in use and automatically default to the right ones. The problem
here is likely that you are saving the file with LF endings and
opening it again with ISE which uses CRLF endings. Emacs doesn't
expect the endings to change as you edit the file.

The solution is probably to open and save the files initially using
CRLF endings. So, to fix this open up your file using Emacs and type
C-x RET f "dos" RET. Or select the menu Options->Mule->Set coding
systems->For Saving this Buffer.

Post again if doing the above doesn't work.
 
On May 10, 6:33 am, Marcus Harnisch <marcus.harni...@gmx.net> wrote:
"mans" <(myname_here)_123...@yahoo.com> writes:
Emacs has a very good editor for VHDL editing. It has several good features
such as auto indentation and syntax highlighting. Over all it is very good
if you can use it (I could not!)

This sounds like a good start. Don't let yourself get discouraged.

1- Its keyboard shortcuts are not windows based. I tried to configure
wmacsw32 without any success.

Personally, I use XEmacs (Linux, Win32 native) which might be a little
different. Here, the old-school windows shortcuts for copy/paste do work
(C-Insert, S-Insert, etc.). The others, C-c in particular won't and I
would not recommend changing the mappings. pc-select mode gives you
the selection behavior using S-right/left/up/down (cursor keys).

2- It is very slow to start ( I didn't use emacs clinets)

Depends on what your config file looks like. I'd consider using the
clients.

3- I read that you can see a hierarchy of your VHDL code, but I can not
turn it on (I don't know how to turn it on!).

You will have to load a package called "speedbar". If that has not
been installed already you can get it from
http://cedet.sourceforge.net/

4- I can not find any documentation on facilities which are available
in VHDL mode.

In VHDL mode type: C-c C-h

5- Some times when I try to click on VHDL menu, this menu item
disappears!

Dunno.

Regards
-- Marcus

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

(seen onhttp://www.veripool.com/verilog-mode_news.html)
I use xemacs with cua mode and it handles most of the windows
shortcuts (including C-c, C-x and C-v). I had to set another couple of
options to get it to treat the selected text as "pending delete" too.
I just wish there was a handy way to select a word or phrase in the
code and then search for other occurrences of it, with minimal
additional typing. There probably is, but I just don't know it yet!

If you really cannot stomach the rest of the emacs wizardy, try jGrasp
(free) from University of Auburn. It has very good highlighting and
indentation (it does not autocapitalize). It also can insert Control
Structure Diagram (CSD) graphics in the left margin/whitespace
including buttons for collapsing/expanding code segments, etc. Mousing
over the appropriate CSD graphic then shows you the top of that
control structure (process/loop/if-then/case, etc), and if it was off
screen, it temporarily shows it on the top row. It uses java and is
portable between unix/linux and windows, but it is not slow like some
other java based editors.

Andy
 
Andy <jonesandy@comcast.net> writes:

I use xemacs with cua mode and it handles most of the windows
shortcuts (including C-c, C-x and C-v). I had to set another couple of
options to get it to treat the selected text as "pending delete" too.
I just wish there was a handy way to select a word or phrase in the
code and then search for other occurrences of it, with minimal
additional typing. There probably is, but I just don't know it yet!
Hi Andy,

Does C-s, M-y do what you want?

This calls up a search and pastes your previous copy into it. I have
C-s bound to isearch-forward, which may be non-default. C-s might be
a normal (non-incremental) search, in which case, C-s, C-y might do
the trick?

Alternatively, "M-x occur" is useful, it opens another window listing
which lines a particular phrase (well, regexp) occurs in. If you
like it, bind a key for that too :)

I also have a key bound to mark and copy the word/signalname/etc that
is under the cursor, all in one go. which is quite handy for these
sorts of things...

Cheers,
Martin

--
martin.j.thompson@trw.com
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
 
Andy wrote:

I had to set another couple of
options to get it to treat the selected text as "pending delete" too.
I do that with query-replace.

I just wish there was a handy way to select a word or phrase in the
code and then search for other occurrences of it, with minimal
additional typing. There probably is, but I just don't know it yet!
Like most tasks, it's easy once you know how to do it :)

C-s

Then type enough letters to see the instances light up.

C-s again to jump to the next instance, etc.

-- Mike Treseler
 
On May 14, 12:07 pm, Mike Treseler <mike_trese...@comcast.net> wrote:
Andy wrote:
I had to set another couple of
options to get it to treat the selected text as "pending delete" too.

I do that with query-replace.

I just wish there was a handy way to select a word or phrase in the
code and then search for other occurrences of it, with minimal
additional typing. There probably is, but I just don't know it yet!

Like most tasks, it's easy once you know how to do it :)

C-s

Then type enough letters to see the instances light up.

C-s again to jump to the next instance, etc.

-- Mike Treseler
Mike,

Thanks, but I already know how to use C-s (that's what I end up
using). Unfortunately, it still requires me to type the word (or
enough of it to be sufficiently unique) to start the search. I was
looking for something that allows me to select an existing word,
usually a port or signal/variable name (with mouse or keyboard), and
search for other occurrences of that word. Typing the entire word gets
tedious when using long names with specific suffixes, which require
that virtually the entire name be re-typed. When in I-search (C-s), a
C-v (paste) does not act like I typed it, but actually inserts the
copy buffer at the cursor location. It's like the C-v operation
overrides the fact that one is already in I-search mode.

Andy
 
Andy wrote:

I was
looking for something that allows me to select an existing word,
usually a port or signal/variable name (with mouse or keyboard), and
search for other occurrences of that word. Typing the entire word gets
tedious when using long names with specific suffixes, which require
that virtually the entire name be re-typed.
I would just mark with the mouse then, C-s
and paste into the mini-buffer with
the center mouse key. Then C-s, C-s, ...


-- Mike Treseler
 
On May 14, 2:10 pm, Mike Treseler <mike_trese...@comcast.net> wrote:
Andy wrote:
I was
looking for something that allows me to select an existing word,
usually a port or signal/variable name (with mouse or keyboard), and
search for other occurrences of that word. Typing the entire word gets
tedious when using long names with specific suffixes, which require
that virtually the entire name be re-typed.

I would just mark with the mouse then, C-s
and paste into the mini-buffer with
the center mouse key. Then C-s, C-s, ...

-- Mike Treseler
Mike,

Thanks! that works!

Is there a keyboard equivalent of center mouse key?

Andy
 
Andy wrote:

Mike,
Thanks! that works!
Is there a keyboard equivalent of center mouse key?
Well, there is a function.
C-h k click2 says:

<mouse-2> at that spot runs the command mouse-insert-selection
which is an interactive compiled Lisp function in `mouse-sel'.
(mouse-insert-selection EVENT)

But if I don't press the mouse button
there is no interrupt, and I don't get the
right coordinates.

In any case, Pontus has already converted me
to click1, C-s, C-w, ...
That's easier on my right hand.

-- Mike Treseler
 

Welcome to EDABoard.com

Sponsor

Back
Top