1 package altera_avalon_timer
;
3 use base
qw(BasicModule);
6 sub required_class_name
{
10 sub required_module_names
{
15 my ($class, $system) = @_;
18 print "#ifndef __ASSEMBLY__\n";
19 print "#include <asm/timer_struct.h>\n";
24 sub base_address_cast
{
28 # only timers with a non-fixed-period are valid
30 my ($class, $system, $module_name) = @_;
32 my $module = $system->getModule ($module_name);
33 my $fixed_period = $module->getWSAAssignment ('fixed_period');
35 if ($fixed_period eq '0') {
43 altera_avalon_timer
->run2 (@_);