OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [perl_gui/] [lib/] [perl/] [soc_gen.pl] - Diff between revs 22 and 23

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 22 Rev 23
Line 933... Line 933...
 
 
                         }
                         }
 
 
 
 
                }
                }
 
                # Write main.c file if not exist
 
                my $n="$target_dir/sw/main.c";
 
                if (!(-f "$n")) {
 
                        # Write main.c
 
                        open(FILE,  ">$n") || die "Can not open: $!";
 
                        print FILE main_c_template($name);
 
                        close(FILE) || die "Error closing file: $!";
 
 
 
                }
 
 
 
 
 
 
 
 
                        message_dialog("SoC \"$name\" has been created successfully at $target_dir/ " );
                        message_dialog("SoC \"$name\" has been created successfully at $target_dir/ " );
Line 951... Line 958...
 
 
return 1;
return 1;
}
}
 
 
 
 
 
sub main_c_template{
 
        my $hdr=shift;
 
        my $text="
 
#include \"$hdr.h\"
 
 
 
 
 
// a simple delay function
 
void delay ( unsigned int num ){
 
 
 
        while (num>0){
 
                num--;
 
                asm volatile (\"nop\");
 
        }
 
        return;
 
 
 
}
 
 
 
int main(){
 
        while(1){
 
 
 
 
 
 
 
        }
 
 
 
return 0;
 
}
 
 
 
";
 
 
 
return $text;
 
 
 
 
 
}
 
 
 
 
 
 
 
 
sub get_wb_address      {
sub get_wb_address      {
        my ($soc,$instance_id,$addr,$width)=@_;
        my ($soc,$instance_id,$addr,$width)=@_;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.