ri.vhdl

来自「source and benchmark test for the regist」· VHDL 代码 · 共 36 行

VHDL
36
字号
library ieee;use ieee.std_logic_1164.all;entity instr_reg isport(CLK :    in std_logic;ce :     in std_logic;rst :    in std_logic;instr :in std_logic_vector(15 downto 0);cond :   out std_logic_vector(3 downto 0);op :     out std_logic_vector(3 downto 0);updt:    out std_logic;imm:     out std_logic;val:     out std_logic_vector(5 downto 0));end instr_reg;architecture BEHAVE of instr_reg issignal tmp : std_logic_vector(15 downto 0);beginprocess(CLK)   beginif rising_edge(CLK)then   if rst = '1' then       tmp <="ZZZZZZZZZZZZZZZZ";   else   if (ce='1') then      --reset=0      tmp<=instr;    end if;-- end de ce   end if;--ende de rst   end if;--end de CLKend process;cond <= tmp(15 downto 12);op <= tmp(11 downto 8);updt <= tmp(7);imm <= tmp(8);val <= tmp(5 downto 0);end BEHAVE;

⌨️ 快捷键说明

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