Re: myhdl with cython?

Edward Vidal <[email protected]> Wed, 27 Jan 2016 16:01:21 +0000 (UTC)
Newsgroups gmane.comp.python.myhdl
Message-ID <[email protected]>
Hello All,
When you convert to Verilog, I see that `timescale 1ns/10ps near the top of the file .I don't see any timing information when you convert to VHDL.
On the CAT-Board the default clock is 100MHz & on XulA2-LX9 the default clock is 12MHz.With the DCM I convert to 120MHz.
For my simulation my clock is always 20nsec or 50MHz.  Why? Can someone explain?
    @always(delay(10))
    def clkgen():
        clock.next = not clock
If my simulation takes 1m35.611s using pypy,  but total simulation time is 9139190 ns. 
What is the FPGA time?

What is taking most of time?
Modified to send more values to simulation.
Now pypy is 2.3 times faster than python.
pi@mysshserver ~/jpeg-2000-test/pc_fast_blinker_jpeg $ time python test_top.py --test

real    3m38.582s
user    3m36.950s
sys    0m0.630s

pi@mysshserver ~/jpeg-2000-test/pc_fast_blinker_jpeg $ rm -f tb.vcd*pi@mysshserver ~/jpeg-2000-test/pc_fast_blinker_jpeg $ time /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy test_top.py --test
real    1m35.611s
user    1m34.780s
sys    0m0.800s

Thanks, 

 Edward Vidal Jr. e-mail [email protected] 915-595-1613 

   

 On Tuesday, January 26, 2016 2:51 PM, Edward Vidal <[email protected]> wrote:
 

 Hello All,I was reading David's post and found it very interesting.
I tested on a RPi2B and did not get the results that David  posted.
At first, I thought the Pillow was taking all of time. 

My question, what would taking all of time?
These are the steps that I used.
Testing pypy on RPi2B jessie
>From the site below 
http://pypy.org/download.html
Python2.7 compatible PyPy 4.0.1
https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux-armhf-raspbian.tar.bz2

wget https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux-armhf-raspbian.tar.bz2
bzip2 -d pypy-4.0.1-linux-armhf-raspbian.tar.bz2

cd /opt/
sudo tar xvf /home/pi/pypy-4.0.1-linux-armhf-raspbian.tar

Needed to install myhdl in pypy

cd ~/myhdl/
sudo /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy setup.py  install

Needed to install pip in pypy

wget https://bootstrap.pypa.io/get-pip.py
sudo /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy get-pip.py
Needed to install Pillow  in pypy
sudo /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy -m pip install Pillow 

ls /opt/pypy-4.0.1-linux-armhf-raspbian/site-packages/
easy_install.py   _markerlib  myhdl-1.0dev-py2.7.egg-info  Pillow-3.1.0.dist-info  pip-8.0.2.dist-info  README      setuptools-19.6.dist-info  wheel-0.26.0.dist-info
easy_install.pyc  myhdl       PIL                          pip                     pkg_resources        setuptools  wheel

Testing the times to run with python & pypy

time python test_top.py --test
real    0m8.363s
user    0m8.210s
sys        0m0.080s


time /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy test_top.py --test
 
real    0m40.811s
user    0m38.620s
sys        0m0.480s

I created a version that did not use the Image libtime python  nopil_test_top.py --test
real    0m7.943s
user    0m7.790s
sys    0m0.140s

time /opt/pypy-4.0.1-linux-armhf-raspbian/bin/pypy nopil_test_top.py --test
 real    0m26.320s
user    0m26.060s
sys    0m0.220s

As before the pypy took longer than the python one.
It appears that the Image reading only took less than .5 sec.
Did I fail to do something?https://github.com/develone/jpeg-2000-test/tree/master/pc_fast_blinker_jpeg
 Do you not get the benefit, until you exceed the time, to convert the python to compiled?
Initially I was only testing a few values.  To do the complete image the test bench will grow very quickly.  
Regards,
Edward Vidal Jr. e-mail [email protected] 915-595-1613 

    On Tuesday, January 26, 2016 8:44 AM, David Belohrad <[email protected]> wrote:
 

 belohrad@beesknees:~/git/didt/MyHDL/FIR$ pypy --version
Python 2.7.8 (2.4.0+dfsg-3, Dec 20 2014, 13:30:46)
[PyPy 2.4.0 with GCC 4.9.2]

debian (testing?)

Christopher Felton <[email protected]> writes:

> On 1/26/2016 8:51 AM, David Belohrad wrote:
>> Just checked
>>
>> and it seems that it improves performance by roughly 8 times! That is
>> indeed massive and I think I'm around the times I get with modelsim.
>>
>
> Which version of pypy did you use?
>
> Regards,
> Chris
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> myhdl-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/myhdl-list

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list


   
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list