⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stage1_solution.mdl

📁 用MATLAB 里的XILINX BLOCKS编写, 实现Fibonacci sequence算法, 当F为0时, 输出为0 F为1时, 输出为1 当F为N 时, 输出为F的N-1 加上 F的N-2.
💻 MDL
📖 第 1 页 / 共 5 页
字号:
      use_carryout	      off
      en		      off
      latency		      "0"
      precision		      "User Defined"
      arith_type	      "Unsigned"
      n_bits		      "W"
      bin_pt		      "0"
      quantization	      "Truncate"
      overflow		      "Wrap"
      dbl_ovrd		      off
      use_behavioral_HDL      off
      pipelined		      off
      use_rpm		      on
      xl_use_area	      off
      xl_area		      "[4 0 0 8 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "addsub"
      block_version	      "8.2.02"
      sg_icon_stat	      "45,62,2,1,white,blue,0,84d1e665"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 45 45 0 ],[0 0 62 62 ],[0.77 0.82 0.91]);\npatch([10 3 14 3 10 22 25 2"
"8 41 31 21 14 25 14 21 31 41 28 25 22 10 ],[13 20 31 42 49 49 46 49 49 39 49 "
"42 31 20 13 23 13 13 16 13 13 ],[0.98 0.96 0.92]);\nplot([0 0 45 45 0 ],[0 62"
" 62 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: "
"begin icon text');\ncolor('black');port_label('input',1,'a');\ncolor('black')"
";port_label('input',2,'b');\ncolor('black');port_label('output',1,'\\bf{a + b"
"}','texmode','on');\nfprintf('','COMMENT: end icon text');\n"
      Port {
	PortNumber		1
	Name			"F(n+1)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Counter"
      Ports		      [2, 1]
      Position		      [330, 317, 375, 388]
      SourceBlock	      "xbsIndex_r4/Counter"
      SourceType	      "Xilinx Counter Block"
      infoedit		      "Hardware notes: Free running counters are the l"
"east expensive in hardware.  A count limited counter is implemented by combin"
"ing a counter with a comparator."
      cnt_type		      "Free Running"
      cnt_to		      "Inf"
      operation		      "Up"
      start_count	      "0"
      cnt_by_val	      "1"
      arith_type	      "Unsigned"
      n_bits		      "W"
      bin_pt		      "0"
      load_pin		      off
      rst		      on
      en		      on
      explicit_period	      "off"
      period		      "1"
      dbl_ovrd		      off
      use_behavioral_HDL      off
      use_rpm		      off
      xl_use_area	      off
      xl_area		      "[5 8 0 8 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "20,20,356,630"
      block_type	      "counter"
      block_version	      "8.2.02"
      sg_icon_stat	      "45,71,2,1,white,blue,0,eceade92"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 45 45 0 ],[0 0 71 71 ],[0.77 0.82 0.91]);\npatch([10 3 14 3 10 22 25 2"
"8 41 31 21 14 25 14 21 31 41 28 25 22 10 ],[18 25 36 47 54 54 51 54 54 44 54 "
"47 36 25 18 28 18 18 21 18 18 ],[0.98 0.96 0.92]);\nplot([0 0 45 45 0 ],[0 71"
" 71 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: "
"begin icon text');\ncolor('black');port_label('input',1,'rst');\ncolor('black"
"');port_label('input',2,'en');\ncolor('black');port_label('output',1,'out');"
"\nfprintf('','COMMENT: end icon text');\n"
      Port {
	PortNumber		1
	Name			"i"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Enable_counter"
      Ports		      [2, 1]
      Position		      [255, 388, 285, 437]
      SourceBlock	      "xbsIndex_r4/Register"
      SourceType	      "Xilinx Register Block"
      init		      "0"
      rst		      off
      en		      on
      dbl_ovrd		      off
      xl_use_area	      off
      xl_area		      "[1 1 0 0 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "register"
      block_version	      "8.2.02"
      sg_icon_stat	      "30,49,2,1,white,blue,0,cc3303a0"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 30 30 0 ],[0 0 49 49 ],[0.77 0.82 0.91]);\npatch([7 2 9 2 7 15 17 19 2"
"7 20 14 9 15 9 14 20 27 19 17 15 7 ],[13 18 25 32 37 37 35 37 37 30 36 31 25 "
"19 14 20 13 13 15 13 13 ],[0.98 0.96 0.92]);\nplot([0 0 30 30 0 ],[0 49 49 0 "
"0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: begin "
"icon text');\ncolor('black');port_label('input',1,'d');\ncolor('black');port_"
"label('input',2,'en');\ncolor('black');port_label('output',1,'q');\ncolor('bl"
"ack');disp('\\bf{z^{-1}}','texmode','on');\nfprintf('','COMMENT: end icon tex"
"t');\n"
      Port {
	PortNumber		1
	Name			"en"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "F"
      Ports		      [1, 1]
      Position		      [850, 245, 895, 265]
      SourceBlock	      "xbsIndex_r4/Gateway Out"
      SourceType	      "Xilinx Gateway Out Block"
      infoedit		      "Gateway out block.  Converts Xilinx fixed point"
" inputs into ouputs of type Simulink integer, double, or fixed point.<P><P>Ha"
"rdware notes:  In hardware these blocks become top level output ports or are "
"discarded, depending on how they are configured."
      hdl_port		      on
      timing_constraint	      "None"
      locs_specified	      off
      LOCs		      "{'F9'}"
      xl_use_area	      off
      xl_area		      "[0 0 0 0 8 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "20,20,356,330"
      block_type	      "gatewayout"
      block_version	      "8.2.02"
      sg_icon_stat	      "45,20,1,1,white,yellow,0,f0cec300"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 45 45 0 ],[0 0 20 20 ],[0.95 0.93 0.65]);\npatch([17 14 19 14 17 22 23"
" 24 30 26 22 19 24 19 22 26 30 24 23 22 17 ],[2 5 10 15 18 18 17 18 18 14 18 "
"15 10 5 2 6 2 2 3 2 2 ],[0.98 0.96 0.92]);\nplot([0 0 45 45 0 ],[0 20 20 0 0 "
"]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: begin ic"
"on text');\ncolor('black');port_label('input',1,' ');\ncolor('black');port_la"
"bel('output',1,'\\fontsize{11pt}\\bf Out ','texmode','on');\nfprintf('','COMM"
"ENT: end icon text');\n"
      Port {
	PortNumber		1
	Name			"F"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace1"
      Position		      [15, 168, 70, 192]
      VariableName	      "n"
      SampleTime	      "Ts"
      Interpolate	      off
      OutputAfterFinalValue   "Holding final value"
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace2"
      Position		      [15, 323, 70, 347]
      VariableName	      "start"
      SampleTime	      "Ts"
      Interpolate	      off
      OutputAfterFinalValue   "Holding final value"
    }
    Block {
      BlockType		      Reference
      Name		      "Register_F(n)"
      Ports		      [2, 1]
      Position		      [700, 197, 740, 308]
      NamePlacement	      "alternate"
      SourceBlock	      "xbsIndex_r4/Register"
      SourceType	      "Xilinx Register Block"
      init		      "0"
      rst		      on
      en		      off
      dbl_ovrd		      off
      xl_use_area	      off
      xl_area		      "[4 8 0 0 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "register"
      block_version	      "8.2.02"
      sg_icon_stat	      "40,111,2,1,white,blue,0,b6caf0d3"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 40 40 0 ],[0 0 111 111 ],[0.77 0.82 0.91]);\npatch([10 3 12 3 10 21 24"
" 27 38 29 20 14 24 14 20 29 38 27 24 21 10 ],[40 47 56 65 72 72 69 72 72 63 7"
"2 66 56 46 40 49 40 40 43 40 40 ],[0.98 0.96 0.92]);\nplot([0 0 40 40 0 ],[0 "
"111 111 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMME"
"NT: begin icon text');\ncolor('black');port_label('input',1,'d');\ncolor('bla"
"ck');port_label('input',2,'rst');\ncolor('black');port_label('output',1,'q');"
"\ncolor('black');disp('\\bf{z^{-1}}','texmode','on');\nfprintf('','COMMENT: e"
"nd icon text');\n"
      Port {
	PortNumber		1
	Name			"F(n)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Register_F(n-1)"
      Ports		      [2, 1]
      Position		      [475, 209, 515, 271]
      NamePlacement	      "alternate"
      SourceBlock	      "xbsIndex_r4/Register"
      SourceType	      "Xilinx Register Block"
      init		      "1"
      rst		      on
      en		      off
      dbl_ovrd		      off
      xl_use_area	      off
      xl_area		      "[4 8 0 0 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "register"
      block_version	      "8.2.02"
      sg_icon_stat	      "40,62,2,1,white,blue,0,b6caf0d3"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 40 40 0 ],[0 0 62 62 ],[0.77 0.82 0.91]);\npatch([10 3 12 3 10 21 24 2"
"7 38 29 20 14 24 14 20 29 38 27 24 21 10 ],[15 22 31 40 47 47 44 47 47 38 47 "
"41 31 21 15 24 15 15 18 15 15 ],[0.98 0.96 0.92]);\nplot([0 0 40 40 0 ],[0 62"
" 62 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: "
"begin icon text');\ncolor('black');port_label('input',1,'d');\ncolor('black')"
";port_label('input',2,'rst');\ncolor('black');port_label('output',1,'q');\nco"
"lor('black');disp('\\bf{z^{-1}}','texmode','on');\nfprintf('','COMMENT: end i"
"con text');\n"
      Port {
	PortNumber		1
	Name			"F(n-1)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Register_n"
      Ports		      [2, 1]
      Position		      [175, 169, 210, 216]
      SourceBlock	      "xbsIndex_r4/Register"
      SourceType	      "Xilinx Register Block"
      init		      "0"
      rst		      off
      en		      on
      dbl_ovrd		      off
      xl_use_area	      off
      xl_area		      "[4 8 0 0 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "register"
      block_version	      "8.2.02"
      sg_icon_stat	      "35,47,2,1,white,blue,0,cc3303a0"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 35 35 0 ],[0 0 47 47 ],[0.77 0.82 0.91]);\npatch([8 2 10 2 8 17 20 23 "
"33 25 18 13 21 13 18 25 33 23 20 17 8 ],[10 16 24 32 38 38 35 38 38 30 37 32 "
"24 16 11 18 10 10 13 10 10 ],[0.98 0.96 0.92]);\nplot([0 0 35 35 0 ],[0 47 47"
" 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: beg"
"in icon text');\ncolor('black');port_label('input',1,'d');\ncolor('black');po"
"rt_label('input',2,'en');\ncolor('black');port_label('output',1,'q');\ncolor("
"'black');disp('\\bf{z^{-1}}','texmode','on');\nfprintf('','COMMENT: end icon "
"text');\n"
      Port {
	PortNumber		1
	Name			"n_latch"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Relational"
      Ports		      [3, 1]
      Position		      [430, 331, 475, 379]
      SourceBlock	      "xbsIndex_r4/Relational"
      SourceType	      "Xilinx Arithmetic Relational Operator Block"
      mode		      "a=b"
      en		      on
      latency		      "1"
      dbl_ovrd		      off
      xl_use_area	      off
      xl_area		      "[2 1 0 4 0 0 0]"
      has_advanced_control    "0"
      sggui_pos		      "-1,-1,-1,-1"
      block_type	      "relational"
      block_version	      "8.2.02"
      sg_icon_stat	      "45,48,3,1,white,blue,0,146f1240"
      sg_mask_display	      "fprintf('','COMMENT: begin icon graphics');\npa"
"tch([0 45 45 0 ],[0 0 48 48 ],[0.77 0.82 0.91]);\npatch([10 3 14 3 10 22 25 2"
"8 41 31 21 14 25 14 21 31 41 28 25 22 10 ],[6 13 24 35 42 42 39 42 42 32 42 3"
"5 24 13 6 16 6 6 9 6 6 ],[0.98 0.96 0.92]);\nplot([0 0 45 45 0 ],[0 48 48 0 0"
" ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: begin i"
"con text');\ncolor('black');port_label('input',1,'a');\ncolor('black');port_l"
"abel('input',2,'b');\ncolor('black');port_label('input',3,'en');\ncolor('blac"
"k');disp('\\newline\\bf{a=b}\\newlinez^{-1}','texmode','on');\nfprintf('','CO"
"MMENT: end icon text');\n"
      Port {
	PortNumber		1
	Name			"done"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Resource Estimator"
      Tag		      "resEstTag"
      Ports		      []
      Position		      [151, 48, 204, 101]
      ShowName		      off
      AttributesFormatString  "Resource\\nEstimator"
      SourceBlock	      "xbsIndex_r4/Resource Estimator"
      SourceType	      "Xilinx Resource Estimator Block"
      Slices		      "29"
      FFs		      "43"
      BRAMs		      "0"
      LUTs		      "20"
      IOBs		      "18"
      EBMs		      "0"
      TBUFs		      "0"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -