亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cordic_-

?? 用于實現sin
??
字號:
------------------------------------------------------------------------
-- Title        CORDIC calculater sin(x), cos(x), atan(y/x)           --
-- File         CORDIC.vhd                                            --
-- Entity       CORDIC                                                --
-- rev date     coded contents                                        --
-- 001 99/01/06 ueno  Make Original                                   --
------------------------------------------------------------------------
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_unsigned.all ;
--use IEEE.std_logic_signed.all ;
--use IEEE.std_logic_arith.all ;

------------------------------------------------------------------------
-- entity                                                             --
------------------------------------------------------------------------
entity CORDIC is
    port(
        -- Input/Output Data format = Fixed Point Value
        --     range -1.99994 to 1.99994 2's complement
        -- 15  14 . 13  12  11  10  09  08  07  06  05  04  03  02  01  00
        -- Sign   ^point
        --
        IN_X        : in    std_logic_vector(15 downto 0) ; -- atan(y/X)    -0.15 to 1.00
        IN_Y        : in    std_logic_vector(15 downto 0) ; -- atan(Y/x)    -1.00 to 1.00
        IN_ANGLE    : in    std_logic_vector(15 downto 0) ; -- angle(thita) -1.74 to 1.74
        IN_START    : in    std_logic ;                     -- convert start
        IN_MODE     : in    std_logic ;                     -- 1=atan/0=sin,cos
        CLK         : in    std_logic ;                     -- System Clock
        ENABLE      : in    std_logic ;                     -- Clock Enable
        XRST        : in    std_logic ;                     -- Reset
        OUT_FINISH  : out   std_logic ;                     -- Convert end
        OUT_X       : out   std_logic_vector(15 downto 0) ; -- Calculate X
        OUT_Y       : out   std_logic_vector(15 downto 0) ; -- Calculate Y
        OUT_Z       : out   std_logic_vector(15 downto 0)   -- Calculate Z
    );
end CORDIC ;

------------------------------------------------------------------------
-- architecture                                                       --
------------------------------------------------------------------------
architecture RTL of CORDIC is

--constant    ENABLE  : std_logic := '1' ;

-----------------------------------------------------------
-- Constants                                             --
-----------------------------------------------------------
constant    VAL0    : std_logic_vector(15 downto 0) := "0000000000000000" ; -- 0.000000000
constant    VALX    : std_logic_vector(15 downto 0) := "0010011011011101" ; -- 0.607252935
constant    ATAN00  : std_logic_vector(15 downto 0) := "0011001001000100" ; -- atan(1/1)
constant    ATAN01  : std_logic_vector(15 downto 0) := "0001110110101100" ; -- atan(1/2)
constant    ATAN02  : std_logic_vector(15 downto 0) := "0000111110101110" ; -- atan(1/4)
constant    ATAN03  : std_logic_vector(15 downto 0) := "0000011111110101" ; -- atan(1/8)
constant    ATAN04  : std_logic_vector(15 downto 0) := "0000001111111111" ; -- atan(1/16)
constant    ATAN05  : std_logic_vector(15 downto 0) := "0000001000000000" ; -- atan(1/32)
constant    ATAN06  : std_logic_vector(15 downto 0) := "0000000100000000" ; -- atan(1/64)
constant    ATAN07  : std_logic_vector(15 downto 0) := "0000000010000000" ; -- atan(1/128)
constant    ATAN08  : std_logic_vector(15 downto 0) := "0000000001000000" ; -- atan(1/256)
constant    ATAN09  : std_logic_vector(15 downto 0) := "0000000000100000" ; -- atan(1/512)
constant    ATAN10  : std_logic_vector(15 downto 0) := "0000000000010000" ; -- atan(1/1024)
constant    ATAN11  : std_logic_vector(15 downto 0) := "0000000000001000" ; -- atan(1/2048)
constant    ATAN12  : std_logic_vector(15 downto 0) := "0000000000000100" ; -- atan(1/4096)
constant    ATAN13  : std_logic_vector(15 downto 0) := "0000000000000010" ; -- atan(1/8192)
constant    ATAN14  : std_logic_vector(15 downto 0) := "0000000000000001" ; -- atan(1/16384)
constant    ATAN15  : std_logic_vector(15 downto 0) := "0000000000000000" ; -- atan(1/32768)

-----------------------------------------------------------
-- Signals                                               --
-----------------------------------------------------------
signal  REG_X       : std_logic_vector(15 downto 0) ;   -- Xn Register
signal  REG_Y       : std_logic_vector(15 downto 0) ;   -- Yn Register
signal  REG_Z       : std_logic_vector(15 downto 0) ;   -- Zn Register
signal  REG_J       : std_logic_vector(3 downto 0)  ;   -- 0 to 15 counter

signal  AX          : std_logic_vector(15 downto 0) ;   -- Ballel Shift X
signal  BX          : std_logic_vector(15 downto 0) ;   -- Ballel Shift X
signal  CX          : std_logic_vector(15 downto 0) ;   -- Ballel Shift X
signal  DX          : std_logic_vector(15 downto 0) ;   -- Ballel Shift X
signal  AY          : std_logic_vector(15 downto 0) ;   -- Ballel Shift Y
signal  BY          : std_logic_vector(15 downto 0) ;   -- Ballel Shift Y
signal  CY          : std_logic_vector(15 downto 0) ;   -- Ballel Shift Y
signal  DY          : std_logic_vector(15 downto 0) ;   -- Ballel Shift Y
signal  TAB_Z       : std_logic_vector(15 downto 0) ;   -- Table Select Z

signal  INIT_LOAD   : std_logic ;                       -- X,Y,Z Initialize
signal  NOW_CONVERT : std_logic ;                       -- Now Conveting for CORDIC

signal  ADD_SUB     : std_logic ;                       -- Next Calculate '1'=ADD/'0'=SUB

-----------------------------------------------------------
-- Architectures                                         --
-----------------------------------------------------------
begin

-----------------------------------------------------------
-- Flag Control                                          --
-----------------------------------------------------------
INIT_FLAG       : process( CLK, XRST )
    begin
        if( XRST='0' ) then
            INIT_LOAD <= '0' ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                if( IN_START='1' and INIT_LOAD='0' and NOW_CONVERT='0' ) then
                    INIT_LOAD <= '1' ;
                else
                    INIT_LOAD <= '0' ;
                end if ;
            end if ;
        end if ;
    end process ;
CONVERT_FLAG    : process( CLK, XRST )
    begin
        if( XRST='0' ) then
            NOW_CONVERT <= '0' ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                if( INIT_LOAD='1' ) then
                    NOW_CONVERT <= '1' ;
                elsif( REG_J="1111" ) then
                    NOW_CONVERT <= '0' ;
                end if ;
            end if ;
        end if ;
    end process ;

-----------------------------------------------------------
-- Sequence Counter                                      --
-----------------------------------------------------------
COUNTER_GEN     : process( CLK, XRST )
    begin
        if( XRST='0' ) then
            REG_J <= "0000" ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                if( NOW_CONVERT='1' ) then
                    REG_J <= REG_J + 1 ;
                end if ;
            end if ;
        end if ;
    end process ;

-----------------------------------------------------------
-- ADD/SUB Flag                                          --
-----------------------------------------------------------
SELECT_ADD_SUB  : ADD_SUB <= not REG_Y(15) when IN_MODE='1' else REG_Z(15) ;

-----------------------------------------------------------
-- Ballel Shifter                                        --
-----------------------------------------------------------
BALLEL_AX       : process( REG_X, REG_J )
    begin
        if( REG_J(3)='1' ) then
            AX <= REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15) & REG_X(15 downto 8);
        else
            AX <= REG_X ;
        end if ;
    end process ;
BALLEL_BX       : process( AX, REG_J )
    begin
        if( REG_J(2)='1' ) then
            BX <= AX(15) & AX(15) & AX(15) & AX(15) & AX(15 downto 4);
        else
            BX <= AX ;
        end if ;
    end process ;
BALLEL_CX       : process( BX, REG_J )
    begin
        if( REG_J(1)='1' ) then
            CX <= BX(15) & BX(15) & BX(15 downto 2);
        else
            CX <= BX ;
        end if ;
    end process ;
BALLEL_DX       : process( CX, REG_J )
    begin
        if( REG_J(0)='1' ) then
            DX <= CX(15) & CX(15 downto 1);
        else
            DX <= CX ;
        end if ;
    end process ;
BALLEL_AY       : process( REG_Y, REG_J )
    begin
        if( REG_J(3)='1' ) then
            AY <= REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15) & REG_Y(15 downto 8);
        else
            AY <= REG_Y ;
        end if ;
    end process ;
BALLEL_BY       : process( AY, REG_J )
    begin
        if( REG_J(2)='1' ) then
            BY <= AY(15) & AY(15) & AY(15) & AY(15) & AY(15 downto 4);
        else
            BY <= AY ;
        end if ;
    end process ;
BALLEL_CY       : process( BY, REG_J )
    begin
        if( REG_J(1)='1' ) then
            CY <= BY(15) & BY(15) & BY(15 downto 2);
        else
            CY <= BY ;
        end if ;
    end process ;
BALLEL_DY       : process( CY, REG_J )
    begin
        if( REG_J(0)='1' ) then
            DY <= CY(15) & CY(15 downto 1);
        else
            DY <= CY ;
        end if ;
    end process ;
TABLE_Z         : process( REG_J )
    begin
        case REG_J is
            when "0000" => TAB_Z <= ATAN00 ;
            when "0001" => TAB_Z <= ATAN01 ;
            when "0010" => TAB_Z <= ATAN02 ;
            when "0011" => TAB_Z <= ATAN03 ;
            when "0100" => TAB_Z <= ATAN04 ;
            when "0101" => TAB_Z <= ATAN05 ;
            when "0110" => TAB_Z <= ATAN06 ;
            when "0111" => TAB_Z <= ATAN07 ;
            when "1000" => TAB_Z <= ATAN08 ;
            when "1001" => TAB_Z <= ATAN09 ;
            when "1010" => TAB_Z <= ATAN10 ;
            when "1011" => TAB_Z <= ATAN11 ;
            when "1100" => TAB_Z <= ATAN12 ;
            when "1101" => TAB_Z <= ATAN13 ;
            when "1110" => TAB_Z <= ATAN14 ;
            when "1111" => TAB_Z <= ATAN15 ;
            when others => TAB_Z <= VAL0 ;
        end case ;
    end process ;

-----------------------------------------------------------
-- Calculate                                             --
-----------------------------------------------------------
CALC_X          : process( CLK, XRST )
    begin
        if( XRST='0') then
            REG_X <= (others=>'0') ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                -- Initial Value
                if( INIT_LOAD = '1' ) then
                    if( IN_MODE='1' ) then
                        -- Atan Mode
                        REG_X <= IN_X ;
                    else
                        -- Sin/Cos Mode
                        REG_X <= VALX ;
                    end if ;
                elsif( NOW_CONVERT='1' ) then
                    if( ADD_SUB='1' ) then
                        REG_X <= REG_X + DY ;
                    else
                        REG_X <= REG_X - DY ;
                    end if ;
                end if ;
            end if ;
        end if ;
    end process ;
CALC_Y          : process( CLK, XRST )
    begin
        if( XRST='0') then
            REG_Y <= (others=>'0') ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                -- Initial Value
                if( INIT_LOAD = '1' ) then
                    if( IN_MODE='1' ) then
                        -- Atan Mode
                        REG_Y <= IN_Y ;
                    else
                        -- Sin/Cos Mode
                        REG_Y <= VAL0 ;
                    end if ;
                elsif( NOW_CONVERT='1' ) then
                    if( ADD_SUB='1' ) then
                        REG_Y <= REG_Y - DX ;
                    else
                        REG_Y <= REG_Y + DX ;
                    end if ;
                end if ;
            end if ;
        end if ;
    end process ;
CALC_Z          : process( CLK, XRST )
    begin
        if( XRST='0') then
            REG_Z <= (others=>'0') ;
        elsif( CLK'event and CLK='1' ) then
            if( ENABLE='1' ) then
                -- Initial Value
                if( INIT_LOAD = '1' ) then
                    if( IN_MODE='1' ) then
                        -- Atan Mode
                        REG_Z <= VAL0 ;
                    else
                        -- Sin/Cos Mode
                        REG_Z <= IN_ANGLE ;
                    end if ;
                elsif( NOW_CONVERT='1' ) then
                    if( ADD_SUB='1' ) then
                        REG_Z <= REG_Z + TAB_Z ;
                    else
                        REG_Z <= REG_Z - TAB_Z ;
                    end if ;
                end if ;
            end if ;
        end if ;
    end process ;

OUT_FINISH <= not NOW_CONVERT ;
OUT_X      <= REG_X ;
OUT_Y      <= REG_Y ;
OUT_Z      <= REG_Z ;

end RTL ;
------------------------------------------------------------------------
-- End of File                                                        --
------------------------------------------------------------------------


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久草这里只有精品视频| 久久国产精品99久久人人澡| 欧美精品一区二区三区在线 | 亚洲欧美中日韩| 国产欧美一区二区精品久导航 | 亚洲成人免费在线| 亚洲一卡二卡三卡四卡无卡久久| 18涩涩午夜精品.www| 国产精品沙发午睡系列990531| 久久久久国产一区二区三区四区| 久久综合狠狠综合久久综合88 | 美女高潮久久久| 激情五月激情综合网| 国产精品一区二区在线观看网站| 国产精品主播直播| 国产不卡一区视频| 91色综合久久久久婷婷| 欧美日韩国产小视频| 欧美成人激情免费网| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日韩va亚洲va欧美va久久| 日韩专区一卡二卡| 国产精选一区二区三区| 成人国产精品免费观看视频| 色999日韩国产欧美一区二区| 在线观看欧美精品| 欧美tickling挠脚心丨vk| 国产清纯白嫩初高生在线观看91 | 视频一区免费在线观看| 国产精品一区2区| 91在线精品一区二区| 欧美一区二区三区在线看| 久久精品水蜜桃av综合天堂| 亚洲自拍与偷拍| 精品在线观看免费| 色婷婷av一区二区三区软件| 日韩一级片网站| 亚洲伦在线观看| 久久精品国产成人一区二区三区 | 首页欧美精品中文字幕| 国产传媒日韩欧美成人| 69av一区二区三区| 中文字幕亚洲欧美在线不卡| 麻豆一区二区三| 在线免费不卡视频| 国产精品免费av| 久久精品国产**网站演员| 色视频成人在线观看免| 久久久午夜电影| 日本免费在线视频不卡一不卡二| 91蝌蚪porny| 久久久电影一区二区三区| 日韩激情一二三区| 91国产丝袜在线播放| 国产精品理论片在线观看| 久久99精品久久只有精品| 欧美高清性hdvideosex| 日韩一区欧美一区| www.亚洲色图| 国产精品欧美一区二区三区| 久久99精品网久久| 欧美刺激午夜性久久久久久久 | 精品国产乱码久久久久久久久| 亚洲美女一区二区三区| av亚洲精华国产精华| 26uuu另类欧美亚洲曰本| 日本美女一区二区三区| 欧美日韩精品欧美日韩精品一| 综合久久久久久| 99国产精品一区| 国产精品九色蝌蚪自拍| 91亚洲资源网| 亚洲日本乱码在线观看| 99在线精品一区二区三区| 国产精品美女一区二区在线观看| 国产iv一区二区三区| 久久精品人人做人人爽人人| 精品亚洲免费视频| 久久免费偷拍视频| 国产成人亚洲精品青草天美 | 亚洲欧美一区二区三区孕妇| 成人av在线资源网| 亚洲欧美另类小说| 欧美日韩一二三区| 国产99久久久国产精品潘金网站| 日韩免费高清电影| 国产一区二区主播在线| 欧美极品少妇xxxxⅹ高跟鞋| 99麻豆久久久国产精品免费 | 精品中文字幕一区二区| 久久先锋影音av鲁色资源| 国产精品一区一区| 日韩一区在线播放| 欧美精品日韩综合在线| 蜜桃视频一区二区| 国产精品久久一卡二卡| 欧美视频在线播放| 久草中文综合在线| 国产精品久久久久四虎| 欧美在线你懂得| 九色综合狠狠综合久久| 国产精品色噜噜| 欧美少妇xxx| 国产曰批免费观看久久久| 国产精品久久久久久亚洲伦| 欧美日韩在线电影| 国产乱一区二区| 亚洲一区二区3| 久久精品免视看| 欧美四级电影网| 国产成人在线看| 首页综合国产亚洲丝袜| 国产精品情趣视频| 日韩写真欧美这视频| 99re这里都是精品| 国产综合一区二区| 日韩精品乱码av一区二区| 欧美激情中文字幕| 欧美一级夜夜爽| 91福利社在线观看| 国产成人免费xxxxxxxx| 青青草原综合久久大伊人精品 | 欧美高清一级片在线| 国产suv精品一区二区6| 日韩电影在线免费看| 亚洲人成亚洲人成在线观看图片 | jvid福利写真一区二区三区| 五月天激情综合网| 中文字幕亚洲不卡| 国产午夜精品一区二区三区嫩草 | 亚洲高清免费在线| 亚洲国产精品v| 久久众筹精品私拍模特| 欧美色图一区二区三区| 成人av综合一区| 精品一区二区三区免费播放| 天天综合网天天综合色| 综合av第一页| 亚洲人成亚洲人成在线观看图片| 久久这里只精品最新地址| 5858s免费视频成人| 欧美自拍偷拍一区| 日本高清不卡一区| 99精品视频在线免费观看| 国产精品系列在线观看| 国产综合色在线视频区| 免费看日韩精品| 美女视频一区在线观看| 日韩av中文字幕一区二区三区| 亚洲观看高清完整版在线观看| 亚洲精品视频一区| 悠悠色在线精品| 性欧美大战久久久久久久久| 亚洲一区二区三区激情| 亚洲一区二区精品久久av| 亚洲一区二区四区蜜桃| 婷婷久久综合九色综合绿巨人| 午夜日韩在线电影| 日韩高清不卡一区| 久久精品国产亚洲高清剧情介绍| 美女网站色91| 国产成人在线观看免费网站| 成人av午夜电影| 99久久精品国产导航| 91福利国产成人精品照片| 欧洲一区二区av| 在线综合视频播放| 久久久亚洲精华液精华液精华液 | 99re这里只有精品首页| 色素色在线综合| 777欧美精品| ww亚洲ww在线观看国产| 国产午夜亚洲精品不卡| 自拍偷拍欧美激情| 日韩精品欧美成人高清一区二区| 蜜桃av一区二区三区| 成人av电影在线观看| 欧美亚洲综合在线| 欧美v国产在线一区二区三区| 久久久久久久国产精品影院| 1区2区3区欧美| 日本视频一区二区三区| 成人午夜电影久久影院| 91福利国产成人精品照片| 日韩女优视频免费观看| 国产精品久久久久一区| 午夜精品福利久久久| 国产成人精品aa毛片| 欧美女孩性生活视频| 国产人久久人人人人爽| 午夜国产精品一区| 国产99精品在线观看| 欧美福利视频一区| 国产精品久久久久久久久久免费看| 亚洲一级在线观看| 福利91精品一区二区三区| 欧美日韩精品是欧美日韩精品| 国产日韩欧美综合在线| 亚洲成在人线在线播放| 国产aⅴ精品一区二区三区色成熟|