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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? generate_ddr_sim_model.pl

?? 基于NIOS II的ddr2控制器,配有詳細的文檔,經驗證后可使用.
?? PL
?? 第 1 頁 / 共 5 頁
字號:
#Copyright (C)1991-2002 Altera Corporation
#Any megafunction design, and related net list (encrypted or decrypted),
#support information, device programming or simulation file, and any other
#associated documentation or information provided by Altera or a partner
#under Altera's Megafunction Partnership Program may be used only to
#program PLD devices (but not masked PLD devices) from Altera.  Any other
#use of such megafunction design, net list, support information, device
#programming or simulation file, or any other related documentation or
#information is prohibited for any other purpose, including, but not
#limited to modification, reverse engineering, de-compiling, or use with
#any other silicon devices, unless such use is explicitly licensed under
#a separate agreement with Altera or a megafunction partner.  Title to
#the intellectual property, including patents, copyrights, trademarks,
#trade secrets, or maskworks, embodied in any such megafunction design,
#net list, support information, device programming or simulation file, or
#any other related documentation or information provided by Altera or a
#megafunction partner, remains with Altera, the megafunction partner, or
#their respective licensors.  No other licenses, including any licenses
#needed under any third party's intellectual property, are provided herein.
#Copying or modifying any file, or portion thereof, to which this notice
#is attached violates this copyright.

use europa_all;
use strict;

# This model tries to leverage as many functions and GUI similarities as
# possible from Aaron Ferrucci's sdram_controller.pm.  The actual
# generated code and pin interface is quite different, but all the
# parameters and restrictions of generic SDRAM still apply...

### NB: &one_hot_encoding now in europa_utils.pm!
### NB: str2hex routine now in europa_utils.pm!

sub convert_times
{
    my ($WSA, $time_values) = @_;
    
    my $sys_clk = $WSA->{system_clock_rate};
    
    for my $k (keys %{$time_values})
    {
        $WSA->{$k} .= $time_values->{$k};
        convert_time_unit(\$WSA->{$k}, $sys_clk);
    }
} # &convert_times

# Convert stuff like
# 
# 15.625us
# 100us
# 70ns
# 120us
# 20ns
# 2clocks
# 20ns
# 17ns
# 1clock+7ns
#
# into CLOCKS (rounded up), and return in the input value.
sub convert_time_unit
{
    my ($valRef, $system_clock_rate) = @_;
    
    my $result = $$valRef;
    
    my $system_clock_period = 1 / $system_clock_rate;
    
    $result =~ s/ms/*(1e-3)/g;
    $result =~ s/us/*(1e-6)/g;
    $result =~ s/ns/*(1e-9)/g;
    $result =~ s/clock[s]?/*($system_clock_period)/g;
    
    # create result in seconds:
    $result = eval($result);  
    # convert result from seconds into clocks:
    $result = ceil ($result * $system_clock_rate);

    # print "em_sdram.pm/convert_time_unit:\t$$valRef\t=\t$result clocks\n";

    if ($@)
    {
        ribbit("failed to eval '$$valRef' in convert_time_unit(): '$@'");
    }
    
    $$valRef = $result;
} # & convert_time_unit

sub get_time_values
{
  # This table gives the units that apply to each WSA parameter.
  return (
    refresh_period        => "us",
    powerup_delay         => "us",
    t_rfc                 => "ns",
    t_mrd                 => "clocks",
    t_rp                  => "ns",
    t_rcd                 => "ns",
    t_ac                  => "ns",
    t_wr                  => "ns",
    init_nop_delay        => "us",
  );
} # &get_time_values

# replicate_bit(width, value)
#
# e.g.
# replicate(4, 0) returns "4'b0000'".
sub replicate_bit
{
  # width has to be only decimal digits, and non-zero.
  my $width = shift
      or ribbit("Usage error: no width! ".
                "(expected 'replicate_bit(width, value)')\n");
  $width =~ /^\d+$/ or die "Unexpected width: '$width'\n";
  
  # value must be 0 or 1.
  my $value = shift;
  ribbit("Usage error: bad value '$value'!\n")
    if $value !~ /^[01]$/;

  ribbit("Usage error: too many parameters! ".
         "(expected 'replicate_bit(width, value)')\n") if @_;
  
  $value =~ /^\d+$/ or die "Unexpected value: '$value'\n";
  
  return $width . "'b" . ($value x $width);
} # &replicate_bit





# Main DDR simulation model.
sub make_ddr_sim_model 
{
    # No arguments means "Ignore -- I'm being called from make".
    if (!@_)
    {
        # print "\n\tmake_sdram_controller now uses a static".
        # " external 'class.ptf'!\n\n";
        return 0; # make_class_ptf();
    }
    
    # TEW: Get SDRAM's project, Options, etc:
    my $project = e_project->new(@_);
    my %Options = %{$project->WSA()};
    my $WSA = \%Options;
    
    # Grab the module that was created during handle_args.
    my $module = $project->top();

    # Grab some args to determine how to proceed, like model_base and init_file
    $WSA->{is_blank}=($WSA->{sim_Kind} =~ /^blank/i) ? "1" : "0";
    $WSA->{is_file} =($WSA->{sim_Kind} =~ /^textfile/i) ? "1" : "0";
    
    my $textfile = $WSA->{sim_Textfile_Info};
  
    #turn bar/foo.srec relative path into an absolute one if needed
    my $system_directory = $project->_system_directory();
    $textfile =~ s/^(\w+)(\\|\/)/$system_directory$2$1$2/;
    #turn foo.srec to absolute path
    $textfile =~ s/^(\w+)$/$system_directory\/$1/;
    
    $WSA->{textfile}= $textfile;

    # Figure out where our contents are coming from:
    $WSA->{Initfile} = $project->_target_module_name() . "_contents.srec";
    
    my $do_generation = $project->system_ptf()->{WIZARD_SCRIPT_ARGUMENTS}{do_build_sim};
    
    # Only generate model if "Simulation. Create simulator..." is ticked.
    if ($do_generation == 1) {
        print "# Creating memory simulation model for use with ".$project->_target_module_name()."\n";
        
        # We only accept .mif- and .srec-files (or just blankness)
        &ribbit ("Memory-initialization files must be either .mif or .srec.\n",
                 " not '$WSA->{Initfile}'\n")
            unless $WSA->{Initfile} =~ /\.(srec|mif)$/i;
        
    
        
        
        # Figure out what language we're generating for
        my $lang = $project->system_ptf()->{WIZARD_SCRIPT_ARGUMENTS}{hdl_language};
        my $extension;
        my $sim_file = $project->get_top_module_name();
        my $sim_dat  = $project->_target_module_name() . ".dat";
        if ($lang =~ /vhd/i    ) { 
            $sim_file .= ".vhd";
            $extension = ".vhd";
        }
        if ($lang =~ /verilog/i) { 
            $sim_file .= ".v";
            $extension = ".v";
        }
        my @write_lines;
    
    
    
        # Add datapath and other files to simulation list        
        my $sopc_device_family = lc($project->system_ptf()->{WIZARD_SCRIPT_ARGUMENTS}{device_family_id});
        my $device_family = lc($WSA->{MEGACORE}{NETLIST_SECTION}{STATIC_SECTION}{PRIVATES}{NAMESPACE}{parameterization}{PRIVATE}{family}{value});
        
        #if ($sopc_device_family ne $device_family) { print "WARNING! The device selected in SOPC Builder (".$sopc_device_family.") does match the DDR SDRAM device (".$device_family.")\n";}
    
        #print "SOPC Builder device family is ".$sopc_device_family."\n";
        #print "DDR Megacore device family is ".$device_family."\n";
            
        
        my $wrapper_name = $project->_target_module_name();
        my $quartus_directory = $project->get_quartus_rootdir();
    
        #print "Quartus came from ".$quartus_directory." and device family is $device_family\n";
        #print "Wrapper file name is ".$wrapper_name.$extension."\n";
        
        
        
        #print "\nOriginal files list = ".$project->module_ptf()->{HDL_INFO}{Simulation_HDL_Files}."\n";
        
        my $magic_proj_dir = "__PROJECT_DIRECTORY__/";
        my $datapath_files = "";
    
       # SOPC Builder treats Stratix II & Stratix II GX as different families but we don't...
       if ($sopc_device_family eq "stratixiigx") {
           $sopc_device_family = "stratixii";   
       }
       # SOPC Builder now treats Stratix & Stratix GX as different families (it didn't used to!) but we don't...
       if ($sopc_device_family eq "stratixgx") {
           $sopc_device_family = "stratix";   
       }
        
       # Simulation libraries required 
       $project->module_ptf()->{HDL_INFO}{Simulation_Library_Names} = "auk_ddr_user_lib,";
       #$project->module_ptf()->{HDL_INFO}{Simulation_Library_Names} .= "UNUSED";
       $project->module_ptf()->{HDL_INFO}{Simulation_Library_Names} .= "$sopc_device_family";
    
       if ($sopc_device_family eq "cycloneii") 
       { 
           $datapath_files .= $quartus_directory."/eda/sim_lib/cycloneii_atoms".$extension.",";  
           if ($lang =~ /vhd/i) {$datapath_files .= $quartus_directory."/eda/sim_lib/cycloneii_components.vhd,"; } 
       }
       if ($sopc_device_family eq "cyclone") 
       { 
           $datapath_files .= $quartus_directory."/eda/sim_lib/cyclone_atoms".$extension.",";  
           if ($lang =~ /vhd/i) {$datapath_files .= $quartus_directory."/eda/sim_lib/cyclone_components.vhd,"; } 
       }
       # SOPC Builder treats StratixII & StratixII GX as different so we have made the names the same for now  
       if ($sopc_device_family eq "stratixii") 
       { 
           $datapath_files .= $quartus_directory."/eda/sim_lib/stratixii_atoms".$extension.",";  
           if ($lang =~ /vhd/i) {$datapath_files .= $quartus_directory."/eda/sim_lib/stratixii_components.vhd,"; } 
       }
       # SOPC Builder treats StratixII & StratixII GX as different so we have made the names the same for now  
       if ($sopc_device_family eq "stratix")  
       { 
           $datapath_files .= $quartus_directory."/eda/sim_lib/stratix_atoms".$extension.",";  
           if ($lang =~ /vhd/i) {$datapath_files .= $quartus_directory."/eda/sim_lib/stratix_components.vhd,"; } 
       }
    
       # Now add the files needed for the datapath itself   
       $datapath_files .= $magic_proj_dir.$wrapper_name."_auk_ddr_dqs_group".$extension.",";
       $datapath_files .= $magic_proj_dir.$wrapper_name."_auk_ddr_clk_gen".$extension.",";
       $datapath_files .= $magic_proj_dir.$wrapper_name."_auk_ddr_datapath".$extension.",";
       if ($lang =~ /vhd/i) {$datapath_files .= $magic_proj_dir.$wrapper_name."_auk_ddr_datapath_pack.vhd,";}
       
       $project->module_ptf()->{HDL_INFO}{Simulation_HDL_Files} = $datapath_files.$project->module_ptf()->{HDL_INFO}{Simulation_HDL_Files};
        
        
        
        #print "Updated files list = ".$project->module_ptf()->{HDL_INFO}{Simulation_HDL_Files}."\n";
        #print "Create libraries called = ".$project->module_ptf()->{HDL_INFO}{Simulation_Library_Names}."\n";
        
        
        #--------------------------------------------------------
        # Create a shortcut to the right bit of the DDR's PTF
        my %myshortcut =  %{$WSA->{MEGACORE}{NETLIST_SECTION}{STATIC_SECTION}{PRIVATES}{NAMESPACE}{parameterization}};
        my $wizard_shortcut = \%myshortcut;
        #--------------------------------------------------------
    
        
        # Work out whether this should be DDR1 or DDR2
        my $memtype =  $wizard_shortcut->{PRIVATE}{gMEM_TYPE}{value};
        #print "This is a ".$memtype." controller\n";
    
        my $mem_pretty_name = "DDR SDRAM";
        if ($memtype eq "ddr2_sdram") {$mem_pretty_name = "DDR2 SDRAM";}
        
        my $default_pin_prefix = "ddr_";
        if ($memtype eq "ddr2_sdram") {$default_pin_prefix = "ddr2_";}
    
        my $local_burst_length =  $wizard_shortcut->{PRIVATE}{local_burst_length}{value};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷久久久久swag精品| 久久亚洲免费视频| 91.xcao| 日韩欧美综合一区| 有码一区二区三区| 黄网站免费久久| 欧美私模裸体表演在线观看| 精品sm在线观看| 亚洲高清免费观看高清完整版在线观看 | 国内成人精品2018免费看| 成人av资源网站| 日韩欧美一二三| 亚洲视频一区二区在线| 国产一区二区三区黄视频 | 色综合天天做天天爱| 精品捆绑美女sm三区| 亚洲成人av电影在线| av一二三不卡影片| 26uuu色噜噜精品一区二区| 午夜影院久久久| 色综合网色综合| 亚洲欧洲日韩一区二区三区| 精品无码三级在线观看视频| 91精品国产乱| 三级不卡在线观看| 欧美日韩一区二区三区不卡| 亚洲日本va午夜在线影院| 岛国精品在线观看| 久久这里只有精品视频网| 爽好久久久欧美精品| 欧美亚洲一区三区| 一区二区三区四区高清精品免费观看| 成人免费视频网站在线观看| 久久色视频免费观看| 国产一区激情在线| 久久一二三国产| 国产一区二区免费视频| 精品久久久久久无| 精品制服美女丁香| 久久精品男人天堂av| 国产一区二区三区免费看| 精品国产髙清在线看国产毛片| 日韩av一区二区在线影视| 91精品国产一区二区三区香蕉| 亚洲高清不卡在线观看| 69堂国产成人免费视频| 久久99久久99小草精品免视看| 日韩一级视频免费观看在线| 久久99精品网久久| 中文字幕免费不卡| 日本久久一区二区三区| 石原莉奈在线亚洲二区| 91精品国产综合久久久蜜臀图片| 免费黄网站欧美| 精品福利av导航| 成人免费观看视频| 亚洲综合一区在线| 精品女同一区二区| 成年人午夜久久久| 亚洲午夜久久久久久久久久久| 911精品国产一区二区在线| 狠狠狠色丁香婷婷综合激情| 欧美高清在线视频| 欧美无砖砖区免费| 精品一区二区三区免费| 自拍偷在线精品自拍偷无码专区| 在线日韩一区二区| 老司机一区二区| 亚洲欧洲日韩在线| 欧美一区二区三区在线看| 高清免费成人av| 亚洲va欧美va天堂v国产综合| 日韩一区二区免费在线电影| 成人国产精品视频| 性做久久久久久免费观看欧美| 欧美一区二区啪啪| 99久久国产综合精品女不卡| 午夜a成v人精品| 中文字幕第一区第二区| 欧美日韩国产一二三| 高清成人免费视频| 日本午夜精品视频在线观看| 中文字幕一区二区三区视频| 欧美日韩午夜影院| gogogo免费视频观看亚洲一| 蜜桃在线一区二区三区| 亚洲美女在线国产| 国产日本欧美一区二区| 制服丝袜在线91| 色婷婷av一区二区三区之一色屋| 国产一区二区在线免费观看| 亚洲一级二级三级在线免费观看| 久久精品人人做人人综合| 日韩一区二区三| 欧美午夜一区二区三区| av在线不卡免费看| 国产电影一区在线| 裸体一区二区三区| 午夜精品久久久久久久久| 亚洲日本护士毛茸茸| 国产日韩精品视频一区| 日韩欧美久久一区| 欧美美女视频在线观看| 色先锋aa成人| 成人av免费在线观看| 国产一区二区主播在线| 久久精品国产精品亚洲精品| 日韩不卡一区二区| 亚洲va欧美va人人爽| 亚洲午夜久久久久久久久电影网| 中文字幕欧美一区| 中文字幕精品在线不卡| 欧美国产视频在线| 亚洲国产高清不卡| 国产精品成人免费精品自在线观看| 久久婷婷色综合| 国产午夜精品在线观看| 久久综合久久综合亚洲| 久久九九久久九九| 久久久久久久久久电影| 久久伊99综合婷婷久久伊| 精品国产91乱码一区二区三区| 欧美一区二区三区在线看| 日韩精品资源二区在线| 精品国产精品一区二区夜夜嗨| 精品国产乱码久久久久久浪潮| 亚洲精品一区二区三区福利| 久久久噜噜噜久久人人看| 2020国产精品久久精品美国| 国产三级三级三级精品8ⅰ区| 久久精品亚洲精品国产欧美| 国产亚洲成av人在线观看导航| 中文字幕精品一区二区精品绿巨人| 国产精品久久久久久久久免费相片 | 日韩一区二区视频| 精品国免费一区二区三区| 久久久久久久久99精品| 亚洲国产电影在线观看| 亚洲美女视频在线观看| 婷婷中文字幕一区三区| 精品一区二区三区香蕉蜜桃| 国产一区二区三区不卡在线观看| 高清在线不卡av| 在线观看www91| 91麻豆精品91久久久久久清纯 | 美女视频黄 久久| 国产精品一区2区| 99精品一区二区| 欧美浪妇xxxx高跟鞋交| 精品国一区二区三区| 国产三级精品视频| 亚洲大尺度视频在线观看| 久久国产日韩欧美精品| 99久久久国产精品| 91精品国产免费| 国产精品久久久久久久久晋中| 亚洲综合偷拍欧美一区色| 精品一区二区在线视频| 91亚洲午夜精品久久久久久| 欧美一区二区免费观在线| 国产精品久久久久婷婷二区次| 亚洲综合色区另类av| 国产精品中文字幕欧美| 色久优优欧美色久优优| 精品久久久久久久久久久久久久久| 日韩毛片在线免费观看| 麻豆精品久久久| 91麻豆国产在线观看| 久久久久久久电影| 日本aⅴ精品一区二区三区 | 国产三级一区二区| 日韩一区精品视频| av激情成人网| 久久婷婷国产综合精品青草| 亚洲高清在线精品| 99久久精品一区| 久久久三级国产网站| 午夜精品免费在线| 色婷婷久久99综合精品jk白丝| 久久久天堂av| 久久精品理论片| 91精品国产综合久久精品| 亚洲黄色录像片| 99re成人在线| 久久久夜色精品亚洲| 日本在线不卡视频| 欧美精品 日韩| 一区二区三区四区亚洲| 99热在这里有精品免费| 国产午夜久久久久| 国产一区二区三区日韩| 日韩免费成人网| 麻豆91在线观看| 欧美一级搡bbbb搡bbbb| 日本特黄久久久高潮| 欧美日本精品一区二区三区| 亚洲人成精品久久久久久 | 欧美老女人第四色| 亚洲国产美女搞黄色| 色综合天天视频在线观看|