⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 top_level_cordic.tdf

📁 CORDIC算法参考
💻 TDF
字号:
%------------------------------------------------------------------------------------------------------------------------------------------------------------
CORDIC 				HammerCores			 
 
Version November 1998
http:\\www.hammercores.com
 
Megafunction ID :			AFAE_ED02
----------------------------------------------------------------------------------------------------------------------------------------------------------
Getting Started

 Step 1 : Install the MAX+PLUS II License.

	!!! License for MAX+PLUS II 9.0x and MAX+PLUS II 9.1x are different
	See License section Below. 
		
	Step 2 :  Compile top_level_cordic.tdf in MAX+PLUS II


 Parameters :

 IMPLEMENTATION : SERIAL or PAR.
                  DONE and RESET are used for the serial implementation only. 
 inwidth : This is the precision of the input cartesian coordinates (x,y). 
           The valid range is from 6 to 24. INWIDTH  is also the precision 
           of the ANGLE[] result. The precision of the vector length will 
           be INWIDTH + 2.
 PIPELINE  : When this parameter is "YES", the macro will be pipelined with 
             a total of INWIDTH stages. When it is "NO", the macro will be 
             purely combinatorial.

------------------------------------------------------------------------------------------------------------------------------------------------------------ %


PARAMETERS
(
 implementation = "SERIAL",
 inwidth = 8,
 pipelined = "YES"
);

constant precision = inwidth+2;

FUNCTION cdpp (sysclk, xx[inwidth..1], yy[inwidth..1])
    WITH (inwidth, pipelined)
    RETURNS (radius[(inwidth) + (2)..1], angle[inwidth..1]);

FUNCTION cdps (sysclk, reset, xx[inwidth..1], yy[inwidth..1])
    WITH (inwidth)
    RETURNS (radius[(inwidth) + (2)..1], angle[inwidth..1], done);

subdesign top_level_cordic
(
 sysclk : INPUT = GND;
 reset : INPUT = GND;
 xx[inwidth..1], yy[inwidth..1] : INPUT;
 radius[precision..1], angle[inwidth..1] : OUTPUT;
 done : OUTPUT;
) 

VARIABLE

IF (implementation == "SERIAL") GENERATE 
	U0 : CDPS with (inwidth = inwidth);
ELSE GENERATE
	U0 : CDPP with (inwidth = inwidth, pipelined = pipelined);
END GENERATE;

BEGIN 

U0.sysclk = sysclk;
U0.xx[inwidth..1] = xx[inwidth..1];
U0.yy[inwidth..1] = yy[inwidth..1];
radius[precision..1] = U0.radius[precision..1];
angle[inwidth..1] = U0.angle[inwidth..1];

IF (implementation == "SERIAL") GENERATE 
	U0.reset = reset;
	done = U0.done;
ELSE GENERATE
	done = GND;
END GENERATE;

END;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -