Add scripts to generate fireMarshal config files
This commit is contained in:
parent
9ceaf2f4ba
commit
70c6351887
|
@ -63,11 +63,40 @@ sub generate_accel{
|
|||
system("perl run_hls.pl ${PGM} ${FUNC} $prefix");
|
||||
}
|
||||
|
||||
if ($tasks{'accel_sw'}){
|
||||
# Add compile-bm.sh for compile_sw and fireMarshal
|
||||
system("echo 'make clean' > compile-bm.sh");
|
||||
system("echo 'make' >> compile-bm.sh");
|
||||
system("chmod +x compile-bm.sh");
|
||||
|
||||
# Generate fireMarshal config
|
||||
my $marshal_config_sw_bm_json = "$rdir/tools/centrifuge/scripts/templates/marshal_config_sw_bm_json";
|
||||
open my $fh, '<', $marshal_config_sw_bm_json or die "error opening $marshal_config_sw_bm_json $!";
|
||||
my $marshal_config_sw_bm_template = do { local $/; <$fh> };
|
||||
|
||||
my $name = $pgm.'-bare-'.'sw-bm';
|
||||
my $bin = "$pgm.bm.rv";
|
||||
my $marshal_config_sw_bm = $marshal_config_sw_bm_template;
|
||||
$marshal_config_sw_bm =~ s/WORKDIR/$bm_path_c/;
|
||||
$marshal_config_sw_bm =~ s/HOSTINIT/compile-bm.sh/;
|
||||
|
||||
# For orig sw run
|
||||
my $marshal_config_sw_bm_accel = $marshal_config_sw_bm;
|
||||
$marshal_config_sw_bm =~ s/NAME/$name/;
|
||||
$marshal_config_sw_bm =~ s/BIN/$bin/;
|
||||
open FILE, ">$name.json";
|
||||
print FILE $marshal_config_sw_bm;
|
||||
close FILE;
|
||||
|
||||
# For accel run
|
||||
$name = $name.'_accel';
|
||||
$bin = "$pgm.bm_accel.rv";
|
||||
$marshal_config_sw_bm_accel =~ s/NAME/$name/;
|
||||
$marshal_config_sw_bm_accel =~ s/BIN/$bin/;
|
||||
open FILE, ">$name.json";
|
||||
print FILE $marshal_config_sw_bm_accel;
|
||||
close FILE;
|
||||
}
|
||||
if ($is_rocc) {
|
||||
system("cp -H $RDIR/tools/centrifuge/scripts/run_chisel.pl $bm_path_c");
|
||||
system("cp -H $RDIR/tools/centrifuge/scripts/generate_wrapper.pl $bm_path_c");
|
||||
|
|
|
@ -9,7 +9,7 @@ sub generate_build_sbt {
|
|||
my $rdir = $ENV{'RDIR'};
|
||||
print $rdir;
|
||||
if ((not defined($rdir)) or $rdir eq '') {
|
||||
print("Please source sourceme-f1-manager.sh!\n");
|
||||
print("Please source centrifuge/env.sh!\n");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ sub generate_build_sbt {
|
|||
my $soc_name = $_[0];
|
||||
my %bm_path = %{$_[1]};
|
||||
|
||||
my $build_sbt_template = "$rdir/tools/centrifuge/scripts/build_sbt_template";
|
||||
my $build_sbt_template = "$rdir/tools/centrifuge/scripts/templates/build_sbt_template";
|
||||
open my $fh, '<', $build_sbt_template or die "error opening $build_sbt_template $!";
|
||||
my $build_sbt = do { local $/; <$fh> };
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ if ($task eq 'clean') {
|
|||
}
|
||||
|
||||
my @task_list = ();
|
||||
my @accel_task_list = qw(accel accel_hls accel_chisel accel_sw, build_sbt, config);
|
||||
my @accel_task_list = qw(accel accel_hls accel_chisel accel_sw build_sbt config);
|
||||
if ($task eq 'all') {
|
||||
push (@task_list, @accel_task_list);
|
||||
push (@task_list, qw(build_sbt config f1_scripts xsim_scripts));
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name" : "NAME",
|
||||
"workdir" : "WORKDIR",
|
||||
"base" : "bare",
|
||||
"host-init" : "HOSTINIT",
|
||||
"bin" : "BIN"
|
||||
}
|
||||
|
Loading…
Reference in New Issue