-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgouraudWeight.vhd
71 lines (53 loc) · 1.46 KB
/
gouraudWeight.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
library ieee;
use ieee.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_signed.all;
entity gouraudWeight is
port(
--reset
reset: in std_logic;
clock: in std_logic;
edge: in std_logic_vector( 31 downto 0 );
area: in std_logic_vector( 31 downto 0 );
weight: out std_logic_vector( 31 downto 0 )
);
end gouraudWeight;
architecture behavior of gouraudWeight is
component divider32s is
port
(
denom : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
numer : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
quotient : OUT STD_LOGIC_VECTOR (31 DOWNTO 0);
remain : OUT STD_LOGIC_VECTOR (31 DOWNTO 0)
);
end component;
component dividerStaged IS
PORT
(
clock : IN STD_LOGIC ;
denom : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
numer : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
quotient : OUT STD_LOGIC_VECTOR (31 DOWNTO 0);
remain : OUT STD_LOGIC_VECTOR (31 DOWNTO 0)
);
END component;
begin
divider32sInst: divider32s
port map(
numer => edge( 23 downto 0 ) & x"00",
denom => area,
quotient => weight
);
--dividerStagedInst: dividerStaged
-- port map(
--
-- clock => clock,
-- numer => edge( 23 downto 0 ) & x"00",
--
-- denom => area,
-- quotient => weight
--
-- );
--
end behavior;