Genesis2 release r11012 -- New XML Crawler library in *Python* + some bug fixes

3 views
Skip to first unread message

Ofer Shacham

unread,
Sep 14, 2012, 2:17:26 AM9/14/12
to genesis...@googlegroups.com

Hi Everyone,

Genesis2 r11012 is out. As usual, default on Stanford machines and send me an email to get a tar ball elsewhere :-)

Genesis2.XMLCrawler Python Module
The key news in this release is that it contains an XML Crawler library in python for parsing the output XML to create backend scripts or software headers. Complete documentation and starter code is available at  http://genesis2.stanford.edu/mediawiki/index.php/PythonXMLCrawler

Error and Warning now called as both method and as function
sub error
Prints an error message and exits with a printout of the current file and line number. Can be used as either function or method.
//; $self->error("some error message");
//; error("some error message");
sub warning
Prints a warning message and a printout of the current file and line. Does NOT exit. Can be used as either function or method.
//; $self->warning("some message");
//; warning("some message");

Style Tip For Parameter Definitions
Often, we would like to declare a parameter that MUST be overridden at instantiation or from external configuration. One way to do that is to provide a default value which is out of range. If the parameter value is not overridden, Genesis will issue an error. For example:
//; my $width = parameter(Name=>'BitWidth', Val=>-1, Min=>0, Doc=>'...');
//; my $enc = parameter(Name=>'Encrypt ', Val=>'', List=>['Yes', 'No', 'Maybe'], Doc=>'...');
For compound structures and/or pointers, where simple range limitations could not apply, the following is useful:
//; my $cpu_ref = parameter(Name=>'CPU_ObjRef', Val=>undef, Doc=>'...') or error ("Parameter CPU_ObjRef must be specified");


As always, shoot me an email if you see a bug or think about a cool feature you would like to see in your generator.

Best,
Ofer.


Reply all
Reply to author
Forward
0 new messages