




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Range 2: 1000-17FF = 0001 0XXX XXXX XXXX Range 3: 1800-1FFF = 0001 1XXX XXXX XXXX Range 4: 2000-27FF = 0010 0XXX XXXX XXXX
8
8
8 8
S S (^44)
4 4
8
8
8
8 8
8
8
8 8
8 8
8
8
8 8
8
8
8 8
1
<<<
3
10 18 8
8
!
8 8 8 8
8
8 8
8 8 8
8
|| 32
32 8 8 8 8
8
8 8 8 8 8 8 8 8
6
6
4
4
isprime 4
isprime 4
isprime 4
isprime 4
b3 = (8*a3 6) >> 3 = = (a3 || โ110โ) >> 3 = a k = 0 || k7..1 if k 0 = 0 k = 1 || k7..1 if k 0 = 1 thus, k = k 0 || k7..1 = k >>> 1
Problem 4 library ieee ; use ieee.std_logic_1164.all ; entity misr is generic (C : std_logic_vector(7 downto 0) ); port ( -- inputs clk : in std_logic; rst : in std_logic; en : in std_logic; D : in std_logic_vector (7 downto 0); -- outputs Q_out : out std_logic_vector (7 downto 0) ); end misr; architecture mixed of misr is -- intermediate signals signal Q : std_logic_vector (7 downto 0); signal Q0_replicated : std_logic_vector (7 downto 0); signal d_ff_in : std_logic_vector (7 downto 0); begin Q0_replicated <= (others => Q(0)) ; d_ff_in <= D xor ('0' & Q(7 downto 1) ) xor (C and Q0_replicated ); -- D flip flop operation D_FFs: process ( rst, clk ) begin if ( rst = '1') then Q <= (others => '0') ; elsif rising_edge(clk) then if(en = '1') then Q <= d_ff_in ; end if; end if; end process; Q_out <= Q ; end mixed;