lfsr.vhd
来自「source code of counter,ram,lfsr etc」· VHDL 代码 · 共 20 行
VHD
20 行
library IEEE;use IEEE.STD_LOGIC_1164.all;entity lfsr_10 isgeneric (initval:std_logic_vector (9 downto 0) := "0000000001");port ( clk: in std_logic;randout: buffer std_logic_vector(9 downto 0) := initval);end lfsr_10;architecture dataflow of lfsr_10 issignal din: std_logic_vector (9 downto 0);begin process(clk) beginif(clk'event AND clk='1') thendin <= randout;end if; din(0) <= randout(9) XOR randout(0);randout<= din(8 downto 0)& din(0);end process;end dataflow;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?