Feed on

Archive for the ‘Specman’ Category

Specman editing support for Emacs

Saturday, July 25th, 2020 by Marcus Harnisch

Editing Specman/e files in Emacs has a long history, dating back at least 20 years, according to a reference to specman-mode found in an ancient mbox file on my computer. Over the years the code has moved to Cadence and then took a bit of a rest. The original domain (specman-mode.com) disappeared and later versions of specman-mode were occasionally circulated in Cadence’s community forums.
This encouraged my friend and colleague Scott Roland to continue maintenance on GitHub with the help of others including myself. Sadly he passed away and specman-mode found a new home again: https://github.com/ooglyhLL/specman-mode
In many years of using it I kept my own wishlist of things I’d like to see changed or at least make it easy to customize to personal taste. Achievements so far:

  • Extend/fix syntax highlighting. This is of course an ongoing effort.
  • Respect user’s preferences and assumptions when it comes to Emacs execution environment (local variables, hooks, syntax table) and preferred Specman line comment style (VHDL vs Verilog)
  • Increase use of up-to-date, built-in Emacs features. This paves the way for better integration with cross-cutting functionality.
  • Add GNU Global support via ggtags (https://github.com/leoliu/ggtags)
  • Dust off the code base. The single-file source weighed in at about 5000 lines total. Further reduction in size and complexity will make it easier to maintain and extend the code in the future.

On a separate branch I am currently experimenting with a major improvement in the context of “syntactic parsing” (using memoizing syntax-ppss for the afficionados) that allows us to get rid of a huge block of specific code that implemented effectively the same when Emacs didn’t have the feature, yet. This simplifies code in countless places (total savings amount to 1000 lines), makes it potentially more robust and already shows a run-time reduction by 80% when reindenting a file of significant size.
Due to stagnating development on XEmacs, support for it will likely come to an end sooner or later. Having been a long time XEmacs user myself I find it increasingly hard to justify the time and effort to ensure compatibility.

Your feedback and support will be much appreciated. Please use GitHub’s issue tracker for bug reports and requests.

Work For Verilab