Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - How to simulate these example CORDIC code?

 
Thread Tools Search this Thread
Old 11-23-2007, 07:48 PM   #1
Default How to simulate these example CORDIC code?


Hi,
I want to learn the implementation of CORDIC. I find the following
website has some code which I would like begin with it.


http://www.ht-lab.com/freecores/cordic/cordic.html

But I cannot simply simulate it in my Modelsim PE (student version)
because of the setup problem. Could you, the FPGA and VHDL experts can
tell me how to simulate it? Especially could you tell me how its
structure about the behaviour and synthesis files arranged?


Thanks in advance.


fl
  Reply With Quote
Old 11-23-2007, 09:05 PM   #2
KJ
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?

"fl" <> wrote in message
news:ccb086d1-775c-44cf-8666-...
> Hi,
> I want to learn the implementation of CORDIC. I find the following
> website has some code which I would like begin with it.
>
>
> http://www.ht-lab.com/freecores/cordic/cordic.html
>
> But I cannot simply simulate it in my Modelsim PE (student version)
> because of the setup problem.

What is the 'setup problem'? I'd suggest solving that first.

>Could you, the FPGA and VHDL experts can
> tell me how to simulate it?

I'd use Modelsim

> Especially could you tell me how its
> structure about the behaviour and synthesis files arranged?
>

Modelsim's GUI interface has a function that figures out the correct
ordering of the files in the project. Right click on one of the source
files and then under 'Compile' look for something that says about
auto-generating the compile order (I forget what the exact verbage is, but
it's there).

KJ




KJ
  Reply With Quote
Old 11-23-2007, 09:12 PM   #3
fl
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
On Nov 23, 4:05 pm, "KJ" <kkjenni...@sbcglobal.net> wrote:
> "fl" <rxjw...@gmail.com> wrote in message
>
> news:ccb086d1-775c-44cf-8666-...> Hi,
> > I want to learn the implementation of CORDIC. I find the following
> > website has some code which I would like begin with it.

>
> >http://www.ht-lab.com/freecores/cordic/cordic.html

>
> > But I cannot simply simulate it in my Modelsim PE (student version)
> > because of the setup problem.

>
> What is the 'setup problem'? I'd suggest solving that first.
>
> >Could you, the FPGA and VHDL experts can
> > tell me how to simulate it?

>
> I'd use Modelsim
>
> > Especially could you tell me how its
> > structure about the behaviour and synthesis files arranged?

>
> Modelsim's GUI interface has a function that figures out the correct
> ordering of the files in the project. Right click on one of the source
> files and then under 'Compile' look for something that says about
> auto-generating the compile order (I forget what the exact verbage is, but
> it's there).
>
> KJ


Thank you for your reply. The following is from the add_files.tcl in
the work_ps directory. I guess these files to form work library.


add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/shiftn_synthesis.vhd}
add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/addsub_synthesis.vhd}
add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/atan32_Arch1.vhd}
add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/fsm_synthesis.vhd}
add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/cordic_pkg_pkg.vhd}
add_input_file -format {VHDL} -work Cordic {D:/DEMO/demo_hdl_designer/
Cordic/hdl/cordic_synthesis.vhd}

Then, I form cordic_pkg to Cordic library. But the compiling error is

** Error: (vcom-11) Could not find cordic.addsub.
** Error: C:/Modeltech_pe_edu_6.3c/cordic_learn/hdl/
cordic_synthesis.vhd(143): (vcom-1195) Cannot find expanded name
"cordic.addsub".

That is the compiler looks for addsub in the Cordic lib, not work lib.
What's wrong? What is the function and differences of the directory
files. I cannot what are for simulation, what are for synthesis.
Thanks again.


fl
  Reply With Quote
Old 11-23-2007, 09:19 PM   #4
fl
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
On Nov 23, 4:05 pm, "KJ" <kkjenni...@sbcglobal.net> wrote:
> "fl" <rxjw...@gmail.com> wrote in message
>
> news:ccb086d1-775c-44cf-8666-...> Hi,
> > I want to learn the implementation of CORDIC. I find the following
> > website has some code which I would like begin with it.

>
> >http://www.ht-lab.com/freecores/cordic/cordic.html

>
> > But I cannot simply simulate it in my Modelsim PE (student version)
> > because of the setup problem.

>
> What is the 'setup problem'? I'd suggest solving that first.
>
> >Could you, the FPGA and VHDL experts can
> > tell me how to simulate it?

>
> I'd use Modelsim
>
> > Especially could you tell me how its
> > structure about the behaviour and synthesis files arranged?

>
> Modelsim's GUI interface has a function that figures out the correct
> ordering of the files in the project. Right click on one of the source
> files and then under 'Compile' look for something that says about
> auto-generating the compile order (I forget what the exact verbage is, but
> it's there).
>
> KJ



BTW, part of the contents in the cordic_synthesis.vhl is as the below.
Is it useful to understand the configuration?

-- Optional embedded configurations
-- pragma synthesis_off
FOR ADD1 : addsub USE ENTITY cordic.addsub;
FOR ADD2 : addsub USE ENTITY cordic.addsub;
FOR ADD3 : addsub USE ENTITY cordic.addsub;
FOR ALL : atan32 USE ENTITY cordic.atan32;
FOR ALL : fsm USE ENTITY cordic.fsm;
FOR ALL : shiftn USE ENTITY cordic.shiftn;
-- pragma synthesis_on

Thank you very much.


fl
  Reply With Quote
Old 11-23-2007, 09:37 PM   #5
fl
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
On Nov 23, 4:05 pm, "KJ" <kkjenni...@sbcglobal.net> wrote:
> "fl" <rxjw...@gmail.com> wrote in message
>
> news:ccb086d1-775c-44cf-8666-...> Hi,
> > I want to learn the implementation of CORDIC. I find the following
> > website has some code which I would like begin with it.

>
> >http://www.ht-lab.com/freecores/cordic/cordic.html

>
> > But I cannot simply simulate it in my Modelsim PE (student version)
> > because of the setup problem.

>
> What is the 'setup problem'? I'd suggest solving that first.
>
> >Could you, the FPGA and VHDL experts can
> > tell me how to simulate it?

>
> I'd use Modelsim
>
> > Especially could you tell me how its
> > structure about the behaviour and synthesis files arranged?

>
> Modelsim's GUI interface has a function that figures out the correct
> ordering of the files in the project. Right click on one of the source
> files and then under 'Compile' look for something that says about
> auto-generating the compile order (I forget what the exact verbage is, but
> it's there).
>
> KJ


Another question, how to run the "compile.scr "?


fl
  Reply With Quote
Old 11-23-2007, 09:55 PM   #6
Mike Treseler
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
fl wrote:

> Another question, how to run the "compile.scr "?


I expect that you have to find modelsim.ini
and fix up the source paths to match
where they are on your machine.

Note that learning cordic theory has nothing
to do with learning vhdl or modelsim.
I would suggest starting with simpler examples
or tutorials for each topic.

And I would recommend not spending
any time learning hdl designer.
Just use an editor and modelsim directly.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 11-24-2007, 10:04 AM   #7
HT-Lab
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?

"fl" <> wrote in message
news:ccb086d1-775c-44cf-8666-...
> Hi,
> I want to learn the implementation of CORDIC. I find the following
> website has some code which I would like begin with it.
>
>
> http://www.ht-lab.com/freecores/cordic/cordic.html
>
> But I cannot simply simulate it in my Modelsim PE (student version)
> because of the setup problem. Could you, the FPGA and VHDL experts can
> tell me how to simulate it? Especially could you tell me how its
> structure about the behaviour and synthesis files arranged?
>
>
> Thanks in advance.


Send me an email and I will create a standalone Modelsim version for you. I
wrote this code some time ago using HDL Designer and Modelsim.

Regards,
Hans
www.ht-lab.com




HT-Lab
  Reply With Quote
Old 11-24-2007, 10:24 AM   #8
HT-Lab
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?

"HT-Lab" <> wrote in message
news:8HS1j.43310$...
>
> "fl" <> wrote in message
> news:ccb086d1-775c-44cf-8666-...

... snip

>>
>> Thanks in advance.

>
> Send me an email and I will create a standalone Modelsim version for you.


Use this procedure:

1) Navigate to the work_mti directory in a DOSbox/cygwin/Msys shell etc
2) Issue the following command

vlib Cordic
vmap work Cordic
vcom -work Cordic -just p ..\hdl\*.vhd
vcom -work Cordic -just b ..\hdl\*.vhd
vcom -work Cordic -just e ..\hdl\*.vhd
vcom -work Cordic -just a ..\hdl\*.vhd
vsim -c -do tb.scr

And you should get something like:

# Angle=60101B Sin=3FD815 Expected=3FD816 Cos=0476E0 Expected=0476E3 PASS
# Angle=612E10 Sin=3FE98D Expected=3FE98B Cos=035976 Expected=035978 PASS
# Angle=624C04 Sin=3FF603 Expected=3FF604 Cos=023BCB Expected=023BCB PASS
# Angle=6369F8 Sin=3FFD7E Expected=3FFD81 Cos=011DF3 Expected=011DF0 PASS
# ** Failure: *** End of Test ***

Next remove all the std_logic_arith/std_logic_unsigned package references
and replace them with the recommended numeric_std package

Regards,
Hans.
www.ht-lab.com




HT-Lab
  Reply With Quote
Old 11-26-2007, 03:15 AM   #9
fl
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
On 24 nov, 05:24, "HT-Lab" <han...@ht-lab.com> wrote:
> "HT-Lab" <han...@ht-lab.com> wrote in message
>
> news:8HS1j.43310$...
>
> > "fl" <rxjw...@gmail.com> wrote in message
> >news:ccb086d1-775c-44cf-8666-...

>
> .. snip
>
>
>
> >> Thanks in advance.

>
> > Send me an email and I will create a standalone Modelsim version for you.

>
> Use this procedure:
>
> 1) Navigate to the work_mti directory in a DOSbox/cygwin/Msys shell etc
> 2) Issue the following command
>
> vlib Cordic
> vmap work Cordic
> vcom -work Cordic -just p ..\hdl\*.vhd
> vcom -work Cordic -just b ..\hdl\*.vhd
> vcom -work Cordic -just e ..\hdl\*.vhd
> vcom -work Cordic -just a ..\hdl\*.vhd
> vsim -c -do tb.scr
>
> And you should get something like:
>
> # Angle=60101B Sin=3FD815 Expected=3FD816 Cos=0476E0 Expected=0476E3 PASS
> # Angle=612E10 Sin=3FE98D Expected=3FE98B Cos=035976 Expected=035978 PASS
> # Angle=624C04 Sin=3FF603 Expected=3FF604 Cos=023BCB Expected=023BCB PASS
> # Angle=6369F8 Sin=3FFD7E Expected=3FFD81 Cos=011DF3 Expected=011DF0 PASS
> # ** Failure: *** End of Test ***
>
> Next remove all the std_logic_arith/std_logic_unsigned package references
> and replace them with the recommended numeric_std package
>
> Regards,
> Hans.www.ht-lab.com


Thank you for your reply. I don't know the reason of:

> Next remove all the std_logic_arith/std_logic_unsigned package references
> and replace them with the recommended numeric_std package
>


Could you tell me that?

Thanks again.


fl
  Reply With Quote
Old 12-06-2007, 02:10 PM   #10
mrmoosavi@gmail.com
 
Posts: n/a
Default Re: How to simulate these example CORDIC code?
On Nov 24, 1:04 pm, "HT-Lab" <han...@ht-lab.com> wrote:
> "fl" <rxjw...@gmail.com> wrote in message
>
> news:ccb086d1-775c-44cf-8666-...
>
> > Hi,
> > I want to learn the implementation ofCORDIC. I find the following
> > website has some code which I would like begin with it.

>
> >http://www.ht-lab.com/freecores/cordic/cordic.html

>
> > But I cannot simply simulate it in my Modelsim PE (student version)
> > because of the setup problem. Could you, the FPGA and VHDL experts can
> > tell me how to simulate it? Especially could you tell me how its
> > structure about the behaviour and synthesis files arranged?

>
> > Thanks in advance.

>
> Send me an email and I will create a standalone Modelsim version for you. I
> wrote this code some time ago using HDL Designer and Modelsim.
>
> Regards,
> Hanswww.ht-lab.com


We do appreciate, if it be possible to use a standalone Modelsim
version of project.
Would U plz upload it or give some clue.
Sincerely.
MrM


mrmoosavi@gmail.com
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to simulate WAN connection on cisco routers? jseva Hardware 1 10-09-2006 07:31 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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