mant_ext.vhd
来自「DLX CPU VHDL CODE UNIVERSITY」· VHDL 代码 · 共 59 行
VHD
59 行
library IEEE;use STD.textio.all;use IEEE.std_logic_1164.all;use work.dp32_types.all;entity mant_ext is generic(width: positive); port(a :in bit_vector(width-1 downto 0); y: out bit_vector(width-1 downto 0));end mant_ext;architecture behaviour of mant_ext isbeginmain : process(a)begin --wait for 1 ns; y<=a; y(width-1)<='1';end process;end behaviour;entity mant_cut is generic(width: positive); port(a :in bit_vector(width-1 downto 0); y: out bit_vector(width-5 downto 0));end mant_cut;architecture behaviour of mant_cut isbeginmain : process (a)begin--wait for 1 ns;y<=a(width-2 downto 3);end process;end behaviour;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?