OpenCores
URL https://opencores.org/ocsvn/cordic/cordic/trunk

Subversion Repositories cordic

[/] [cordic/] [trunk/] [polar2rect/] [sc_corproc.vhd] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 rherveille
--
2
-- sc_corproc.vhd
3
--
4
-- Calculates Sine and Cosine values
5
--
6
-- uses: p2r_codic.vhd and p2r_cordicpipe.vhd
7
--
8
--
9
--
10
-- system delay: 21 (data out delay: 20)
11
--
12
 
13
library ieee;
14
use ieee.std_logic_1164.all;
15
use ieee.std_logic_arith.all;
16
 
17
entity sc_corproc is
18
        port(
19
                clk     : in std_logic;
20
                ena     : in std_logic;
21
                Ain     : in signed(15 downto 0);
22
 
23
                sin     : out signed(15 downto 0);
24
                cos     : out signed(15 downto 0));
25
end entity sc_corproc;
26
 
27
architecture dataflow of sc_corproc is
28
        constant PipeLength : natural := 15;
29
        constant P : signed(15 downto 0) := x"4dba";     -- define aggregate constant
30
 
31
        component p2r_cordic is
32
        generic(
33
                PIPELINE : integer := 15;
34
                WIDTH    : integer := 16);
35
        port(
36
                clk : in std_logic;
37
                ena : in std_logic;
38
 
39
                Xi : in signed(WIDTH -1 downto 0);
40
                Yi : in signed(WIDTH -1 downto 0) := (others => '0');
41
                Zi : in signed(WIDTH -1 downto 0);
42
 
43
                Xo : out signed(WIDTH -1 downto 0);
44
                Yo : out signed(WIDTH -1 downto 0)
45
        );
46
        end component p2r_cordic;
47
 
48
begin
49
        u1:     p2r_cordic
50
                        generic map(PIPELINE => PipeLength, WIDTH => 16)
51
                        port map(clk => clk, ena => ena, Xi => P, Zi => Ain, Xo => cos, Yo => sin);
52
end architecture dataflow;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.