Re: [myhdl-list] supported operators for Signal class
Brought to you by:
jandecaluwe
From: Oscar D. D. <osc...@gm...> - 2016-04-11 20:47:07
|
El Lun 11 Abr 2016 17:36:56 David Stanford escribió: > I'm trying some tests converting python code to MyHDL code that generates > real hardware. As a hardware designer, I know some of these tests are going > to be foolish first steps to make, First of all, beware! You're doing conversion to generate real hardware. That means the sythesizable operand list is very limited. In particular, you cannot synthesize multiplications, divisions and powers (at least with common VHDL and Verilog synthesizers, possibly that won't be true with HLLs or High-Level Logic synthesizers). If you're doing simulation only, you would be fine. > Which leads to the question, what operand types ARE supported for Signals? > This feels like an obvious question, but I can't seem to find an answer > anywhere in the documentation. In reality, the supported operands are related to the underlying type of the Signal object, in your example, that would be intbv. You can create Signals with int, or any other python data type. Regarding the intbv type, you can check the source file _intbv.py, and look for the operand methods available[1]. I saw all implemented methods for integers, so an intbv should behave as an int (as the documentation say). [1] https://docs.python.org/2/reference/datamodel.html#emulating-numeric-types > Am I searching poorly looking for a list of operators that works between > signals, or does such a table not exist? Should it? Due to the syhthesizable code restriction I can say addition, subtraction, logic (and, or, xor, not) and shifts are probably the only operands supported for conversion. > Thanks, > > Dave Stanford > > > This e-mail and its attachments are intended only for the individual or > entity to whom it is addressed and may contain information that is > confidential, privileged, inside information, or subject to other > restrictions on use or disclosure. Any unauthorized use, dissemination or > copying of this transmission or the information in it is prohibited and may > be unlawful. If you have received this transmission in error, please notify > the sender immediately by return e-mail, and permanently delete or destroy > this e-mail, any attachments, and all copies (digital or paper). Unless > expressly stated in this e-mail, nothing in this message should be > construed as a digital or electronic signature. For additional important > disclaimers and disclosures regarding KCG’s products and services, please > click on the following link: > http://www.kcg.com/legal/global-disclosures > ---------------------------------------------------------------------------- > -- Find and fix application performance issues faster with Applications > Manager Applications Manager provides deep performance insights into > multiple tiers of your business applications. It resolves application > problems quickly and reduces your MTTR. Get your free trial! > http://pubads.g.doubleclick.net/ > gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list -- Oscar Díaz Key Fingerprint = 8D3D 5FC4 A48C 5404 24AC F684 A42F CE7C 39C0 AC6B gpg --keyserver subkeys.pgp.net --recv-keys A42FCE7C39C0AC6B I recommend using OpenDocument Format for daily use and exchange of documents. http://www.fsf.org/campaigns/opendocument |