Re: [myhdl-list] MEP : Signal Containers
Brought to you by:
jandecaluwe
From: Oscar D. <osc...@gm...> - 2011-11-21 15:39:13
|
2011/11/15 Christopher Felton <chr...@gm...>: > The following is a *start* to a MEP that describes the conversion > support for classes, lists, and dictionaries. This is just a start of > the enhancement description and does not include some of the mechanical > (code changes) items worth identifying in a MEP. Thanks for making this draft. I'm mostly agree this MEP, I'll just add some thoughts: * Since a class could be more powerful than a list or a dict, container classes should allow enhanced features i.e. custom naming scheme. We can propose hidden methods to support that features, in a similar way of the special methods from the python data model: http://docs.python.org/reference/datamodel.html#special-method-names Right now I'm thinking about * It's not explicitly mentioned, but I guess the conversion step will "flatten" the signal container. Although I agree on that, maybe we could think about support to conversion to arrays or records (I speak mainly for VHDL, I'm not that expert of Verilog). * About the conversion of class methods, I think that should be in another MEP, this one is to define signal containers. We should make another MEP to add support for conversion of classes (not just class methods). However, I do agree that the class methods must have support for conversion, as you explained here, and I think it is easy to fix the self argument issue in the conversion code. That's all for now. Best regards. P.D.: Perhaps I can help with the VHDL code snippet: VHDL example conversion. .. code-block :: vhdl entity foo is port ( clk: in std_logic; MyObj_x: in unsigned(7 downto 0); MyObj_y: in unsigned(3 downto 0); MyObj_z: out unsigned(8 downto 0) ); end entity foo; architecture MyHDL of foo is begin RTL: process(clk) is begin if rising_edge(clk) then MyObj_z <= MyObj_x + MyObj_y end if; end process RTL; end architecture MyHDL; -- Oscar Díaz Key Fingerprint = 904B 306C C3C2 7487 650B BFAC EDA2 B702 90E9 9964 gpg --keyserver subkeys.pgp.net --recv-keys 90E99964 I recommend using OpenDocument Format for daily use and exchange of documents. http://www.fsf.org/campaigns/opendocument |