EDA技术实用教程 第10章 设计优化和设计方法
第10章 设计优化和设计方法 EDA技术实用教程
2器时 10.1面积优化 10.1.1资源共享 AO B 0 Result Al 乘法器0 选择器 B 乘法器1 图10-1先乘后选择的设计方法RTL结构
康芯科技 10.1 面积优化 10.1.1 资源共享 乘法器0 × 乘法器1 × 选择器 0 1 Result Sel A0 B A1 B 图10-1先乘后选择的设计方法RTL结构
【例10-1】 2器时 LIBRARY ieee USE ieee std logic 1164 al: USE ieee std logic unsigned. all; USE ieee std logic arith. all ENTITY multmux Is PORT(AO, Al, B: IN std logic_ vector(3 downto 0); sel:in std logic Result OUT std logic vector(7 downto 0)); END multmux ARCHITECTURE rtl OF multmux IS BEGIN process(AO, Al, B, sel) begin if(sel =0)then Result <=A0* B else Result<=Al B: 图10-1先乘后选择的设计方法RTL结构 end if: end process; END rtl;
【例 康芯科技 10-1】 LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; USE ieee.std_logic_arith.all; ENTITYmultmux IS PORT (A0, A1,B :IN std_logic_vector(3 downto 0); sel : IN std_logic; Result : OUT std_logic_vector(7 downto 0)); END multmux; ARCHITECTURE rtl OF multmux IS BEGIN process(A0,A1,B,sel) begin if(sel = '0') then Result <= A0 * B; else Result <= A1 * B; 图10-1 先乘后选择的设计方法RTL结构 end if; end process; END rtl;
2器时 10.1面积优化 10.1.1资源共享 e A0 O Result 选择器 乘法器 图10-2先选择后乘设计方法RTL结构
康芯科技 10.1 面积优化 10.1.1 资源共享 图10-2先选择后乘设计方法RTL结构 选择器 0 1 乘法器 × A0 Sel A1 Result
2器时 10.1面积优化 10.1.1资源共享 【例10-2】 ARCHITECTURE rtl of muxmult Is signal temp: std logic vector(3 downto 0); BEGIN process(Ao, Al, B, sel) eg f(sel=0 )then temp<=A0; else temp<=Al; end if: result <=temp *B; nd process; END rtI:
康芯科技 10.1 面积优化 10.1.1 资源共享 【例10-2】 ARCHITECTURErtl OF muxmult IS signal temp : std_logic_vector(3 downto 0); BEGIN process(A0,A1,B,sel) begin if(sel = '0') then temp <= A0; else temp <= A1; end if; result <= temp * B; end process; END rtl;