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

📄 stage3_library.mdl

📁 用MATLAB里的XILINX BLOCKS编写, 做嵌入式用的2个BLOCKS, 一个为除法BLOCK, 另一个为乘方BLOCK.
💻 MDL
📖 第 1 页 / 共 5 页
字号:
"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');disp('\\newline\\bf{a>b}\\newlinez^{-1}"
"','texmode','on');\nfprintf('','COMMENT: end icon text');\n"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Rise_Edge"
	  Ports			  [1, 1]
	  Position		  [570, 451, 600, 479]
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskHideContents	  off
	  System {
	    Name		    "Rise_Edge"
	    Location		    [86, 110, 1112, 780]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "in"
	      Position		      [25, 38, 55, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Delay3"
	      Ports		      [1, 1]
	      Position		      [80, 64, 115, 96]
	      SourceBlock	      "xbsIndex_r4/Delay"
	      SourceType	      "Xilinx Delay Block"
	      infoedit		      "Hardware notes: A delay line is a chain"
", each link of which is an SRL16 followed by a flip-flop. If register retimin"
"g is enabled, the delay line is a chain of flip-flops."
	      en		      off
	      latency		      "1"
	      dbl_ovrd		      off
	      reg_retiming	      off
	      xl_use_area	      off
	      xl_area		      "[1 1 0 0 0 0 0]"
	      has_advanced_control    "0"
	      sggui_pos		      "20,20,356,256"
	      block_type	      "delay"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "35,32,1,1,white,blue,0,fc531c0e"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 35 35 0 ],[0 0 32 32 ],[0.77 0.82 0.91]);\npatch([9 4 11 4 9 1"
"7 19 21 30 23 16 11 18 11 16 23 30 21 19 17 9 ],[3 8 15 22 27 27 25 27 27 20 "
"27 22 15 8 3 10 3 3 5 3 3 ],[0.98 0.96 0.92]);\nplot([0 0 35 35 0 ],[0 32 32 "
"0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: begi"
"n icon text');\ncolor('black');disp('z^{-1}','texmode','on');\nfprintf('','CO"
"MMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Expression1"
	      Ports		      [2, 1]
	      Position		      [135, 29, 200, 96]
	      SourceBlock	      "xbsIndex_r4/Expression"
	      SourceType	      "Xilinx Bitwise Expression Evaluator Blo"
"ck"
	      expression	      "a & ~b"
	      align_bp		      on
	      en		      off
	      latency		      "0"
	      precision		      "Full"
	      arith_type	      "Unsigned"
	      n_bits		      "16"
	      bin_pt		      "0"
	      dbl_ovrd		      off
	      xl_use_area	      off
	      xl_area		      "[1 1 0 1 0 0 0]"
	      has_advanced_control    "0"
	      sggui_pos		      "-1,-1,-1,-1"
	      block_type	      "expr"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "65,67,2,1,white,blue,0,b5afc95f"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 65 65 0 ],[0 0 67 67 ],[0.77 0.82 0.91]);\npatch([15 4 19 4 15"
" 32 37 42 60 45 31 21 36 21 31 45 60 42 37 32 15 ],[8 19 34 49 60 60 55 60 60"
" 45 59 49 34 19 9 23 8 8 13 8 8 ],[0.98 0.96 0.92]);\nplot([0 0 65 65 0 ],[0 "
"67 67 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');disp('a & ~b');\nfprintf('','CO"
"MMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "out"
	      Position		      [225, 58, 255, 72]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "Delay3"
	      SrcPort		      1
	      DstBlock		      "Expression1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "in"
	      SrcPort		      1
	      Points		      [0, 0; 5, 0]
	      Branch {
		DstBlock		"Expression1"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Delay3"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Expression1"
	      SrcPort		      1
	      DstBlock		      "out"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Shift_With_Carry"
	  Ports			  [2, 2]
	  Position		  [315, 76, 385, 129]
	  AncestorBlock		  "answer_lib/Divide/ShiftWithCarry"
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskHideContents	  off
	  Port {
	    PortNumber		    1
	    Name		    "N_out"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    2
	    Name		    "R_out"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  System {
	    Name		    "Shift_With_Carry"
	    Location		    [394, 116, 1230, 773]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "N_in"
	      Position		      [140, 258, 170, 272]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "R_in"
	      Position		      [140, 83, 170, 97]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Con1"
	      Ports		      [0, 1]
	      Position		      [255, 327, 310, 353]
	      SourceBlock	      "xbsIndex_r4/Constant"
	      SourceType	      "Xilinx Constant Block Block"
	      arith_type	      "Unsigned"
	      const		      "0"
	      n_bits		      "1"
	      bin_pt		      "0"
	      explicit_period	      off
	      period		      "1"
	      dsp48_infoedit	      "The use of this block for DSP48 instruc"
"tions is deprecated.  Please use the Opmode block."
	      equ		      "P=C"
	      opselect		      "C"
	      inp2		      "PCIN>>17"
	      opr		      "+"
	      inp1		      "P"
	      carry		      "CIN"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "-1,-1,-1,-1"
	      block_type	      "constant"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "55,26,0,1,white,blue,0,c7c04a0c"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 55 55 0 ],[0 0 26 26 ],[0.77 0.82 0.91]);\npatch([20 16 22 16 "
"20 27 29 31 38 32 26 22 28 22 26 32 38 31 29 27 20 ],[3 7 13 19 23 23 21 23 2"
"3 17 23 19 13 7 3 9 3 3 5 3 3 ],[0.98 0.96 0.92]);\nplot([0 0 55 55 0 ],[0 26"
" 26 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT: "
"begin icon text');\ncolor('black');port_label('output',1,'0');\nfprintf('','C"
"OMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Concat"
	      Ports		      [2, 1]
	      Position		      [355, 75, 415, 135]
	      SourceBlock	      "xbsIndex_r4/Concat"
	      SourceType	      "Xilinx Bus Concatenator Block"
	      infoedit		      "Concatenates two or more inputs.  Outpu"
"t will be cast to an unsigned value with the binary point at zero."
	      num_inputs	      "2"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "-1,-1,-1,-1"
	      block_type	      "concat"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "60,60,2,1,white,blue,0,59d62d82"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 60 60 0 ],[0 0 60 60 ],[0.77 0.82 0.91]);\npatch([14 4 18 4 14"
" 30 34 38 55 42 29 20 35 20 29 42 55 38 34 30 14 ],[6 16 30 44 54 54 50 54 54"
" 41 54 45 30 15 6 19 6 6 10 6 6 ],[0.98 0.96 0.92]);\nplot([0 0 60 60 0 ],[0 "
"60 60 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT"
": begin icon text');\ncolor('black');port_label('input',1,'hi');\ncolor('blac"
"k');port_label('input',2,'lo');\nfprintf('','COMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Concat1"
	      Ports		      [2, 1]
	      Position		      [355, 265, 415, 325]
	      SourceBlock	      "xbsIndex_r4/Concat"
	      SourceType	      "Xilinx Bus Concatenator Block"
	      infoedit		      "Concatenates two or more inputs.  Outpu"
"t will be cast to an unsigned value with the binary point at zero."
	      num_inputs	      "2"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "-1,-1,-1,-1"
	      block_type	      "concat"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "60,60,2,1,white,blue,0,59d62d82"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 60 60 0 ],[0 0 60 60 ],[0.77 0.82 0.91]);\npatch([14 4 18 4 14"
" 30 34 38 55 42 29 20 35 20 29 42 55 38 34 30 14 ],[6 16 30 44 54 54 50 54 54"
" 41 54 45 30 15 6 19 6 6 10 6 6 ],[0.98 0.96 0.92]);\nplot([0 0 60 60 0 ],[0 "
"60 60 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT"
": begin icon text');\ncolor('black');port_label('input',1,'hi');\ncolor('blac"
"k');port_label('input',2,'lo');\nfprintf('','COMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Slice"
	      Ports		      [1, 1]
	      Position		      [250, 265, 310, 295]
	      SourceBlock	      "xbsIndex_r4/Slice"
	      SourceType	      "Xilinx Bit Slice Extractor Block"
	      infoedit		      "Extracts a given range of bits from eac"
"h input sample and presents it at the output.  The output type is ordinarily "
"unsigned with binary point at zero, but can be Boolean when the slice is one "
"bit wide.<P><P>Hardware notes: In hardware this block costs nothing."
	      nbits		      "W-1"
	      boolean_output	      off
	      mode		      "Lower Bit Location + Width"
	      bit1		      "0"
	      base1		      "MSB of Input"
	      bit0		      "0"
	      base0		      "LSB of Input"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "20,20,449,398"
	      block_type	      "slice"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "60,30,1,1,white,blue,0,fe24a11e"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 60 60 0 ],[0 0 30 30 ],[0.77 0.82 0.91]);\npatch([22 17 24 17 "
"22 30 32 34 42 35 29 24 30 24 29 35 42 34 32 30 22 ],[3 8 15 22 27 27 25 27 2"
"7 20 26 21 15 9 4 10 3 3 5 3 3 ],[0.98 0.96 0.92]);\nplot([0 0 60 60 0 ],[0 3"
"0 30 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT:"
" begin icon text');\ncolor('black');port_label('output',1,'[a:b]');\nfprintf("
"'','COMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Slice1"
	      Ports		      [1, 1]
	      Position		      [250, 210, 310, 240]
	      SourceBlock	      "xbsIndex_r4/Slice"
	      SourceType	      "Xilinx Bit Slice Extractor Block"
	      infoedit		      "Extracts a given range of bits from eac"
"h input sample and presents it at the output.  The output type is ordinarily "
"unsigned with binary point at zero, but can be Boolean when the slice is one "
"bit wide.<P><P>Hardware notes: In hardware this block costs nothing."
	      nbits		      "1"
	      boolean_output	      off
	      mode		      "Upper Bit Location + Width"
	      bit1		      "0"
	      base1		      "MSB of Input"
	      bit0		      "0"
	      base0		      "LSB of Input"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "20,20,449,398"
	      block_type	      "slice"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "60,30,1,1,white,blue,0,fe24a11e"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 60 60 0 ],[0 0 30 30 ],[0.77 0.82 0.91]);\npatch([22 17 24 17 "
"22 30 32 34 42 35 29 24 30 24 29 35 42 34 32 30 22 ],[3 8 15 22 27 27 25 27 2"
"7 20 26 21 15 9 4 10 3 3 5 3 3 ],[0.98 0.96 0.92]);\nplot([0 0 60 60 0 ],[0 3"
"0 30 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT:"
" begin icon text');\ncolor('black');port_label('output',1,'[a:b]');\nfprintf("
"'','COMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Slice2"
	      Ports		      [1, 1]
	      Position		      [250, 75, 310, 105]
	      SourceBlock	      "xbsIndex_r4/Slice"
	      SourceType	      "Xilinx Bit Slice Extractor Block"
	      infoedit		      "Extracts a given range of bits from eac"
"h input sample and presents it at the output.  The output type is ordinarily "
"unsigned with binary point at zero, but can be Boolean when the slice is one "
"bit wide.<P><P>Hardware notes: In hardware this block costs nothing."
	      nbits		      "W-1"
	      boolean_output	      off
	      mode		      "Lower Bit Location + Width"
	      bit1		      "0"
	      base1		      "MSB of Input"
	      bit0		      "0"
	      base0		      "LSB of Input"
	      dbl_ovrd		      off
	      has_advanced_control    "0"
	      sggui_pos		      "20,20,449,398"
	      block_type	      "slice"
	      block_version	      "8.2.02"
	      sg_icon_stat	      "60,30,1,1,white,blue,0,fe24a11e"
	      sg_mask_display	      "fprintf('','COMMENT: begin icon graphic"
"s');\npatch([0 60 60 0 ],[0 0 30 30 ],[0.77 0.82 0.91]);\npatch([22 17 24 17 "
"22 30 32 34 42 35 29 24 30 24 29 35 42 34 32 30 22 ],[3 8 15 22 27 27 25 27 2"
"7 20 26 21 15 9 4 10 3 3 5 3 3 ],[0.98 0.96 0.92]);\nplot([0 0 60 60 0 ],[0 3"
"0 30 0 0 ]);\nfprintf('','COMMENT: end icon graphics');\nfprintf('','COMMENT:"
" begin icon text');\ncolor('black');port_label('output',1,'[a:b]');\nfprintf("
"'','COMMENT: end icon text');\n"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "N_out"
	      Position		      [490, 288, 520, 302]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "R_out"
	      Position		      [495, 98, 525, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "N_in"
	      SrcPort		      1
	      Points		      [0, 0; 40, 0]
	      Branch {
		Points			[0, 15]
		DstBlock		"Slice"
		DstPort			1
	      }
	      Branch {
		Points			[0, -40]
		DstBlock		"Slice1"
		DstPort			1
	      }
	    }

⌨️ 快捷键说明

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