New Genesis version (r10686) --- improved support for scripted configuration and synth backend

1 view
Skip to first unread message

Ofer Shacham

unread,
Jul 6, 2012, 2:09:37 AM7/6/12
to genesis...@googlegroups.com
Hello Genesis2 Users,

New genesis2 release is now available (default at stanford; email me for a tar ball otherwise). As usual, it is backward compatible, and it adds some cool features my small but superb user community suggested. You feedback is always welcome and greatly appreciated!

What's new?
Cleaner Generation
All generated verilog files go to one of two folders: genesis_verif/ and genesis_synth/ so your generation folder stays clean and organized. We further augment this with a new flag that tells genesis the path to your synthesis top, so that genesis can separate the files for you to verif and synth.
-synthtop top.module.des_top
With this addition, instead of having just one generated verilog file list (typically this is genesis_vlog.vf, unless you changed it via the '-product' command line flag) we add a second one: genesis_vlog.synth.vf that contains only the list of files for synthesis. These lists also makes sure that this change is completely transparent to you. No need to change your Makefile.


Configuration Via Perl Script
XML config files are the official and formal representation of the design. However, it is sometimes useful to have an easy method of overriding a parameter value here and there. For these purpose, it is often convenient to be able to write a short script that manipulates those values. Genesis2 accept those scripts using the -cfg command line flag as described here. Many configuration scripts may be applied one after the other to cover different aspects of the configuration. If a parameter value binding is overridden, a warning is issued.  
-cfg filename1 .. filenameN
Note that parameters values that are configured through the configuration file will NOT override definitions by the XML file (but XML does override config script definitions). Also note that parameters values that are configured through the config file will NOT override parameters that were already bound using the generate statement in the .vp files, since that assignment has higher priority. For a complete explanation of parameters override priorities see here.

Configuration files are any simple Perl script which uses one of two predefined functions:

  • configure($path_to_param, $override_value) is the main function to enable overriding parameters. Example:
my $path = 'top.dut.inst';
my $path_to_prm = $path.'Width';
configure($path_to_prm, 32);
my $path_to_prm = $path.'Size';
configure($path_to_prm, 4);
my $path_to_prm = $path.'RAM';
configure($path_to_prm, [0x1, 0x2, 0x3, 0x4]);
  • include($another_filename) is a productivity construct to enable you to break the config file into smaller portions. Include inlines the other file into the current file. Example:
In Cache.cfg:
-------------
die unless defined $path;
foreach $cache ('cache1', 'cache2', 'cache3', 'cache4'){
  configure($path . '.' . $cache . '.' . 'Width', 32);
}

In Main.cfg:
------------
my $path = 'top.dut.tile';
include('Cache.cfg');

Configuration Via Command Line
Sometime you just want to quickly override something... just for a minute... just to try it... do you really need to modify the config or xml file?
From now on, the answer is no. Simply use the command line flag '-parameter'. For example:
-parameter path.to.prm1=value1 path.to.another.prm2=value2
Note that command line binding of parameters will override both XML and Perl configuration file definitions.

Set Path for Configuration Files
Just to make life easier when dealing with many configuration files...
-cfgpath /path/to/cfg/dir1 -cfgpath path/to/cfg/dir2

Explicit Param Source In File Header
With parameters set by parent module, perl config script, xml and command line, it is important to know which parameter where bound by which method, so we can debug. From now on, check your generated verilog file header --- it has all this information in a nice ordered list.

That's it for today. More features, mostly for supporting backend flows, to come soon...

Best,
Ofer.

Reply all
Reply to author
Forward
0 new messages