亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? cb_generator.pl

?? 包括USB
?? PL
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
# | file: cb_generator.pl
# |
# | This SOPC Builder Generator program is provided by
# | the Component Builder application. It is copied
# | straight across and is data-driven from its command
# | line arguments and the PTF files referenced.
# |
# | Its purpose is to construct an HDL "wrapper" for
# | a particular instance of a particular SOPC Builder
# | peripheral. This wrapper resolves the instance
# | name and any HDL parameterization.
# |
# +-------------------------------------------



# +-------------------------------------------
# |

use strict;
use format_conversion_utils;
use ptf_parse;
use wiz_utils;
use europa_all;
use run_system_command_utils;

# |
# +-------------------------------------------



# +-------------------------------------------
# |
# | first pass: include all of generator_libarary.pm RIGHT HERE.
# | dvb04.08.02
# | then prune down to actual functionality.
# |
# | TODO: Rewrite this whole file into something readable
# | this is much more confusing than I'm comfortable with. dvb04.
# | (though it does seem to work.)
# |

my $DEBUG_DEFAULT_GEN = 1;

#This is the global hash of arguments passed in by the generator program

my $generator_hr = {
		     wrapper_args => {
				      make_wrapper => 0,
				      top_module_name => "",
				      simulate_hdl => 1,
				      ports => "",
				     },
		     class_ptf_hr => "",
		     module_ptf_hr => "",
		     system_ptf_hr => "",
		     language => "",
		     external_args => "",
		     external_args_hr => "",
		     project_path_widget => "__PROJECT_DIRECTORY__",
		     generator_mode => "silent",
		    };


sub generator_print_verbose
{
  my ($info) = (@_);

  if($generator_hr->{generator_mode} eq "verbose"){
    print("cb_generator.pl: ".$info);
  }
}

sub generator_enable_mode
{
  my ($mode) = (@_);
  $generator_hr->{generator_mode} = $mode;
}

sub generator_get_system_ptf_handle
{ 
  return $generator_hr->{system_ptf_hr};
}

sub generator_get_language
{
  return $generator_hr->{language};
}

sub generator_get_class_ptf_handle
{
  return $generator_hr->{class_ptf_hr};
}

sub default_ribbit
{
  my ($arg) = (@_);
  &ribbit("\n\n--Error: default_gen_lib: $arg\n");  
}


sub _copy_files
{
  my ($dest_dir, $source_dir, @files) = (@_);
  my $function_name;
  
  #validate args
  &default_ribbit("No target dir for function copy_files!")
  unless ($dest_dir ne "");
  
  &default_ribbit("No source dir for function copy_files!")
  unless ($source_dir ne "");

  &default_ribbit("No files for function copy_files!")
  unless (@files != 0);

  
  #check for valid directories
  opendir (SDIR, $source_dir) or 
    &default_ribbit("can't open $source_dir !");
  
  opendir (DDIR, $dest_dir) or
    &default_ribbit("can't open $dest_dir !");
  
  
  foreach my $source_file(@files){
    # |
    # | Separate out the source subdir and the source filename
    # |
    my $source_subdir = "";
    my $source_filename = $source_file;

    if($source_filename =~ /^(.*)\/(.*)$/)  # break on last slash
    {
      $source_subdir = "/$1"; # embed its leading slash, for concatty
      $source_filename = $2;
    }

    my $source_fullpath = "$source_dir$source_subdir/$source_filename";
    my $dest_fullpath = "$dest_dir/$source_filename";

    &Perlcopy($source_fullpath, $dest_fullpath);
    &generator_print_verbose("Copying file: \"$source_fullpath\""
            . " to \"$dest_fullpath\".\n");
  }

  closedir (SDIR);
  closedir (DDIR);
}


sub get_module_wrapper_arg_hash_from_system_ptf_file
{
  my $module_ptf_hr = $generator_hr->{module_ptf_hr};
  
  my @list_of_sections = ("MASTER","SLAVE","PORT_WIRING");
  my @port_list;
  foreach my $section(@list_of_sections){
    my $number = get_child_count($module_ptf_hr, $section);

    for(my $initial=0; $initial < $number; $initial++){
      
      my $interface_section = get_child($module_ptf_hr, $initial, $section);	
      my $interface_section_name = get_data($interface_section);

      my $port_wiring_section;
      if($section ne "PORT_WIRING"){
	$port_wiring_section = 
	  get_child_by_path($module_ptf_hr, $section." ".$interface_section_name."/PORT_WIRING");	
      }else{
	$port_wiring_section =
	  get_child_by_path($module_ptf_hr, $section);
      }
      my $num_ports = get_child_count($port_wiring_section, "PORT");
      foreach(my $port_count = 0; $port_count < $num_ports; $port_count++){
	my $port = get_child($port_wiring_section, $port_count, "PORT");
	
	my %port_info_struct;
	$port_info_struct{name} = get_data($port);
	$port_info_struct{direction} = get_data_by_path($port, "direction");
	$port_info_struct{width} = get_data_by_path($port, "width");
	$port_info_struct{vhdl_record_name} = get_data_by_path($port, "vhdl_record_name");
	$port_info_struct{vhdl_record_type} = get_data_by_path($port, "vhdl_record_type");
	
	push(@port_list, \%port_info_struct);
	
      }
    }	
  }
  $generator_hr->{wrapper_args}{ports} = \@port_list;
}


sub generator_make_module_wrapper
{
  my ($simulate_hdl, $top_module_name, $module_language) = (@_);

  &default_ribbit("generator_make_module_wrapper: no arg0 passed in for simulate_hdl\n")
    if($simulate_hdl eq '');

  &default_ribbit("generator_make_module_wrapper: no arg1 passed in for top_module_name\n")
    unless($top_module_name);

  $generator_hr->{wrapper_args}{simulate_hdl} = $simulate_hdl;
  $generator_hr->{wrapper_args}{top_module_name} = $top_module_name;
  $generator_hr->{wrapper_args}{make_wrapper} = 1;
  $generator_hr->{wrapper_args}{module_language} = $module_language;

}




# |
# | recognize varous number forms,
# | return 'h0123abcd-ish.
# |
sub turn_anything_into_appropriate_string($$$$)
	{
	my ($value,$type,$editable,$module_language) = (@_);

    return $value if($value =~ /^\"/);   # quoted string: unscathed
    return $value if($type eq "string"); # string: anything is ok
    
    return $value if(!$editable);        # and you know, if you can't change it, keep it!
    
    
	# |
	# | first, convert to a number
	# |
	my $base = 10;
	my $n = $value;
	my $width = 32;
	my $number = 0;
	
	$value = lc($value); # lower case
	
	if($value =~ /^([0-9]*)\'([hbo])(.*)$/)
		{
		# | tick notation: AOK for verilog
		if($module_language eq "verilog")
			{
			$number = $value;
			}
		# |
		# | note: at this point, we could notice if the
		# | result should be vhdl binary, and convert
		# | to that, avoiding the precision-losing
		# | integer intermediary
		# |
		# | (alternatively, we could use a binary string
		# | always as the intermediate form, rather than
		# | a precision-losing int.)
		# |
		else
			{
			$width = $1;
			my $baseletter = $2;
			my $digits = $3;
			
			if($baseletter eq "h")
				{
				$base = 16;
				}
			elsif($baseletter eq "b")
				{
				$base = 2;
				}
			elsif($baseletter eq "o") # must be
				{
				$base = 8;
				}
			
			$digits =~ s/[ _-]//g; # crush out dividing value
			
			while(length($digits) > 0)
				{
				my $digit = substr($digits,0,1);
				$digits = substr($digits,1);
				my $digitvalue = hex($digit); # how handy
				$number = $number * $base + $digitvalue;
				}
			}
		}
	elsif($value =~ /^0x(.*)$/)
		{
		$number = hex($1);
		}
	else  # try for decimal
		{
		$number = int(1 * $value);
		}
	
	# |
	# | ok, we have a number. If our target type
	# | is "std_logic_vector(this downto that)"
	# | for tricky VHDL, we
	# | must quote a binary string out of it.
	# |
	
	if(($module_language eq "vhdl") and ($type =~ /^.*\((\d+) downto (\d+)\).*$/))
		{
		my ($high_bit,$low_bit) = ($1,$2);
		my $binary = "";
		for(my $bit = $low_bit; $bit <= $high_bit; $bit++)
			{
			$binary = ($number % 2) . $binary;
			$number = int($number >> 1);
			}
		
		$number = '"' . $binary . '"';
		}
	
	return $number;
	}

#
# return @array of vhdl libraries, if any, from the class.ptf
sub get_libraries()
{
    my $class_ptf = generator_get_class_ptf_handle();
    my @libraries;
    my $libraries_ptf = get_child_by_path($class_ptf,"CLASS/CB_GENERATOR/LIBRARIES");

    if($libraries_ptf)
        {
        my $library_count = get_child_count($libraries_ptf,"library");
        for(my $i = 0; $i < $library_count; $i++)
        {
            my $library_ptf = get_child($libraries_ptf,$i,"library");
            my $library_name = get_data($library_ptf);
            push(@libraries,$library_name);
        }
    }

    return @libraries;
}



sub _generator_make_module_wrapper	
{
  
  my $wrapper_args = $generator_hr->{wrapper_args};
  my $no_black_box = $wrapper_args->{simulate_hdl};
  my $top_module_name = $wrapper_args->{top_module_name};
  my $language = $generator_hr->{language};
  my @external_args = @{$generator_hr->{external_args}};
  my $module_ptf_hr = $generator_hr->{module_ptf_hr};

  ### Build Module
  my $project = e_project->new(@external_args);
  my $top = $project->top();
  
  # add the ports to the system module
  my @ports;
  
  foreach my $port_hash(@{$wrapper_args->{ports}}){
    my $porto = e_port->new({
			     name => $port_hash->{name},
			     width => $port_hash->{width},
			     direction => $port_hash->{direction},
			     vhdl_record_name => $port_hash->{vhdl_record_name},
			     vhdl_record_type => $port_hash->{vhdl_record_type}
			    });
    push(@ports, $porto);
  }
  $top->add_contents(@ports);
  




    # +----------------------------------------
    # | Get parameters from class.ptf
    # | create @array of parameters, eacho
    # | one like name=>, default=>, type=>,
    # |  
    # | These are the definitions of parameters for
    # | ANY instance of this module; we need to 
    # | have them in the "wrapee" module so that
    # | when the system bus is knitted together
    # | the parameter types can be properly used.
    # |
    # | (as it turns out, verilog doesnt need
    # | them, but vhld does)
    # |

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产日韩精品免费观看| 色综合天天视频在线观看| 欧美欧美欧美欧美| 亚洲综合无码一区二区| 欧美精品久久久久久久久老牛影院| 亚洲综合激情小说| 欧美精品丝袜中出| 久久精品国产一区二区| 亚洲精品在线免费观看视频| 大白屁股一区二区视频| 亚洲一区二区三区四区中文字幕| 欧美精选一区二区| 国产精品亚洲专一区二区三区 | 亚洲欧美在线另类| 欧美午夜免费电影| 国产尤物一区二区在线| 国产精品成人免费| 337p亚洲精品色噜噜噜| 丁香网亚洲国际| 亚洲一区二区在线观看视频 | 最新久久zyz资源站| 欧美性videosxxxxx| 韩国女主播成人在线| 国产精品美女久久久久久久久 | 99久久精品99国产精品| 亚洲gay无套男同| 久久奇米777| 91首页免费视频| 美女在线视频一区| 国产精品福利影院| 精品国产第一区二区三区观看体验| 99久久综合色| 麻豆91精品视频| 亚洲欧美另类图片小说| 欧美成人性战久久| 色菇凉天天综合网| 99久久er热在这里只有精品15| 亚洲一区二区视频在线观看| 欧美国产日韩a欧美在线观看| 欧美精品自拍偷拍动漫精品| av亚洲产国偷v产偷v自拍| 久久国产视频网| 午夜天堂影视香蕉久久| 国产精品成人一区二区三区夜夜夜| 欧美一区二区福利在线| 91久久精品日日躁夜夜躁欧美| 国产在线麻豆精品观看| 舔着乳尖日韩一区| 一区二区三区精品视频在线| 国产欧美一区二区精品婷婷| 日韩欧美国产成人一区二区| 在线观看视频91| 99热精品国产| 岛国一区二区在线观看| 国产一区二区三区四区五区美女| 亚洲成av人在线观看| 亚洲特级片在线| 国产精品免费丝袜| 中文幕一区二区三区久久蜜桃| 欧美一区二区大片| 在线成人高清不卡| 欧美亚洲国产一卡| 91久久精品网| 在线影视一区二区三区| 色婷婷激情一区二区三区| 99精品久久只有精品| 成人丝袜18视频在线观看| 国产在线不卡一区| 国产乱码一区二区三区| 精品无人码麻豆乱码1区2区 | 在线播放国产精品二区一二区四区 | av不卡在线观看| 国产不卡高清在线观看视频| 国产夫妻精品视频| 国产精品一区二区你懂的| 国产永久精品大片wwwapp| 久久99国产精品免费| 国内精品嫩模私拍在线| 国产伦精一区二区三区| 国产在线播放一区三区四| 国产精品性做久久久久久| 国产.欧美.日韩| 91网站最新地址| 欧美日韩国产免费| 日韩一区国产二区欧美三区| 欧美一级艳片视频免费观看| 欧美tk丨vk视频| 国产午夜精品一区二区 | 亚洲视频精选在线| 有码一区二区三区| 亚瑟在线精品视频| 久久机这里只有精品| 国产成人精品亚洲777人妖| 国产成人超碰人人澡人人澡| jvid福利写真一区二区三区| 欧美专区亚洲专区| 日韩一区二区三区视频| 久久久久九九视频| 亚洲欧美偷拍卡通变态| 日韩不卡手机在线v区| 国产精品一区不卡| 91蜜桃传媒精品久久久一区二区 | 制服丝袜亚洲网站| 久久综合狠狠综合| 亚洲人成影院在线观看| 石原莉奈在线亚洲三区| 国产一区二区福利视频| 色综合天天综合网国产成人综合天| 欧美日韩国产综合草草| 26uuu另类欧美| 一区二区免费在线| 国产精品一二三在| 欧美性色综合网| 久久精品一区四区| 午夜视频一区在线观看| 成人永久aaa| 4438x亚洲最大成人网| 国产精品久久福利| 秋霞电影网一区二区| 99re热这里只有精品视频| 91精品福利在线一区二区三区| 欧美国产97人人爽人人喊| 天天色综合天天| av高清久久久| 久久精品这里都是精品| 丝袜美腿高跟呻吟高潮一区| 99精品国产视频| 精品日韩成人av| 午夜视频一区在线观看| av毛片久久久久**hd| 久久亚洲二区三区| 香港成人在线视频| 91在线观看成人| 久久久久综合网| 奇米精品一区二区三区四区| 91年精品国产| 国产精品国模大尺度视频| 麻豆成人91精品二区三区| 欧美日韩视频在线观看一区二区三区| 国产日韩精品视频一区| 奇米精品一区二区三区在线观看一 | 4438成人网| 亚洲国产精品欧美一二99| av电影在线观看完整版一区二区| 久久色.com| 麻豆91免费看| 欧美一级黄色片| 香蕉久久夜色精品国产使用方法| 91蝌蚪porny| 国产精品视频看| 国产成人av资源| 欧美韩国日本一区| 国产91清纯白嫩初高中在线观看| 欧美tickle裸体挠脚心vk| 天堂一区二区在线免费观看| 欧美性猛片xxxx免费看久爱| 亚洲精品视频免费看| 成人福利视频网站| 国产精品久久久久久久久晋中 | 男男视频亚洲欧美| 91麻豆精品91久久久久同性| 午夜精品福利在线| 欧美美女一区二区在线观看| 亚洲在线免费播放| 欧美视频在线观看一区二区| 亚洲九九爱视频| 色综合亚洲欧洲| 亚洲精品视频在线观看网站| 欧美性videosxxxxx| 亚洲va国产va欧美va观看| 欧美日韩国产在线观看| 日本亚洲欧美天堂免费| 欧美成人性战久久| 国产福利不卡视频| 国产精品入口麻豆原神| 99re6这里只有精品视频在线观看| 国产精品不卡在线| 欧美少妇性性性| 麻豆精品视频在线| 2024国产精品| 成熟亚洲日本毛茸茸凸凹| 亚洲欧美一区二区三区极速播放| 欧美性大战久久| 九一久久久久久| 国产精品无码永久免费888| 91麻豆精品在线观看| 午夜精品一区二区三区三上悠亚| 91精品福利在线一区二区三区| 国产一区在线精品| 亚洲视频中文字幕| 欧美日韩国产在线播放网站| 精品一二三四在线| 中文字幕在线一区| 欧美三级三级三级| 精品一区二区三区在线播放视频| 国产精品成人在线观看| 欧美一区二区三区系列电影| 国产91精品免费| 香蕉加勒比综合久久| 久久久亚洲精品石原莉奈|