Thread: [myhdl-list] Introduction and Question
Brought to you by:
jandecaluwe
From: Daryl W. <dw...@ou...> - 2012-12-17 23:55:00
|
Hello everybody, I thought I would introduce myself, since I've been monitoring this mailing list for a few months and dabbling with MyHDL for about the same amount of time. I have had some success, and I am probably looking at making it my primary language for IP development. My name is Daryl, and I am a graduate student at the University of Utah. A big focus of my research is in implementing real-time DSP algorithms for applications in wireless communications. To this end, I occasionally find myself requiring IP blocks that are not readily available to me, and I end up writing my own. I have had some success, but I'm still learning. I am extremely interested in MyHDL because of its ability for unit testing and incorporating Python-based algorithm code into my test benches. Currently, I use VHDL most heavily, although I learned HDL with Verilog. For various reasons, I would prefer the end product to be in VHDL. For this reason, I was wondering if any progress had been made regarding CoSimulation with GHDL? If not, is there any reason I shouldn't try to work on this myself (i.e., someone already knows that it won't work)? I found this link: http://www.myhdl.org/doku.php/dev:vhdl_cosim Which I think suggests that the VPI interface is supported although I'm not clear that it says that... I've never used cosimulation in VHDL or Verilog before, so I don't know much about it (yet). The manual for MyHDL 0.7 says that GHDL support is not there, unless I'm misreading it. Although, it lists GHDL in the list of possible simulators. Thanks and nice to meet you all, Daryl |
From: Christopher F. <chr...@gm...> - 2012-12-18 03:28:12
|
On 12/17/12 5:48 PM, Daryl Wasden wrote: > Hello everybody, > > I thought I would introduce myself, since I've been monitoring this mailing > list for a few months and dabbling with MyHDL for about the same amount > of time. I have had some success, and I am probably looking at making it > my primary language for IP development. > > My name is Daryl, and I am a graduate student at the University of Utah. A > big focus of my research is in implementing real-time DSP algorithms for > applications in wireless communications. To this end, I occasionally find > myself requiring IP blocks that are not readily available to me, and I end > up writing my own. I have had some success, but I'm still learning. I am > extremely interested in MyHDL because of its ability for unit testing and > incorporating Python-based algorithm code into my test benches. > Currently, I use VHDL most heavily, although I learned HDL with Verilog. Thanks for the introduction and welcome! > > For various reasons, I would prefer the end product to be in VHDL. For > this reason, I was wondering if any progress had been made regarding > CoSimulation with GHDL? If not, is there any reason I shouldn't try to > work on this myself (i.e., someone already knows that it won't work)? > It might be worth investigating if GHDL has updated the VPI/VHPI interface in the latest version of GHDL. I monitor the GHDL mailing-list briefly and have not seen any updates. I think the GHDL developers have mainly focused on a move to mcode. If the status of the VPI/VHPI has not changed it will be some work to implement cosimulation with GHDL. It will require the missing VPI functions implemented in GHDL. > I found this link: http://www.myhdl.org/doku.php/dev:vhdl_cosim > > Which I think suggests that the VPI interface is supported although I'm not > clear that it says that... I created this page and it was intended to be a working page towards GHDL co-simulation support. The page lists which VPI functions are supported in GHDL (as of 03-Feb-2010). The VPI function list was not complete enough to attempt a VPI port for GHDL. I do not know if things have changed. > I've never used cosimulation in VHDL or Verilog > before, so I don't know much about it (yet). The manual for MyHDL 0.7 > says that GHDL support is not there, unless I'm misreading it. Although, > it lists GHDL in the list of possible simulators. > GHDL is not available for cosimulation. But it is supported simulator. The flow for using GHDL is to convert the testbenches and run a full VHDL simulation that can be coordinated from Python. See the following for some more information. http://www.myhdl.org/doc/current/whatsnew/0.6.html#conversion-of-test-benches Regards, Chris |
From: Daryl W. <dw...@ou...> - 2012-12-18 07:10:04
|
Christopher Felton <chris.felton <at> gmail.com> writes: > snip > > It might be worth investigating if GHDL has updated the VPI/VHPI > interface in the latest version of GHDL. I monitor the GHDL > mailing-list briefly and have not seen any updates. I think the GHDL > developers have mainly focused on a move to mcode. If the status of the > VPI/VHPI has not changed it will be some work to implement cosimulation > with GHDL. It will require the missing VPI functions implemented in GHDL. > snip > > I created this page and it was intended to be a working page towards > GHDL co-simulation support. The page lists which VPI functions are > supported in GHDL (as of 03-Feb-2010). The VPI function list was not > complete enough to attempt a VPI port for GHDL. I do not know if things > have changed. > Okay, I investigated this. I searched the current development repository for the VPI functions that you had listed as Unknown in the table. It seems that the following have at least some implementation (at least with the bleeding edge repository version of GHDL). vpi_get_time() vpi_put_value() [ has a comment FIXME, so maybe not working too well ] These were found in the file at the following URL: http://svn.gna.org/svn/ghdl/trunk/translate/grt/grt-vpi.adb However, vpi_free_object() and vpi_register_systf() are declared as dummy functions (I'm assuming this means that they are not implemented), and I could not find vpi_control() anywhere. I'm not an expert ADA programmer so I can't be certain that they are functioning 100% according to specs, but they have something there. I probably don't want to worry about implementing the missing functionality in ADA myself, so I'll have to take the route you suggested below. > > GHDL is not available for cosimulation. But it is supported simulator. > The flow for using GHDL is to convert the testbenches and run a full > VHDL simulation that can be coordinated from Python. See the following > for some more information. > > http://www.myhdl.org/doc/current/whatsnew/0.6.html#conversion-of-test-benches > > Regards, > Chris > Thanks for pointing this out to me. Sorry I missed it. I'll look through it and see what I can do. If need be, I can always just write VHDL test benches for later simulations, just thinking it might be nice to use python... Thanks, Daryl |
From: Christopher F. <chr...@gm...> - 2012-12-18 11:50:32
|
On 12/18/12 1:09 AM, Daryl Wasden wrote: > Christopher Felton <chris.felton <at> gmail.com> writes: > >> > snip >> >> It might be worth investigating if GHDL has updated the VPI/VHPI >> interface in the latest version of GHDL. I monitor the GHDL >> mailing-list briefly and have not seen any updates. I think the GHDL >> developers have mainly focused on a move to mcode. If the status of the >> VPI/VHPI has not changed it will be some work to implement cosimulation >> with GHDL. It will require the missing VPI functions implemented in GHDL. >> > snip >> >> I created this page and it was intended to be a working page towards >> GHDL co-simulation support. The page lists which VPI functions are >> supported in GHDL (as of 03-Feb-2010). The VPI function list was not >> complete enough to attempt a VPI port for GHDL. I do not know if things >> have changed. >> > > Okay, I investigated this. I searched the current development repository for > the VPI functions that you had listed as Unknown in the table. It seems that > the following have at least some implementation (at least with the bleeding > edge repository version of GHDL). > > vpi_get_time() > vpi_put_value() [ has a comment FIXME, so maybe not working too well ] > > These were found in the file at the following URL: > http://svn.gna.org/svn/ghdl/trunk/translate/grt/grt-vpi.adb > > However, vpi_free_object() and vpi_register_systf() are declared as dummy > functions (I'm assuming this means that they are not implemented), and I > could not find vpi_control() anywhere. I'm not an expert ADA programmer > so I can't be certain that they are functioning 100% according to specs, but > they have something there. I probably don't want to worry about > implementing the missing functionality in ADA myself, so I'll have to take > the route you suggested below. > >> >> GHDL is not available for cosimulation. But it is supported simulator. >> The flow for using GHDL is to convert the testbenches and run a full >> VHDL simulation that can be coordinated from Python. See the following >> for some more information. >> >> http://www.myhdl.org/doc/current/whatsnew/0.6.html#conversion-of-test-benches >> >> Regards, >> Chris >> > > Thanks for pointing this out to me. Sorry I missed it. I'll look through > it and see what I can do. If need be, I can always just write VHDL test > benches for later simulations, just thinking it might be nice to use python... > > Thanks, > Daryl > There doesn't seem to be a free/open source VHDL simulator that fully supports VPI/VHPI. But you might be able to get one of the commercial simulators working with VHDL cosimulation. Because you are at a University, I don't think you will have issues getting a license/student version for free. Aldec's Active-HDL appears to have the most complete implementation of VHPI. Mentors Modelsim has their own FLI (foreign language interface) for VHDL cosimulation (not VHPI). You might want to look into one of these. At one point I started exploring Modelsim's interface (FLI not available with the Altera's free version, IIRC). I did not have the time to follow through and make any significant progress. We might want to poll the MyHDL community and see what the most popular VHDL simulator used is. Might be easier to get more help :) Here are a couple links to possibly get started. Modelsims FLI for VHDL: http://www.pldworld.com/_hdl/2/_ref/se_html/manual_html/c_vhdl32.html http://homepages.cae.wisc.edu/~ece554/new_website/ToolDoc/Modelsim_docs /docs/pdf/fli.pdf https://ece.uwaterloo.ca/~ece327/protected/modelsim/htmldocs/modelsim_se_fli/a_fli_intro11.html http://www.asic-world.com/specman/interface_simulator1.html Active-HDL VHPI: http://www.aldec.com/resources/manuals/Active-HDL/avh00452.htm http://www.aldec.com/resources/manuals/Active-HDL/avh00302.htm http://www.aldec.com/en/support/resources/documentation/articles/1456 http://www.aldec.com/en/support/resources/documentation/articles/1457 http://www.aldec.com/en/search?search_field=VHPI&search_button= Regards, Chris |
From: Angel E. <ang...@gm...> - 2012-12-18 11:58:40
|
On Tue, Dec 18, 2012 at 12:50 PM, Christopher Felton <chr...@gm...> wrote: > On 12/18/12 1:09 AM, Daryl Wasden wrote: >> Christopher Felton <chris.felton <at> gmail.com> writes: >> >>> >> snip >>> >>> It might be worth investigating if GHDL has updated the VPI/VHPI >>> interface in the latest version of GHDL. I monitor the GHDL >>> mailing-list briefly and have not seen any updates. I think the GHDL >>> developers have mainly focused on a move to mcode. If the status of the >>> VPI/VHPI has not changed it will be some work to implement cosimulation >>> with GHDL. It will require the missing VPI functions implemented in GHDL. >>> >> snip >>> >>> I created this page and it was intended to be a working page towards >>> GHDL co-simulation support. The page lists which VPI functions are >>> supported in GHDL (as of 03-Feb-2010). The VPI function list was not >>> complete enough to attempt a VPI port for GHDL. I do not know if things >>> have changed. >>> >> >> Okay, I investigated this. I searched the current development repository for >> the VPI functions that you had listed as Unknown in the table. It seems that >> the following have at least some implementation (at least with the bleeding >> edge repository version of GHDL). >> >> vpi_get_time() >> vpi_put_value() [ has a comment FIXME, so maybe not working too well ] >> >> These were found in the file at the following URL: >> http://svn.gna.org/svn/ghdl/trunk/translate/grt/grt-vpi.adb >> >> However, vpi_free_object() and vpi_register_systf() are declared as dummy >> functions (I'm assuming this means that they are not implemented), and I >> could not find vpi_control() anywhere. I'm not an expert ADA programmer >> so I can't be certain that they are functioning 100% according to specs, but >> they have something there. I probably don't want to worry about >> implementing the missing functionality in ADA myself, so I'll have to take >> the route you suggested below. >> >>> >>> GHDL is not available for cosimulation. But it is supported simulator. >>> The flow for using GHDL is to convert the testbenches and run a full >>> VHDL simulation that can be coordinated from Python. See the following >>> for some more information. >>> >>> http://www.myhdl.org/doc/current/whatsnew/0.6.html#conversion-of-test-benches >>> >>> Regards, >>> Chris >>> >> >> Thanks for pointing this out to me. Sorry I missed it. I'll look through >> it and see what I can do. If need be, I can always just write VHDL test >> benches for later simulations, just thinking it might be nice to use python... >> >> Thanks, >> Daryl >> > > There doesn't seem to be a free/open source VHDL simulator that fully > supports VPI/VHPI. But you might be able to get one of the commercial > simulators working with VHDL cosimulation. Because you are at a > University, I don't think you will have issues getting a license/student > version for free. Aldec's Active-HDL appears to have the most complete > implementation of VHPI. Mentors Modelsim has their own FLI (foreign > language interface) for VHDL cosimulation (not VHPI). > > You might want to look into one of these. At one point I started > exploring Modelsim's interface (FLI not available with the Altera's free > version, IIRC). I did not have the time to follow through and make any > significant progress. > > We might want to poll the MyHDL community and see what the most popular > VHDL simulator used is. Might be easier to get more help :) > Here we use Xilinx iSIM, Modelsim and we are also starting to use Xilinx' next generator simulator (called Vivado Simulator). Cheers, Angel |
From: Christopher F. <chr...@gm...> - 2012-12-18 12:02:09
|
<snip>. >> >> We might want to poll the MyHDL community and see what the most popular >> VHDL simulator used is. Might be easier to get more help :) >> > > Here we use Xilinx iSIM, Modelsim and we are also starting to use > Xilinx' next generator simulator (called Vivado Simulator). > > Cheers, > > Angel > Isim does not support VPI/DPI/VHPI, it has not support for external interfaces. Do you know if the Vivado Simulator is based on Isim? Does VivaSim support VHPI? Are you using a Vendor version of Modelsim? Or do you have one of the DE/PE/Questa (was SE)? Regards, Chris |
From: Angel E. <ang...@gm...> - 2012-12-19 21:46:42
|
On Tue, Dec 18, 2012 at 1:01 PM, Christopher Felton <chr...@gm...> wrote: > <snip>. >>> >>> We might want to poll the MyHDL community and see what the most popular >>> VHDL simulator used is. Might be easier to get more help :) >>> >> >> Here we use Xilinx iSIM, Modelsim and we are also starting to use >> Xilinx' next generator simulator (called Vivado Simulator). >> >> Cheers, >> >> Angel >> > > Isim does not support VPI/DPI/VHPI, it has not support for external > interfaces. Do you know if the Vivado Simulator is based on Isim? Does > VivaSim support VHPI? > > Are you using a Vendor version of Modelsim? Or do you have one of the > DE/PE/Questa (was SE)? > > Regards, > Chris Chris, we use the PE version. As for Vivado, I do not know if they support VHPI. I don't think it is based on ISIM. They seem to have started from scratch, which can only be a good thing given how bad ISE was. Cheers, Angel |
From: Daryl W. <dw...@ou...> - 2012-12-18 15:40:50
|
Christopher Felton <chris.felton <at> gmail.com> writes: > > <snip>. > >> > >> We might want to poll the MyHDL community and see what the most popular > >> VHDL simulator used is. Might be easier to get more help :) > >> > > > > Here we use Xilinx iSIM, Modelsim and we are also starting to use > > Xilinx' next generator simulator (called Vivado Simulator). > > > > Cheers, > > > > Angel > > > > Isim does not support VPI/DPI/VHPI, it has not support for external > interfaces. Do you know if the Vivado Simulator is based on Isim? Does > VivaSim support VHPI? > > Are you using a Vendor version of Modelsim? Or do you have one of the > DE/PE/Questa (was SE)? > > Regards, > Chris > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > Chris, I have a copy of model sim se with a research license in my lab. I have used it with vhdl extensively before this. I just don't have a license for working at home. Not a big deal. I will look into the FLI information you posted. Angel, I haven't looked at Vivado yet, but I plan to in the near future. If it does support cosimulation then I'll look into it sooner rather than later. Thanks, Daryl |
From: Christopher F. <chr...@gm...> - 2012-12-18 15:47:43
|
On 12/18/2012 9:40 AM, Daryl Wasden wrote: > Christopher Felton <chris.felton <at> gmail.com> writes: > >> >> <snip>. >>>> >>>> We might want to poll the MyHDL community and see what the most popular >>>> VHDL simulator used is. Might be easier to get more help :) >>>> >>> >>> Here we use Xilinx iSIM, Modelsim and we are also starting to use >>> Xilinx' next generator simulator (called Vivado Simulator). >>> >>> Cheers, >>> >>> Angel >>> >> >> Isim does not support VPI/DPI/VHPI, it has not support for external >> interfaces. Do you know if the Vivado Simulator is based on Isim? Does >> VivaSim support VHPI? >> >> Are you using a Vendor version of Modelsim? Or do you have one of the >> DE/PE/Questa (was SE)? >> >> Regards, >> Chris >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> > > Chris, > > I have a copy of model sim se with a research license in my lab. I > have used it with vhdl extensively before this. I just don't have > a license for working at home. Not a big deal. I will look into the FLI > information you posted. As a student (any type of student) you can get the student version of modelsim, Modelsim PE. This will have the FLI and majority of the features you are probably interested in. It sounds like there is, at least a small majority using Modelsim (I too use Modelsim in addition to NCsim, CVC). Modelsim probably is a reasonable choice. The only downside - I believe - is that it will be hard to leverage the existing VPI examples for the mentor FLI. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2012-12-18 15:55:10
|
<snip> > > As a student (any type of student) you can get the student version of > modelsim, Modelsim PE. This will have the FLI and majority of the > features you are probably interested in. > <snip> Ooopppss, forgot the link http://model.com/content/modelsim-pe-student-edition-hdl-simulation .chris |
From: Daryl W. <dw...@ou...> - 2012-12-18 17:49:32
|
Christopher Felton <chris.felton <at> gmail.com> writes: > > <snip> > > > > As a student (any type of student) you can get the student version of > > modelsim, Modelsim PE. This will have the FLI and majority of the > > features you are probably interested in. > > > <snip> > > Ooopppss, forgot the link > http://model.com/content/modelsim-pe-student-edition-hdl-simulation > > .chris > Thanks, Chris. I'll look into the Verilog VPI examples so I have some idea where to start. Mainly, to understand what the C modules on the myhdl side are doing. Then I'll see if I can write my own for ModelSim's FLI. Might take me a little while since I have other deadlines/projects that I have to attend to, but I'm hopeful I can get something working before too long. I appreciate your help/links. -Daryl |
From: Daryl W. <dw...@ou...> - 2012-12-18 18:10:41
|
Okay, looking in the myhdl directory, there are no C modules... This confuses me, because the manual says that a PLI module for each simulator written in C is required... Am I missing something obvious? Anyway, I know you are busy. I'll figure this out on my own if necessary. I don't want to be a headache to anyone else. I'll post again when I have something working that is worth sharing. I'm sure I can get something working after reading through the FLI documentation and understanding the current cosimulation options a little better even if it takes a little while... -Daryl |
From: Christopher F. <chr...@gm...> - 2012-12-18 19:15:49
|
On 12/18/2012 12:10 PM, Daryl Wasden wrote: > Okay, looking in the myhdl directory, there are no C modules... This > confuses me, because the manual says that a PLI module for each > simulator written in C is required... Am I missing something obvious? > > Anyway, I know you are busy. I'll figure this out on my own if necessary. > I don't want to be a headache to anyone else. I'll post again when I have > something working that is worth sharing. I'm sure I can get something > working after reading through the FLI documentation and understanding > the current cosimulation options a little better even if it takes a little > while... > > -Daryl > > > Did you download the latest release or checkout the code from mercurial? The C-VPI files are in the cosimulation directory at the top-level. Here is a link to the webview of the merurial repository of the cver version. http://hg.myhdl.org/cgi-bin/hgwebdir.cgi/myhdl/file/41d4a8b13804/cosimulation/cver two directories above. http://hg.myhdl.org/cgi-bin/hgwebdir.cgi/myhdl/file/41d4a8b13804/ I am fairly sure the 0.7 release has the same structure. The files would be in the unzipped tar.gz file and not the site-packages dirs. Hope that helps, Chris |
From: Norbo <Nor...@gm...> - 2012-12-18 18:39:50
|
Am 18.12.2012, 18:49 Uhr, schrieb Daryl Wasden <dw...@ou...>: > Christopher Felton <chris.felton <at> gmail.com> writes: > >> >> <snip> >> > >> > As a student (any type of student) you can get the student version of >> > modelsim, Modelsim PE. This will have the FLI and majority of the >> > features you are probably interested in. >> > >> <snip> >> >> Ooopppss, forgot the link >> http://model.com/content/modelsim-pe-student-edition-hdl-simulation >> >> .chris >> > > Thanks, Chris. I'll look into the Verilog VPI examples so I have some > idea > where to start. Mainly, to understand what the C modules on the myhdl > side are doing. Then I'll see if I can write my own for ModelSim's FLI. > Might take me a little while since I have other deadlines/projects that I > have to attend to, but I'm hopeful I can get something working before > too long. I appreciate your help/links. > > -Daryl > Just found these nice demo. ;) http://www.ht-lab.com/howto/uart2fli/uart2fli.html o use mostly modelsim. greetings Norbo |
From: Daryl W. <dw...@ou...> - 2012-12-18 19:14:27
|
> Just found these nice demo. ;) > http://www.ht-lab.com/howto/uart2fli/uart2fli.html > o use mostly modelsim. > > greetings > Norbo > Thanks, Norbo. I found the C files for VPI on source forge, to. So, that should help as well. -Daryl |
From: Daryl W. <dw...@ou...> - 2012-12-18 20:19:24
|
> Did you download the latest release or checkout the code from mercurial? > The C-VPI files are in the cosimulation directory at the top-level. > > I am fairly sure the 0.7 release has the same structure. The files > would be in the unzipped tar.gz file and not the site-packages dirs. > > Hope that helps, > Chris > I found the files, thanks. Is it recommended to use the 0.8dev or the official 0.7? Thus far, I've been using the latest release (0.7). I figured it was the officially released version and therefore assumed it was more stable, but I can switch if 0.8dev is considered stable enough for use or is recommended. Daryl |