image thumbnail

Trigonometric Function FPGA Implementation using CORDIC Algorithm

by

 

Trigonometric function using CORDIC algorithm is implemented to FPGA.

script
function tclcmd = script
% HDLFILTERLINKCMDS - Creates Tcl cmds for Inverter Model
%   The returned cell array can be passed as parameters ('cmd') to
%   VSIMULINK.  This will start ModelSim and compile the HDL.
%   Also, the model will be loaded for cosimulation with 
%   inverter.MDL
%
% See also VSIMULINK


tmpdir = fullfile(pwd, 'hdlsrc');

% TCL for ModelSim
unixprojdir  = strrep(tmpdir,'\','/'); % ModelSim prefers Unix style pathnames
unixprojdir  = strrep(unixprojdir, ' ', '\ '); % backslash spaces
tclcmd = { ['cd ',unixprojdir],...            
			'vlib work',... %create library (if necessary)
			'vcom Shift2.vhd Shift1.vhd map_rsvd.vhd sync_sig.vhd correct.vhd Latch.vhd CORDIC_Rotation_FP.vhd CORDIC_FP_pkg.vhd CORDIC_FP.vhd',...	%Compile
			'vsimulink work.CORDIC_FP',...
			'add wave -format analog-step -scale 0.03 -offset 0 sim:/CORDIC_FP/clk',...
			'add wave -height 100 -format analog-step -scale 0.001 -offset 0 sim:/CORDIC_FP/Theta',...
			'add wave -height 100 -format analog-step -scale 0.001 -offset 0 sim:/CORDIC_FP/sin',...
			'add wave -height 100 -format analog-step -scale 0.001 -offset 0 sim:/CORDIC_FP/cos',...

         };

Contact us