📄 v2_6.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
package arith is
function max(L, R: std_logic_vector) return std_logic_vector;
end arith;
library ieee;
use ieee.std_logic_signed.all;
package body arith is
function max(L, R: std_logic_vector) return std_logic_vector is
begin
if L > R then
return L;
else
return R;
end if;
end function;
end arith;
library ieee;
use ieee.std_logic_1164.all;
use work.arith.all;
entity V2_6 is
port(a : in std_logic_vector(7 downto 0);
b : in std_logic_vector(7 downto 0);
o : out std_logic_vector(7 downto 0));
end V2_6;
architecture a of V2_6 is
begin
o <= max(a,b);
end a;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -