1 |
3 |
gmarcus |
--
|
2 |
|
|
-- VHDL Architecture HAVOC.FPlzc.FPlzc
|
3 |
|
|
--
|
4 |
|
|
-- Created:
|
5 |
|
|
-- by - Guillermo
|
6 |
|
|
-- at - ITESM, 08:25:27 07/20/03
|
7 |
|
|
--
|
8 |
|
|
-- Generated by Mentor Graphics' HDL Designer(TM) 2002.1b (Build 7)
|
9 |
|
|
--
|
10 |
|
|
-- hds interface_start
|
11 |
|
|
LIBRARY ieee;
|
12 |
|
|
USE ieee.std_logic_1164.all;
|
13 |
|
|
USE ieee.std_logic_arith.all;
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
ENTITY FPlzc IS
|
17 |
|
|
PORT(
|
18 |
|
|
word : IN std_logic_vector (26 DOWNTO 0);
|
19 |
|
|
zero : OUT std_logic;
|
20 |
|
|
count : OUT std_logic_vector (4 DOWNTO 0)
|
21 |
|
|
);
|
22 |
|
|
|
23 |
|
|
-- Declarations
|
24 |
|
|
|
25 |
|
|
END FPlzc ;
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
-- hds interface_end
|
29 |
|
|
ARCHITECTURE FPlzc OF FPlzc IS
|
30 |
|
|
BEGIN
|
31 |
|
|
|
32 |
|
|
PROCESS(word)
|
33 |
|
|
BEGIN
|
34 |
|
|
zero <= '0';
|
35 |
|
|
-- IF (word="0000000000000000000000000000") THEN
|
36 |
|
|
-- count <= "11100";
|
37 |
|
|
IF (word(26 DOWNTO 0)="000000000000000000000000000") THEN
|
38 |
|
|
count <= "11011";
|
39 |
|
|
zero <= '1';
|
40 |
|
|
ELSIF (word(26 DOWNTO 1)="00000000000000000000000000") THEN count <= "11010";
|
41 |
|
|
ELSIF (word(26 DOWNTO 2)="0000000000000000000000000") THEN count <= "11001";
|
42 |
|
|
ELSIF (word(26 DOWNTO 3)="000000000000000000000000") THEN count <= "11000";
|
43 |
|
|
ELSIF (word(26 DOWNTO 4)="00000000000000000000000") THEN count <= "10111";
|
44 |
|
|
ELSIF (word(26 DOWNTO 5)="0000000000000000000000") THEN count <= "10110";
|
45 |
|
|
ELSIF (word(26 DOWNTO 6)="000000000000000000000") THEN count <= "10101";
|
46 |
|
|
ELSIF (word(26 DOWNTO 7)="00000000000000000000") THEN count <= "10100";
|
47 |
|
|
ELSIF (word(26 DOWNTO 8)="0000000000000000000") THEN count <= "10011";
|
48 |
|
|
ELSIF (word(26 DOWNTO 9)="000000000000000000") THEN count <= "10010";
|
49 |
|
|
ELSIF (word(26 DOWNTO 10)="00000000000000000") THEN count <= "10001";
|
50 |
|
|
ELSIF (word(26 DOWNTO 11)="0000000000000000") THEN count <= "10000";
|
51 |
|
|
ELSIF (word(26 DOWNTO 12)="000000000000000") THEN count <= "01111";
|
52 |
|
|
ELSIF (word(26 DOWNTO 13)="00000000000000") THEN count <= "01110";
|
53 |
|
|
ELSIF (word(26 DOWNTO 14)="0000000000000") THEN count <= "01101";
|
54 |
|
|
ELSIF (word(26 DOWNTO 15)="000000000000") THEN count <= "01100";
|
55 |
|
|
ELSIF (word(26 DOWNTO 16)="00000000000") THEN count <= "01011";
|
56 |
|
|
ELSIF (word(26 DOWNTO 17)="0000000000") THEN count <= "01010";
|
57 |
|
|
ELSIF (word(26 DOWNTO 18)="000000000") THEN count <= "01001";
|
58 |
|
|
ELSIF (word(26 DOWNTO 19)="00000000") THEN count <= "01000";
|
59 |
|
|
ELSIF (word(26 DOWNTO 20)="0000000") THEN count <= "00111";
|
60 |
|
|
ELSIF (word(26 DOWNTO 21)="000000") THEN count <= "00110";
|
61 |
|
|
ELSIF (word(26 DOWNTO 22)="00000") THEN count <= "00101";
|
62 |
|
|
ELSIF (word(26 DOWNTO 23)="0000") THEN count <= "00100";
|
63 |
|
|
ELSIF (word(26 DOWNTO 24)="000") THEN count <= "00011";
|
64 |
|
|
ELSIF (word(26 DOWNTO 25)="00") THEN count <= "00010";
|
65 |
|
|
ELSIF (word(26)='0') THEN count <= "00001";
|
66 |
|
|
ELSE
|
67 |
|
|
count <= "00000";
|
68 |
|
|
END IF;
|
69 |
|
|
END PROCESS;
|
70 |
|
|
|
71 |
|
|
END FPlzc;
|
72 |
|
|
|