Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > VHDL and Emacs (My experience)

Reply
Thread Tools

VHDL and Emacs (My experience)

 
 
Marcus Harnisch
Guest
Posts: n/a
 
      05-10-2007
"mans" <(myname_here)(E-Mail Removed)> 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)
 
Reply With Quote
 
 
 
 
Robert Thorpe
Guest
Posts: n/a
 
      05-10-2007
On Apr 29, 3:47 pm, "mans" <(myname_here)(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      05-11-2007
On May 10, 6:33 am, Marcus Harnisch <(E-Mail Removed)> wrote:
> "mans" <(myname_here)(E-Mail Removed)> 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


 
Reply With Quote
 
Martin Thompson
Guest
Posts: n/a
 
      05-14-2007
Andy <(E-Mail Removed)> 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

--
http://www.velocityreviews.com/forums/(E-Mail Removed)
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      05-14-2007
On May 14, 3:07 am, Martin Thompson <(E-Mail Removed)> wrote:
> Andy <(E-Mail Removed)> 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
>
> --
> (E-Mail Removed)
> TRW Conekt - Consultancy in Engineering, Knowledge and Technologyhttp://www.conekt.net/electronics.html


None of the above worked. Highlighted text when you're typing in the i-
search pattern is a different color than text selected with the mouse
or shift-arrow keys.

Pasting does not seem to work in i-search (C-s).

I am pretty much a neophyte with emacs yet, so thanks for the hints!

Andy


 
Reply With Quote
 
Ben Jones
Guest
Posts: n/a
 
      05-14-2007

"Andy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>
> None of the above worked. Highlighted text when you're typing in the i-
> search pattern is a different color than text selected with the mouse
> or shift-arrow keys.
> Pasting does not seem to work in i-search (C-s).


Tsk. It's been said before and it'll be said again: "Emacs has just about
every feature you could possibly want from an operating system. Now all it
needs is a decent editor..."

-Ben-


 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      05-14-2007
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
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      05-14-2007
On May 14, 12:07 pm, Mike Treseler <(E-Mail Removed)> 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

 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      05-14-2007
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





 
Reply With Quote
 
pontus.stenstrom@gmail.com
Guest
Posts: n/a
 
      05-14-2007
On 14 Maj, 21:10, Mike Treseler <(E-Mail Removed)> 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


Try C-w (after doing C-s), it will increase the selection, word by
word,
following the point where you stand. I find it very useful.

Be careful, C-w is mapped to kill-region when you are not searching!
Undo (C-_) is your friend.

/Pontus

 
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
Emacs VHDL-mode Next-Error, Previous-Error, and First-Error are not working...? BlackHelicopter VHDL 2 02-12-2013 01:12 AM
Emacs VHDL-Mode Problem : vhdl-update-sensitivity-process omara007 VHDL 0 01-06-2010 03:47 AM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
Trouble running Emacs-EPL (to run perl in emacs). Adam Funk Perl Misc 4 01-29-2007 10:42 AM
emacs vhdl-mode Rick Jackson VHDL 10 11-30-2005 12:09 PM



Advertisments