📄 leftshift.vhd
字号:
use work.dp32_types.all;entity leftshift is generic(width : positive); port(d : in bit_vector(width-1 downto 0); y : out bit_vector(width-1 downto 0)); end leftshift;architecture behaviour of leftshift isbeginy(width-1 downto 1)<=d(width-2 downto 0);y(0)<='0';end behaviour;-- keeps bit 0 (sticky) the sameentity sticky_leftshift is generic(width : positive); port(d : in bit_vector(width-1 downto 0); y : out bit_vector(width-1 downto 0)); end sticky_leftshift;architecture behaviour of sticky_leftshift isbeginy(width-1 downto 2)<=d(width-2 downto 1);y(0)<=d(1);y(1)<='0';end behaviour;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -