Reference:
http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
sudo
apt-get update
sudo
apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n
libwxgtk2.8-dev libgtk2.0-dev
restart
raspberry pi
sudo apt-get install samba
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.org
sudo service samba restart
| library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity seq_det is port( clk : in std_logic; reset : in std_logic; enable : in std_logic; seq_in : in std_logic; seq_detected : out std_logic); end seq_det; ---- Pattern 10101100--------- architecture Behavioral of seq_det is type state_type is (IDLE,S1,S2,S3,S4,S5,S6,S7,S8,S9); signal cur_state, nxt_state : state_type; signal seq_det,seq_det_w : std_logic; begin seq_detected <= seq_det; process(clk) begin if( reset = '1' ) then cur_state <= IDLE; seq_det <= '0'; elsif (clk'event and clk = '1') then cur_state <= nxt_state; seq_det <= seq_det_w; end if; end process; Process(cur_state,seq_in,enable) begin case cur_state is when IDLE => seq_det_w <= '0'; if( enable = '1') then if ( seq_in = '1' ) then nxt_state <= S1; else nxt_state <= IDLE; end if; else nxt_state <= IDLE; end if; when S1 => -- 1 seq_det_w <= seq_det; if ( seq_in = '0' ) then nxt_state <= S2; else nxt_state <= S1; end if; when S2 => -- 0 seq_det_w <= seq_det; if ( seq_in = '1' ) then nxt_state <= S3; else nxt_state <= IDLE; end if; - when S3 => -- 1 seq_det_w <= seq_det; if (seq_in = '0' ) then nxt_state <= S4; else nxt_state <= S1; end if; when S4 => -- 0 seq_det_w <= seq_det; if ( seq_in = '1' ) then nxt_state <= S5; else nxt_state <= IDLE; end if; when S5 => -- 1 seq_det_w <= seq_det; if ( seq_in = '1' ) then nxt_state <= S6; else nxt_state <= S4; end if; when S6 => -- 1 seq_det_w <= seq_det; if ( seq_in = '0' ) then nxt_state <= S7; else nxt_state <= S1; end if; when S7 => -- 0 seq_det_w <= seq_det; if ( seq_in = '0' ) then nxt_state <= S8; else nxt_state <= S3; end if; when S8 => -- 0 seq_det_w <= '1'; if ( seq_in = '1' ) then nxt_state <= S1; else nxt_state <= IDLE; end if; when others => NULL; end case; end process; end Behavioral; |
rising_edge has
a few extra checks built-in to make sure that you actually have an
edge.,Use Rising_edge(clk) instead of clk'event and clk = '1'
|
Addr 0 | Addr 1 | Addr 2
|
Bit file
|
|
000
|
0
|
|
100
|
1
|
|
010
|
2
|
|
110
|
3
|
|
001
|
4
|
|
101
|
5
|
|
011
|
6
|
|
111
|
7
|