Am I missing something here? I have never had any need to do any sort of boolean operation on integers in VHDL?
C does it because C does not have a boolean type but then boolean operations on C integers are simply pre-empted by a zero or not zero comparison. Are you guys coming from a C background and trying to implement something familiar but in VHDL? I'd be interested to see the root problem that you're trying to solve. On a side note I implemented a real to time (and vice versa) conversion - apologies Tristan I still haven't published it - which basically worked the same for Modelsim and GHDL although the VHDL package function was slightly different for both. This was only a case of slightly different syntax in calling foreign functions from each application though. The dll / object file itself was the same. If this is of any interest to what you're trying to solve then let me know and I'll try and get my finger out and provide some source code. On Thu, 2010-11-04 at 18:24 +0100, [email protected] wrote: > On Thu, 04 Nov 2010 18:00:02 +0100, Thomas Sailer wrote: > > On Thu, 2010-11-04 at 17:32 +0100, whygee wrote: > >> hah, that's another issue. But assuming that it was not, > >> what good reason do I have to not write a VHPIDIRECT-based > >> package with these essential operations ? > > None IMO... > >> Has anybody done it before ? > > Not that I know of. > still no answer on comp.lang.vhdl, no trace on google... > the deal is sealed. > That will be a nice addition to http://ygdes.com/GHDL/ > > > I thought about doing it, but then again I do not want to become ghdl > > only at the moment. > OK, that's a good reason. > then again, if nobody moves first, nobody will follow :-/ > > > So for me to use something like this, I would need a > > compatibility package that's implemented in terms of standard VHDL and > > that doesn't suck too hard. > haha you have a good point :-) > > > That said, I haven't gotten around writing such a package... > well there are 3 "methods" for such a feature : > - direct compiler support (see below) > - VHDL package (GHDL only, with and I won't care about 64-bit > compatibility) > - portable, slow, stupid version that works everywhere : > good luck swallowing it :-/ (the speed argument is completely > lost because it is as slow or slower than std_ulogic_vector) > > >> Could there be (later) a patch to GHDL that provides AND/OR/XOR > >> to integers so GCC does not have to make a function call > >> just of one boolean instruction ? > > Sure, if you find someone competent enough in gcc frontends written in > > Ada... 8-) > haha ! If at least I was fluent with the source code of GHDL, > it would be possible... I don't want to step on Tristan's feet > so now I prefer to make a simple GHDL-only package that provides > the first functionalities and features. We'll see later how that > evolves, but we can't if there is no prototype of any kind. > > and there we go... > > > Tom > yg > > _______________________________________________ > Ghdl-discuss mailing list > [email protected] > https://mail.gna.org/listinfo/ghdl-discuss _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
