From Genesis2
Revision as of 22:51, 8 November 2011 by Shacham (talk | contribs) (Older style (still supported) Auxiliary Methods)

Jump to: navigation, search

Older style (still supported) Auxiliary Methods

Back To Main Genesis2 Auxiliary Methods Guide

sub get_instance_name
Returns the name of the current instance
//; my $someObj_inst_name = $someObj->get_instance_name();

Example: Before (SystemVerilog)

Adder#(.w(8),.n(4)) MyAdder(.in1(a),.in2(b),.out(c));

After (Genesis2)

//; my $my_adder = generate('Adder', 'MyAdder', w=>8, n=>4);
`$my_adder->get_module_name()` `$my_adder->get_instance_name()`
     (.in1(a), .in2(b), .out(c));

Also see sub instantiate, here.