myhdl-list Mailing List for MyHDL (Page 79)
Brought to you by:
jandecaluwe
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(14) |
Nov
(4) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
(10) |
Mar
(19) |
Apr
(14) |
May
(1) |
Jun
(4) |
Jul
(10) |
Aug
|
Sep
(2) |
Oct
(7) |
Nov
(17) |
Dec
(12) |
2005 |
Jan
(6) |
Feb
(10) |
Mar
(17) |
Apr
(10) |
May
(9) |
Jun
(5) |
Jul
(26) |
Aug
(34) |
Sep
(10) |
Oct
(38) |
Nov
(71) |
Dec
(74) |
2006 |
Jan
(20) |
Feb
(20) |
Mar
(7) |
Apr
(2) |
May
(13) |
Jun
|
Jul
|
Aug
(4) |
Sep
(37) |
Oct
(43) |
Nov
(30) |
Dec
(33) |
2007 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
(30) |
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(8) |
Oct
(13) |
Nov
|
Dec
(4) |
2008 |
Jan
(13) |
Feb
(46) |
Mar
(25) |
Apr
(7) |
May
(20) |
Jun
(73) |
Jul
(38) |
Aug
(47) |
Sep
(24) |
Oct
(18) |
Nov
(9) |
Dec
(36) |
2009 |
Jan
(31) |
Feb
(24) |
Mar
(73) |
Apr
(13) |
May
(47) |
Jun
(28) |
Jul
(36) |
Aug
(2) |
Sep
(5) |
Oct
(8) |
Nov
(16) |
Dec
(29) |
2010 |
Jan
(34) |
Feb
(18) |
Mar
(18) |
Apr
(5) |
May
|
Jun
(24) |
Jul
(53) |
Aug
(3) |
Sep
(18) |
Oct
(33) |
Nov
(19) |
Dec
(15) |
2011 |
Jan
(9) |
Feb
(4) |
Mar
(39) |
Apr
(213) |
May
(86) |
Jun
(46) |
Jul
(22) |
Aug
(11) |
Sep
(78) |
Oct
(59) |
Nov
(38) |
Dec
(24) |
2012 |
Jan
(9) |
Feb
(22) |
Mar
(89) |
Apr
(55) |
May
(222) |
Jun
(86) |
Jul
(57) |
Aug
(32) |
Sep
(49) |
Oct
(69) |
Nov
(12) |
Dec
(35) |
2013 |
Jan
(67) |
Feb
(39) |
Mar
(18) |
Apr
(42) |
May
(79) |
Jun
(1) |
Jul
(19) |
Aug
(18) |
Sep
(54) |
Oct
(79) |
Nov
(9) |
Dec
(26) |
2014 |
Jan
(30) |
Feb
(44) |
Mar
(26) |
Apr
(11) |
May
(39) |
Jun
(1) |
Jul
(89) |
Aug
(15) |
Sep
(7) |
Oct
(6) |
Nov
(20) |
Dec
(27) |
2015 |
Jan
(107) |
Feb
(106) |
Mar
(130) |
Apr
(90) |
May
(147) |
Jun
(28) |
Jul
(53) |
Aug
(16) |
Sep
(23) |
Oct
(7) |
Nov
|
Dec
(16) |
2016 |
Jan
(86) |
Feb
(41) |
Mar
(38) |
Apr
(31) |
May
(37) |
Jun
(11) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(1) |
Nov
(5) |
Dec
(3) |
2017 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
(1) |
Feb
(1) |
Mar
(7) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(3) |
Dec
|
2020 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
(11) |
2022 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2024 |
Jan
(1) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christopher F. <chr...@gm...> - 2012-09-28 15:13:21
|
On 9/28/2012 9:21 AM, Tom Dillon wrote: > > On 09/28/2012 08:53 AM, Christopher Felton wrote: >> On 9/28/2012 8:25 AM, Tom Dillon wrote: >>> Angel, >>> >>> My quick answer is to start in one of two areas. >>> >>> 1. Use MyHDL to design and test modules that are included in your VHDL >>> design. Make the modules general purpose with parameters so that they >>> are easily reused. The test bench and module source will be in MyHDL. >>> >>> 2. Use MyHDL as a test bench for existing VHDL modules. You can get far >>> better test coverage quicker with this approach. Of course now we are >>> talking about co-simulation, so you will have to be using a VHDL >>> simulator that is supported or modify an existing interface to work with >>> your simulator (usually not much work). I use Aldec Riviera and it works >>> great. >>> >>> I would start there. >>> >>> Tom >>> >> Tom, >> >> Are you using cosimulation with Aldec and VHDL? If so did you have to >> do small mods for the VHPI interface? >> >> Regards, >> Chris >> > Chris, > > Great question. It had been so long since I did that I forgot. I am > using VPI (not VHPI) to connect to the Riviera simulator. I have a mixed > mode version of Riviera so that allows me to simulate Verilog or VHDL > modules. > > I suspect VHPI would work as well. > > Tom > > Strangely modelsim does not appear to support VPI with VHDL directly, you have to use their FLI interface. But I do not know what happens if you do a mixed Verilog/VHDL sim in Modelsim. My guess is, you have to do a Verilog mixed VHDL sim (top-level Verilog) and it would work. If that is true, the quick path for MyHDL-VHDL cosim would be this approach (mixed verilog/vhdl requires Modelsim SE or Questa). Regards, Chris |
From: Tom D. <td...@di...> - 2012-09-28 14:21:49
|
On 09/28/2012 08:53 AM, Christopher Felton wrote: > On 9/28/2012 8:25 AM, Tom Dillon wrote: >> Angel, >> >> My quick answer is to start in one of two areas. >> >> 1. Use MyHDL to design and test modules that are included in your VHDL >> design. Make the modules general purpose with parameters so that they >> are easily reused. The test bench and module source will be in MyHDL. >> >> 2. Use MyHDL as a test bench for existing VHDL modules. You can get far >> better test coverage quicker with this approach. Of course now we are >> talking about co-simulation, so you will have to be using a VHDL >> simulator that is supported or modify an existing interface to work with >> your simulator (usually not much work). I use Aldec Riviera and it works >> great. >> >> I would start there. >> >> Tom >> > Tom, > > Are you using cosimulation with Aldec and VHDL? If so did you have to > do small mods for the VHPI interface? > > Regards, > Chris > Chris, Great question. It had been so long since I did that I forgot. I am using VPI (not VHPI) to connect to the Riviera simulator. I have a mixed mode version of Riviera so that allows me to simulate Verilog or VHDL modules. I suspect VHPI would work as well. Tom > > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-28 13:54:19
|
On 9/28/2012 8:25 AM, Tom Dillon wrote: > Angel, > > My quick answer is to start in one of two areas. > > 1. Use MyHDL to design and test modules that are included in your VHDL > design. Make the modules general purpose with parameters so that they > are easily reused. The test bench and module source will be in MyHDL. > > 2. Use MyHDL as a test bench for existing VHDL modules. You can get far > better test coverage quicker with this approach. Of course now we are > talking about co-simulation, so you will have to be using a VHDL > simulator that is supported or modify an existing interface to work with > your simulator (usually not much work). I use Aldec Riviera and it works > great. > > I would start there. > > Tom > Tom, Are you using cosimulation with Aldec and VHDL? If so did you have to do small mods for the VHPI interface? Regards, Chris |
From: Tom D. <td...@di...> - 2012-09-28 13:25:56
|
Angel, My quick answer is to start in one of two areas. 1. Use MyHDL to design and test modules that are included in your VHDL design. Make the modules general purpose with parameters so that they are easily reused. The test bench and module source will be in MyHDL. 2. Use MyHDL as a test bench for existing VHDL modules. You can get far better test coverage quicker with this approach. Of course now we are talking about co-simulation, so you will have to be using a VHDL simulator that is supported or modify an existing interface to work with your simulator (usually not much work). I use Aldec Riviera and it works great. I would start there. Tom On 09/28/2012 02:26 AM, Angel Ezquerra wrote: > Hi, > > For the past couple of years I've been following the MyHDL project > with a lot of interest. I've been subscribed to the mailing list and > followed many of the interesting discussions in here. I've done a few > of the examples on my spare time and I have read the documentation a > couple of times. > > I really like the language. I find it very clear and simply way nicer > than VHDL, which is what we use in our projects where I work. I have > quite a lot of experience with Python, and at work I sometimes use it > with some of its great scientific packages, such as simpy, scipy, > matplotlib, etc, mainly for simulation purposes although most of my > colleagues use Matlab for this. > > That being said, I have trouble coming up with a good way to integrate > MyHDL into our existing workflows. I'm looking for advice here to see > if there is a way that we could use MyHDL to improve our productivity. > > Our current setup is as follows: > > - We use Xilinx FPGAs (Spartan and Virtex 5 and 6 and probably Kintex > or Virtex 7 soon). > - Our firmware code is 100% VHDL. > - We use the latest version of the Xilinx ISE environment (which > unfortunately is pretty weak, specially in the editing and code > exploration departments). > - Some of us are also using the excellent Sigasi editor (which I > discovered thanks to this list). For now we are using the basic > edition which is nice but we hope to be able to buy a few licenses > soon. > - We use some Xilinx IP cores, which come as an NGC plus a VHDL simulation file. > - We receive a basic firmware "shell" from our hardware team, which, > basically, is the top VHDL file of the design. This "shell" sets up > the system clocks, instantiates the different devices that are used to > connect the FPGA firmware to the outside world (i.e. the different > ports, etc), as well as the memories, and other devices that are > present on the FPGA and on its board. > - That "shell" also contains an instance of the actual "top > entity" that is the one that we create. > - They also give us the basic "constraints file" which selects the > pinout, etc. > - We have no control over what we receive from the HW team. We > must use what they give us "as is". > - We do not use any custom TCL scripts to build our firmware. We just > use the ISE "Generate Programming File" command. > - We use either Modelsim or the builtin ISE ISim simulator to run our > simulations. We are exploring the possibility of using Xilinx' new > Vivado Simulator as well. > - We usually create a "high level" Matlab or python based simulation > models of our system. The model is not necessarily bit accurate to the > actual VHDL implementation, but we try to make it so that it is able > to generate the inputs necessary to drive our VHDL test benches > (including configuration and data), and even our compiled firmware > (mostly configuration) > - We create VHDL test benches for most (although sadly not all) of our > modules. These test benches are usually quite simple. They just read > the inputs from some files (generated with our Matlab or python > simulators) and save the outputs so that they can be compared to some > "golden" outputs (usually generated with our high level simulators). > - When there are issues we often use the test benches to simulate > the models and we use the (not so good) visualization capabilities of > Modelsim to debug. > - We also tend to use ChipScope to add "logic analyzer modules" to > our firmware so that we can debug "live" some specially tricky issues. > - We also use a logic analyzer port to output data that is then > captured by an external logic analizer. This is necessary when the > amount of data to capture is so great that it would not fit on a > ChipScope block. > > What we definitely cannot do is introduce huge changes to our > development practices. I am sure that there are plenty of things that > we could do differently and that we should (and probably will) > improve. However I'd like to introduce this new technology gradually, > and once people are more comfortable with it we could do bigger > changes to our work flow. > > The way I see it there are a few barriers that make it hard for us to > use MyHDL. It is likely that some of these are moot (i.e. perhaps when > we start using MyHDL I'll realize that they are not important), but > for now they seem things that we should deal with: > > 1. The MyHDL code may need to interface with existing blocks, > particularly with IP cores. This results in several problems: > - It would make it hard to run simulations on the "MyHDL world" > since we do not have MyHDL models for the Xilinx IP cores. > - I got the impression that the MyHDL to VHDL "interface" is not > that clean and that the process is manual (I have not looked much into > this, so I may be wrong). > 2. We should come up with a way to automatically generate the VHDL > from the MyHDL when we generate our programming file. > 3. There is no integration (AFAIK) between MyHDL and iSIM or Modelsim > (at least on Windows). > 4. For legacy reasons a lot of our code uses the IEEE.STD_LOGIC_ARITH > and IEEE.STD_LOGIC_UNSIGNED packages, while MyHDL uses NUMERIC_STD > (and rightly so). There may be issues mixing both sets of libraries. > 5. There is no editor integration (not even with Sigasi). > 6. I believe that the fact that the VHDL code that MyHDL generates is > "flat" is a problem, because it makes it harder to introduce MyHDL > little by little. > - This may be just my perception and turn out to be a non issue, > but I think that if MyHDL generated regular structured code (e.g. if > you could tell MyHDL "place all these processes on a single entity > named foo") it would be much easier to start using MyHDL to create > smaller modules that could be added to our regular VHDL project "as > is". > > There are probably other issues that I have not thought about, and > maybe some of these are not a problem at all. > > I'd like to get your opinions and your advice on whether you think it > makes sense to try to fit MyHDL into our workflow. Perhaps it does not > make sense unless you use MyHDL from start to end, but I hope it is > possible. > > Cheers, > > Angel > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-28 13:23:44
|
<snip> > The way I see it there are a few barriers that make it hard for us to > use MyHDL. It is likely that some of these are moot (i.e. perhaps when > we start using MyHDL I'll realize that they are not important), but > for now they seem things that we should deal with: > > 1. The MyHDL code may need to interface with existing blocks, > particularly with IP cores. This results in several problems: > - It would make it hard to run simulations on the "MyHDL world" > since we do not have MyHDL models for the Xilinx IP cores. > - I got the impression that the MyHDL to VHDL "interface" is not > that clean and that the process is manual (I have not looked much into > this, so I may be wrong). You would still use the VHDL environment interfacing to IP cores for simulation would be the same. In your MyHDL "IP" development you would need to generate a model (you can stub it out) or cosim. > 2. We should come up with a way to automatically generate the VHDL > from the MyHDL when we generate our programming file. Yes, you can create a python script that drives everything (Python world domination). > 3. There is no integration (AFAIK) between MyHDL and iSIM or Modelsim > (at least on Windows). Not possible with iSim, possible with Modelsim but it will take some work. There is other cosim VHDL interest. > 4. For legacy reasons a lot of our code uses the IEEE.STD_LOGIC_ARITH > and IEEE.STD_LOGIC_UNSIGNED packages, while MyHDL uses NUMERIC_STD > (and rightly so). There may be issues mixing both sets of libraries. I don't believe this is an issue, because VHDL is strongly typed you have to do explicit conversion going from one type to another. It can be a pain but shouldn't be a problem. I have had this issue in the past where all my VHDL used numeric_std and I had to add type conversion at the interfaces to the legacy HDL. > 5. There is no editor integration (not even with Sigasi). ?? What do you mean by editor integration. MyHDL is simply Python, pydev in Eclipse works with other Eclipse packages. > 6. I believe that the fact that the VHDL code that MyHDL generates is > "flat" is a problem, because it makes it harder to introduce MyHDL > little by little. > - This may be just my perception and turn out to be a non issue, > but I think that if MyHDL generated regular structured code (e.g. if > you could tell MyHDL "place all these processes on a single entity > named foo") it would be much easier to start using MyHDL to create > smaller modules that could be added to our regular VHDL project "as > is". I don't see this as an issue? If you have an existing HDL design, say the top level looks like this (pseudo code, err myhdl). i1 = block_vhdl(...) i2 = block_vhdl(...) i3 = block_myhdl_vhdl(...) The "i3" module is the "flat" myhdl converted to VHDL. There are some limitations but not many and most are manageable. I don't think this should be a concern. > > There are probably other issues that I have not thought about, and > maybe some of these are not a problem at all. > > I'd like to get your opinions and your advice on whether you think it > makes sense to try to fit MyHDL into our workflow. Perhaps it does not > make sense unless you use MyHDL from start to end, but I hope it is > possible. > > Cheers, > > Angel > |
From: Christopher F. <chr...@gm...> - 2012-09-28 13:12:25
|
On 9/28/2012 7:31 AM, Angel Ezquerra wrote: > On Fri, Sep 28, 2012 at 2:16 PM, Christopher Felton > <chr...@gm...> wrote: >> On 9/28/2012 2:26 AM, Angel Ezquerra wrote: >>> Hi, >>> >>> For the past couple of years I've been following the MyHDL project >>> with a lot of interest. I've been subscribed to the mailing list and >>> followed many of the interesting discussions in here. I've done a few >>> of the examples on my spare time and I have read the documentation a >>> couple of times. >>> >>> I really like the language. I find it very clear and simply way nicer >>> than VHDL, which is what we use in our projects where I work. I have >>> quite a lot of experience with Python, and at work I sometimes use it >>> with some of its great scientific packages, such as simpy, scipy, >>> matplotlib, etc, mainly for simulation purposes although most of my >>> colleagues use Matlab for this. >>> >>> That being said, I have trouble coming up with a good way to integrate >>> MyHDL into our existing workflows. I'm looking for advice here to see >>> if there is a way that we could use MyHDL to improve our productivity. >>> >> <snip> >> >> My quick two cents is that you adopt the "IP" developed >> with MyHDL approach. You start using the tool this way. >> Your co-workers might never know you are using MyHDL. > > I'm not sure I understand what you mean. Do you mean that I would > write my code on MyHDL, generate the VHDL and publish the generated > VHDL as an "IP"? Essentially, but I don't mean that you have to create a netlist and integrate. Simply take the generated VHDL and use in the design. > > If that is the case I fear that the fact that the automatically > generated code is flat may be a problem. Depending on how big are the > modules that I work on it the resulting VHDL could be pretty big, > couldn't it? I guess my colleagues would find that odd :-P Why would a large VHDL be an issue? I don't think it is. If you really need the hierarchy there are options, just takes a little more work. > >> As you indicate, there are some short comings to this >> approach. One of the items you suggested is using MyHDL >> for top-level simulation/verification (cosimulation with >> VHDL). What VHDL simulator are you using? > > We currently use Modelsim and ISim, on Windows. Isim doesn't support PLI/VPI/DPI/VHPI you won't be able to do cosim with Isim. There's other interest with mti VHDL cosim, this has a decent change of being developed. If that occurs, you can start developing a top-level verification environment and blow the socks off your co-workers! They will be utterly amazed. > >> Since you have an established flow, I imagine it will be >> hard to radically change. You will need to methodically >> work MyHDL in. My best guess, this would mean developing >> individual pieces with MyHDL then incorporating into the >> system. > > That is what I'd like to do but I don't quite see a good way to do so, > given the concerns that I stated on my first email. I believe all the concerns are manageable. I guess nothing really stood out that needed to be addressed. Let me look at the bullet list again. > >> Then second, you could start building your system sim and >> verification in MyHDL. This will require VHDL cosim. There >> might be enough interest to spend some cycles getting VHDL >> cosim working, the hold back has been access to commerical >> simulators. > > Being able to write test benches in python would be awesome, that is > for sure! I really dislike how limited is VHDL for IO and other non > synthesizable stuff. > > Angel |
From: Angel E. <ang...@gm...> - 2012-09-28 12:31:48
|
On Fri, Sep 28, 2012 at 2:16 PM, Christopher Felton <chr...@gm...> wrote: > On 9/28/2012 2:26 AM, Angel Ezquerra wrote: >> Hi, >> >> For the past couple of years I've been following the MyHDL project >> with a lot of interest. I've been subscribed to the mailing list and >> followed many of the interesting discussions in here. I've done a few >> of the examples on my spare time and I have read the documentation a >> couple of times. >> >> I really like the language. I find it very clear and simply way nicer >> than VHDL, which is what we use in our projects where I work. I have >> quite a lot of experience with Python, and at work I sometimes use it >> with some of its great scientific packages, such as simpy, scipy, >> matplotlib, etc, mainly for simulation purposes although most of my >> colleagues use Matlab for this. >> >> That being said, I have trouble coming up with a good way to integrate >> MyHDL into our existing workflows. I'm looking for advice here to see >> if there is a way that we could use MyHDL to improve our productivity. >> > <snip> > > My quick two cents is that you adopt the "IP" developed > with MyHDL approach. You start using the tool this way. > Your co-workers might never know you are using MyHDL. I'm not sure I understand what you mean. Do you mean that I would write my code on MyHDL, generate the VHDL and publish the generated VHDL as an "IP"? If that is the case I fear that the fact that the automatically generated code is flat may be a problem. Depending on how big are the modules that I work on it the resulting VHDL could be pretty big, couldn't it? I guess my colleagues would find that odd :-P > As you indicate, there are some short comings to this > approach. One of the items you suggested is using MyHDL > for top-level simulation/verification (cosimulation with > VHDL). What VHDL simulator are you using? We currently use Modelsim and ISim, on Windows. > Since you have an established flow, I imagine it will be > hard to radically change. You will need to methodically > work MyHDL in. My best guess, this would mean developing > individual pieces with MyHDL then incorporating into the > system. That is what I'd like to do but I don't quite see a good way to do so, given the concerns that I stated on my first email. > Then second, you could start building your system sim and > verification in MyHDL. This will require VHDL cosim. There > might be enough interest to spend some cycles getting VHDL > cosim working, the hold back has been access to commerical > simulators. Being able to write test benches in python would be awesome, that is for sure! I really dislike how limited is VHDL for IO and other non synthesizable stuff. Angel |
From: Angel E. <ang...@gm...> - 2012-09-28 12:22:59
|
On Fri, Sep 28, 2012 at 2:07 PM, Christopher Felton <chr...@gm...> wrote: > On 9/28/2012 2:26 AM, Angel Ezquerra wrote: >> Hi, >> >> For the past couple of years I've been following the MyHDL project >> with a lot of interest. I've been subscribed to the mailing list and >> followed many of the interesting discussions in here. I've done a few >> of the examples on my spare time and I have read the documentation a >> couple of times. >> >> I really like the language. I find it very clear and simply way nicer >> than VHDL, which is what we use in our projects where I work. I have >> quite a lot of experience with Python, and at work I sometimes use it >> with some of its great scientific packages, such as simpy, scipy, >> matplotlib, etc, mainly for simulation purposes although most of my >> colleagues use Matlab for this. >> > > Do you mean "simpy" or sympy? One is a CAS and one is > a discrete event simulator using generators and decorators > (hmm, sounds familiar). > > .chris > I misspelled it. I meant sympy (http://sympy.org/en/index.html)! Angel |
From: Christopher F. <chr...@gm...> - 2012-09-28 12:16:26
|
On 9/28/2012 2:26 AM, Angel Ezquerra wrote: > Hi, > > For the past couple of years I've been following the MyHDL project > with a lot of interest. I've been subscribed to the mailing list and > followed many of the interesting discussions in here. I've done a few > of the examples on my spare time and I have read the documentation a > couple of times. > > I really like the language. I find it very clear and simply way nicer > than VHDL, which is what we use in our projects where I work. I have > quite a lot of experience with Python, and at work I sometimes use it > with some of its great scientific packages, such as simpy, scipy, > matplotlib, etc, mainly for simulation purposes although most of my > colleagues use Matlab for this. > > That being said, I have trouble coming up with a good way to integrate > MyHDL into our existing workflows. I'm looking for advice here to see > if there is a way that we could use MyHDL to improve our productivity. > <snip> My quick two cents is that you adopt the "IP" developed with MyHDL approach. You start using the tool this way. Your co-workers might never know you are using MyHDL. As you indicate, there are some short comings to this approach. One of the items you suggested is using MyHDL for top-level simulation/verification (cosimulation with VHDL). What VHDL simulator are you using? Since you have an established flow, I imagine it will be hard to radically change. You will need to methodically work MyHDL in. My best guess, this would mean developing individual pieces with MyHDL then incorporating into the system. Then second, you could start building your system sim and verification in MyHDL. This will require VHDL cosim. There might be enough interest to spend some cycles getting VHDL cosim working, the hold back has been access to commerical simulators. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2012-09-28 12:08:21
|
On 9/28/2012 2:26 AM, Angel Ezquerra wrote: > Hi, > > For the past couple of years I've been following the MyHDL project > with a lot of interest. I've been subscribed to the mailing list and > followed many of the interesting discussions in here. I've done a few > of the examples on my spare time and I have read the documentation a > couple of times. > > I really like the language. I find it very clear and simply way nicer > than VHDL, which is what we use in our projects where I work. I have > quite a lot of experience with Python, and at work I sometimes use it > with some of its great scientific packages, such as simpy, scipy, > matplotlib, etc, mainly for simulation purposes although most of my > colleagues use Matlab for this. > Do you mean "simpy" or sympy? One is a CAS and one is a discrete event simulator using generators and decorators (hmm, sounds familiar). .chris |
From: Angel E. <ang...@gm...> - 2012-09-28 07:27:08
|
Hi, For the past couple of years I've been following the MyHDL project with a lot of interest. I've been subscribed to the mailing list and followed many of the interesting discussions in here. I've done a few of the examples on my spare time and I have read the documentation a couple of times. I really like the language. I find it very clear and simply way nicer than VHDL, which is what we use in our projects where I work. I have quite a lot of experience with Python, and at work I sometimes use it with some of its great scientific packages, such as simpy, scipy, matplotlib, etc, mainly for simulation purposes although most of my colleagues use Matlab for this. That being said, I have trouble coming up with a good way to integrate MyHDL into our existing workflows. I'm looking for advice here to see if there is a way that we could use MyHDL to improve our productivity. Our current setup is as follows: - We use Xilinx FPGAs (Spartan and Virtex 5 and 6 and probably Kintex or Virtex 7 soon). - Our firmware code is 100% VHDL. - We use the latest version of the Xilinx ISE environment (which unfortunately is pretty weak, specially in the editing and code exploration departments). - Some of us are also using the excellent Sigasi editor (which I discovered thanks to this list). For now we are using the basic edition which is nice but we hope to be able to buy a few licenses soon. - We use some Xilinx IP cores, which come as an NGC plus a VHDL simulation file. - We receive a basic firmware "shell" from our hardware team, which, basically, is the top VHDL file of the design. This "shell" sets up the system clocks, instantiates the different devices that are used to connect the FPGA firmware to the outside world (i.e. the different ports, etc), as well as the memories, and other devices that are present on the FPGA and on its board. - That "shell" also contains an instance of the actual "top entity" that is the one that we create. - They also give us the basic "constraints file" which selects the pinout, etc. - We have no control over what we receive from the HW team. We must use what they give us "as is". - We do not use any custom TCL scripts to build our firmware. We just use the ISE "Generate Programming File" command. - We use either Modelsim or the builtin ISE ISim simulator to run our simulations. We are exploring the possibility of using Xilinx' new Vivado Simulator as well. - We usually create a "high level" Matlab or python based simulation models of our system. The model is not necessarily bit accurate to the actual VHDL implementation, but we try to make it so that it is able to generate the inputs necessary to drive our VHDL test benches (including configuration and data), and even our compiled firmware (mostly configuration) - We create VHDL test benches for most (although sadly not all) of our modules. These test benches are usually quite simple. They just read the inputs from some files (generated with our Matlab or python simulators) and save the outputs so that they can be compared to some "golden" outputs (usually generated with our high level simulators). - When there are issues we often use the test benches to simulate the models and we use the (not so good) visualization capabilities of Modelsim to debug. - We also tend to use ChipScope to add "logic analyzer modules" to our firmware so that we can debug "live" some specially tricky issues. - We also use a logic analyzer port to output data that is then captured by an external logic analizer. This is necessary when the amount of data to capture is so great that it would not fit on a ChipScope block. What we definitely cannot do is introduce huge changes to our development practices. I am sure that there are plenty of things that we could do differently and that we should (and probably will) improve. However I'd like to introduce this new technology gradually, and once people are more comfortable with it we could do bigger changes to our work flow. The way I see it there are a few barriers that make it hard for us to use MyHDL. It is likely that some of these are moot (i.e. perhaps when we start using MyHDL I'll realize that they are not important), but for now they seem things that we should deal with: 1. The MyHDL code may need to interface with existing blocks, particularly with IP cores. This results in several problems: - It would make it hard to run simulations on the "MyHDL world" since we do not have MyHDL models for the Xilinx IP cores. - I got the impression that the MyHDL to VHDL "interface" is not that clean and that the process is manual (I have not looked much into this, so I may be wrong). 2. We should come up with a way to automatically generate the VHDL from the MyHDL when we generate our programming file. 3. There is no integration (AFAIK) between MyHDL and iSIM or Modelsim (at least on Windows). 4. For legacy reasons a lot of our code uses the IEEE.STD_LOGIC_ARITH and IEEE.STD_LOGIC_UNSIGNED packages, while MyHDL uses NUMERIC_STD (and rightly so). There may be issues mixing both sets of libraries. 5. There is no editor integration (not even with Sigasi). 6. I believe that the fact that the VHDL code that MyHDL generates is "flat" is a problem, because it makes it harder to introduce MyHDL little by little. - This may be just my perception and turn out to be a non issue, but I think that if MyHDL generated regular structured code (e.g. if you could tell MyHDL "place all these processes on a single entity named foo") it would be much easier to start using MyHDL to create smaller modules that could be added to our regular VHDL project "as is". There are probably other issues that I have not thought about, and maybe some of these are not a problem at all. I'd like to get your opinions and your advice on whether you think it makes sense to try to fit MyHDL into our workflow. Perhaps it does not make sense unless you use MyHDL from start to end, but I hope it is possible. Cheers, Angel |
From: Christopher F. <chr...@gm...> - 2012-09-27 12:20:51
|
>> This task will be involved. After a little digging it doesn't look like >> Modelsim (mti) supports VHPI. VHPI is the VHDL equivalent to Verilog's >> VPI. VHPI would be the easiest to develop VHDL cosimulation support. >> Modelsim has, what they call, FLI [1]. It should be possible to create >> a FLI dynamic library which can be the glue between MyHDL and the mti >> VHDL simulator. > > [1] > http://homepages.cae.wisc.edu/~ece554/new_website/ToolDoc/Modelsim_docs/docs/pdf/fli.pdf > > Is that where you want me to start ?? > > David > Yes, this would be the place to start. The current cosimulation setup is only supported on a "posix" system. BOMK, how it works is that the Python process opens a pipe to the simulator (mti) process. Following this same architecture a similar mti FLI interface can be generated. Looking at one of the current VPI examples (myhdl/cosimulation/modelsim/myhdl_vpi.c) is a good place to start and try to see if it can be mapped to the ModelSim VHDL FLI interface. 1. Review an existing VPI example 2. Review Modelsim FLI 3. Determine if FLI can be implemented similar to existing VPI Regards, Chris |
From: David B. <dav...@ya...> - 2012-09-26 22:47:23
|
OK Is that where you want me to start ?? David --- On Wed, 9/26/12, Christopher Felton <chr...@gm...> wrote: From: Christopher Felton <chr...@gm...> Subject: Re: [myhdl-list] VHDL cosimulation To: myh...@li... Date: Wednesday, September 26, 2012, 6:31 PM On 9/25/2012 3:21 PM, David Blubaugh wrote: > Sure > > Whatever is required for mission success !!! > > david > > This task will be involved. After a little digging it doesn't look like Modelsim (mti) supports VHPI. VHPI is the VHDL equivalent to Verilog's VPI. VHPI would be the easiest to develop VHDL cosimulation support. Modelsim has, what they call, FLI [1]. It should be possible to create a FLI dynamic library which can be the glue between MyHDL and the mti VHDL simulator. [1] http://homepages.cae.wisc.edu/~ece554/new_website/ToolDoc/Modelsim_docs/docs/pdf/fli.pdf ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-26 22:31:53
|
On 9/25/2012 3:21 PM, David Blubaugh wrote: > Sure > > Whatever is required for mission success !!! > > david > > This task will be involved. After a little digging it doesn't look like Modelsim (mti) supports VHPI. VHPI is the VHDL equivalent to Verilog's VPI. VHPI would be the easiest to develop VHDL cosimulation support. Modelsim has, what they call, FLI [1]. It should be possible to create a FLI dynamic library which can be the glue between MyHDL and the mti VHDL simulator. [1] http://homepages.cae.wisc.edu/~ece554/new_website/ToolDoc/Modelsim_docs/docs/pdf/fli.pdf |
From: David B. <dav...@ya...> - 2012-09-25 20:22:06
|
Sure Whatever is required for mission success !!! david --- On Tue, 9/25/12, Christopher Felton <chr...@gm...> wrote: From: Christopher Felton <chr...@gm...> Subject: Re: [myhdl-list] VHDL cosimulation To: myh...@li... Date: Tuesday, September 25, 2012, 4:19 PM On 9/25/2012 3:15 PM, Christopher Felton wrote: >>> On 9/25/2012 3:02 PM, David Blubaugh wrote: >>>> Is there a way to call VHDL within a MyHDL script file?? >>>> >>>> I want to simulate a preexisting VHDL file within MyHDL !!! >>>> >>>> David >>>> >> >> Currently cosimulation with existing VHDL is not supported. But it is >> possible with a VHDL simulator that supports VPI/VHPI. BOMK modelsim >> and active-hdl support VHPI. But there hasn't been much effort to test >> and verify the interfaces. >> >> Here are some notes on the GHDL-VHPI interface, >> http://www.myhdl.org/doku.php/dev:vhdl_cosim. It has been awhile since >> we last check the GHDL VHPI status. >> >> Regards, >> Chris >> > > The simulator is MODELSIM / QUESTA which is embedded in Actel Libero !!! > > David There would be some legwork that would have to be done but it *might* be possible. Would you be able/willing to try and put together the VPI/VHPI interface together for modelsim? .chris ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-25 20:20:09
|
On 9/25/2012 3:15 PM, Christopher Felton wrote: >>> On 9/25/2012 3:02 PM, David Blubaugh wrote: >>>> Is there a way to call VHDL within a MyHDL script file?? >>>> >>>> I want to simulate a preexisting VHDL file within MyHDL !!! >>>> >>>> David >>>> >> >> Currently cosimulation with existing VHDL is not supported. But it is >> possible with a VHDL simulator that supports VPI/VHPI. BOMK modelsim >> and active-hdl support VHPI. But there hasn't been much effort to test >> and verify the interfaces. >> >> Here are some notes on the GHDL-VHPI interface, >> http://www.myhdl.org/doku.php/dev:vhdl_cosim. It has been awhile since >> we last check the GHDL VHPI status. >> >> Regards, >> Chris >> > > The simulator is MODELSIM / QUESTA which is embedded in Actel Libero !!! > > David There would be some legwork that would have to be done but it *might* be possible. Would you be able/willing to try and put together the VPI/VHPI interface together for modelsim? .chris |
From: Christopher F. <chr...@gm...> - 2012-09-25 20:15:55
|
> On 9/25/2012 3:02 PM, David Blubaugh wrote: >> Is there a way to call VHDL within a MyHDL script file?? >> >> I want to simulate a preexisting VHDL file within MyHDL !!! >> >> David >> Currently cosimulation with existing VHDL is not supported. But it is possible with a VHDL simulator that supports VPI/VHPI. BOMK modelsim and active-hdl support VHPI. But there hasn't been much effort to test and verify the interfaces. Here are some notes on the GHDL-VHPI interface, http://www.myhdl.org/doku.php/dev:vhdl_cosim. It has been awhile since we last check the GHDL VHPI status. Regards, Chris |
From: David B. <dav...@ya...> - 2012-09-25 20:13:47
|
The simulator is MODELSIM / QUESTA which is embedded in Actel Libero !!! David --- On Tue, 9/25/12, Christopher Felton <chr...@gm...> wrote: From: Christopher Felton <chr...@gm...> Subject: Re: [myhdl-list] VHDL Cosimulation was: MyHDL: Why Do We Need Signal Assignments? To: myh...@li... Date: Tuesday, September 25, 2012, 4:09 PM On 9/25/2012 3:02 PM, David Blubaugh wrote: > Is there a way to call VHDL within a MyHDL script file?? > > I want to simulate a preexisting VHDL file within MyHDL !!! > > David > Which VHDL simulator are you using? > > > > > --- On Tue, 9/25/12, Jan Decaluwe <ja...@ja...> wrote: > > From: Jan Decaluwe <ja...@ja...> > Subject: Re: [myhdl-list] MyHDL: Why Do We Need Signal Assignments? > To: myh...@li... > Date: Tuesday, September 25, 2012, 12:24 PM > > On 09/25/2012 12:49 AM, Angel Ezquerra wrote: >> >> On Sep 23, 2012 10:13 AM, "Jan Decaluwe" <ja...@ja... >> <mailto:ja...@ja...>> wrote: >>> >>> I have justed posted a blog about signal assignments, why they are >>> needed and who MyHDL implements them. >>> >>> I feel these concepts are often misunderstood, which leads to >>> misunderstandings later on. I hope you like it. >>> >>> http://www.programmableplanet.com/author.asp?section_id=2438&doc_id=251153& >> >>> >> >>> -- th Co Jan Decaluwe >> >> Very nice and clear post. It covers some very basic stuff, yet this >> is something that I think a lot of people do not really understand. > > Right, and judging from the lack of response, I'm not sure they > do now :-) But anyway, this is done so I can refer to it in the > future. > >> I remember that, when I first read about MyHDL, I found the way >> signal assignments work (by assigning to the "next" property) very >> intuitive. I'm sure a lot of people will find your article very >> enlightening. I sure did, and I forwarded it to the members of my >> team. > > Excellent! > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-25 20:10:02
|
On 9/25/2012 3:02 PM, David Blubaugh wrote: > Is there a way to call VHDL within a MyHDL script file?? > > I want to simulate a preexisting VHDL file within MyHDL !!! > > David > Which VHDL simulator are you using? > > > > > --- On Tue, 9/25/12, Jan Decaluwe <ja...@ja...> wrote: > > From: Jan Decaluwe <ja...@ja...> > Subject: Re: [myhdl-list] MyHDL: Why Do We Need Signal Assignments? > To: myh...@li... > Date: Tuesday, September 25, 2012, 12:24 PM > > On 09/25/2012 12:49 AM, Angel Ezquerra wrote: >> >> On Sep 23, 2012 10:13 AM, "Jan Decaluwe" <ja...@ja... >> <mailto:ja...@ja...>> wrote: >>> >>> I have justed posted a blog about signal assignments, why they are >>> needed and who MyHDL implements them. >>> >>> I feel these concepts are often misunderstood, which leads to >>> misunderstandings later on. I hope you like it. >>> >>> http://www.programmableplanet.com/author.asp?section_id=2438&doc_id=251153& >> >>> >> >>> -- th Co Jan Decaluwe >> >> Very nice and clear post. It covers some very basic stuff, yet this >> is something that I think a lot of people do not really understand. > > Right, and judging from the lack of response, I'm not sure they > do now :-) But anyway, this is done so I can refer to it in the > future. > >> I remember that, when I first read about MyHDL, I found the way >> signal assignments work (by assigning to the "next" property) very >> intuitive. I'm sure a lot of people will find your article very >> enlightening. I sure did, and I forwarded it to the members of my >> team. > > Excellent! > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |
From: David B. <dav...@ya...> - 2012-09-25 20:03:09
|
Is there a way to call VHDL within a MyHDL script file?? I want to simulate a preexisting VHDL file within MyHDL !!! David --- On Tue, 9/25/12, David Blubaugh <dav...@ya...> wrote: From: David Blubaugh <dav...@ya...> Subject: Re: [myhdl-list] MyHDL: Why Do We Need Signal Assignments? To: myh...@li..., ja...@ja... Date: Tuesday, September 25, 2012, 4:02 PM Is there a way to call VHDL within a MyHDL script file?? I want to simulate a preexisting VHDL file within MyHDL !!! David --- On Tue, 9/25/12, Jan Decaluwe <ja...@ja...> wrote: From: Jan Decaluwe <ja...@ja...> Subject: Re: [myhdl-list] MyHDL: Why Do We Need Signal Assignments? To: myh...@li... Date: Tuesday, September 25, 2012, 12:24 PM On 09/25/2012 12:49 AM, Angel Ezquerra wrote: > > On Sep 23, 2012 10:13 AM, "Jan Decaluwe" <ja...@ja... > <mailto:ja...@ja...>> wrote: >> >> I have justed posted a blog about signal assignments, why they are >> needed and who MyHDL implements them. >> >> I feel these concepts are often misunderstood, which leads to >> misunderstandings later on. I hope you like it. >> >> http://www.programmableplanet.com/author.asp?section_id=2438&doc_id=251153& > >> > >> -- th Co Jan Decaluwe > > Very nice and clear post. It covers some very basic stuff, yet this > is something that I think a lot of people do not really understand. Right, and judging from the lack of response, I'm not sure they do now :-) But anyway, this is done so I can refer to it in the future. > I remember that, when I first read about MyHDL, I found the way > signal assignments work (by assigning to the "next" property) very > intuitive. I'm sure a lot of people will find your article very > enlightening. I sure did, and I forwarded it to the members of my > team. Excellent! -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: David B. <dav...@ya...> - 2012-09-25 20:02:08
|
Is there a way to call VHDL within a MyHDL script file?? I want to simulate a preexisting VHDL file within MyHDL !!! David --- On Tue, 9/25/12, Jan Decaluwe <ja...@ja...> wrote: From: Jan Decaluwe <ja...@ja...> Subject: Re: [myhdl-list] MyHDL: Why Do We Need Signal Assignments? To: myh...@li... Date: Tuesday, September 25, 2012, 12:24 PM On 09/25/2012 12:49 AM, Angel Ezquerra wrote: > > On Sep 23, 2012 10:13 AM, "Jan Decaluwe" <ja...@ja... > <mailto:ja...@ja...>> wrote: >> >> I have justed posted a blog about signal assignments, why they are >> needed and who MyHDL implements them. >> >> I feel these concepts are often misunderstood, which leads to >> misunderstandings later on. I hope you like it. >> >> http://www.programmableplanet.com/author.asp?section_id=2438&doc_id=251153& > >> > >> -- th Co Jan Decaluwe > > Very nice and clear post. It covers some very basic stuff, yet this > is something that I think a lot of people do not really understand. Right, and judging from the lack of response, I'm not sure they do now :-) But anyway, this is done so I can refer to it in the future. > I remember that, when I first read about MyHDL, I found the way > signal assignments work (by assigning to the "next" property) very > intuitive. I'm sure a lot of people will find your article very > enlightening. I sure did, and I forwarded it to the members of my > team. Excellent! -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-25 16:45:15
|
On 9/25/2012 10:56 AM, Tom Dillon wrote: > My personal preference is named arguments. > > I also use signal arguments to pass some functionality as well. > > Such as: > > mymodule(clock=None,reset=None, a=sig1, b=sig2, c=sig3, UseFilt=False) > > Would make it asynchronous. The mymodule definition would have to check > for clock==None and return the appropriate logic. > > I agree, name arguments is what you usually want and your example is a perfect demonstration of creating very flexible IP. The use of "interfaces" helps as well. mymodule(syssigs=None, datapath=datapath, UseFilt=False) and in the module you can have def mymodule(...): (a,b,c) = datapath.GetSigs() if syssigs is not None: clock = syssigs.clock reset = syssigs.reset # ... else: # ... where datapath is: class Datapath(object): def __init__(self): self.a,self.b,self.c = [Signal...] def GetSigs(self): return self.a,self.b,self.c Regards, Chris |
From: Jan D. <ja...@ja...> - 2012-09-25 16:24:44
|
On 09/25/2012 12:49 AM, Angel Ezquerra wrote: > > On Sep 23, 2012 10:13 AM, "Jan Decaluwe" <ja...@ja... > <mailto:ja...@ja...>> wrote: >> >> I have justed posted a blog about signal assignments, why they are >> needed and who MyHDL implements them. >> >> I feel these concepts are often misunderstood, which leads to >> misunderstandings later on. I hope you like it. >> >> http://www.programmableplanet.com/author.asp?section_id=2438&doc_id=251153& > >> > >> -- th Co Jan Decaluwe > > Very nice and clear post. It covers some very basic stuff, yet this > is something that I think a lot of people do not really understand. Right, and judging from the lack of response, I'm not sure they do now :-) But anyway, this is done so I can refer to it in the future. > I remember that, when I first read about MyHDL, I found the way > signal assignments work (by assigning to the "next" property) very > intuitive. I'm sure a lot of people will find your article very > enlightening. I sure did, and I forwarded it to the members of my > team. Excellent! -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |
From: Tom D. <td...@di...> - 2012-09-25 16:13:37
|
My personal preference is named arguments. I also use signal arguments to pass some functionality as well. Such as: mymodule(clock=None,reset=None, a=sig1, b=sig2, c=sig3, UseFilt=False) Would make it asynchronous. The mymodule definition would have to check for clock==None and return the appropriate logic. On 09/25/2012 10:45 AM, Christopher Felton wrote: > use function attributes instead of named arguments for a MyHDL module > configuration? Not sure if this would be a good idea or not. > > Example: > > def mymodule(clock, reset, a, b, c): > > if hasattr(mymodule, 'use_filter') and mymodule.use_filter: > aflt = Signal(intbv(0, min=c.min, max=c.max)) > gens = myfilter(clock, reset, a, aflt) > else: > aflt,gens = (a,[]) > > @always_seq(clock.posedge, reset=reset) > def hdl(): > c.next = a + b > gens = [gens, hdl] > > return gens > > Traditionally you would add: > > mymodule(clock, reset, a, b, c, UseFilt=False) > > > After writing this it dawned on me, most of the time it would be bad. I > guess a function attribute would only be useful if you wanted every > MyHDL module instance to act exactly the same (e.g. if the filter was > enabled in one instance it would be enabled in all instances). > > So where this might be useful is if you are using technology primitives > (FPGA primitives) and you want to instantiate a primitive based on a > technology, say Xilin or Altera. But in that case you would want the > attribute to be global to all the modules, hmmm. > > Regards, > Chris > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-09-25 15:45:54
|
use function attributes instead of named arguments for a MyHDL module configuration? Not sure if this would be a good idea or not. Example: def mymodule(clock, reset, a, b, c): if hasattr(mymodule, 'use_filter') and mymodule.use_filter: aflt = Signal(intbv(0, min=c.min, max=c.max)) gens = myfilter(clock, reset, a, aflt) else: aflt,gens = (a,[]) @always_seq(clock.posedge, reset=reset) def hdl(): c.next = a + b gens = [gens, hdl] return gens Traditionally you would add: mymodule(clock, reset, a, b, c, UseFilt=False) After writing this it dawned on me, most of the time it would be bad. I guess a function attribute would only be useful if you wanted every MyHDL module instance to act exactly the same (e.g. if the filter was enabled in one instance it would be enabled in all instances). So where this might be useful is if you are using technology primitives (FPGA primitives) and you want to instantiate a primitive based on a technology, say Xilin or Altera. But in that case you would want the attribute to be global to all the modules, hmmm. Regards, Chris |