Re: [myhdl-list] subtype RamWord_t
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2014-10-02 20:26:02
|
That is correct, the first creates 14bits and the second 16bits as you specified. In [4] : RAM_WIDTH_C = 16 RAM_SIZE_C = 16384 t1 = intbv(0, min=0, max=RAM_SIZE_C) t2 = intbv(0, min=0, max=2**RAM_WIDTH_C) print(len(t1), len(t2)) (14, 16) Int[5]: 2**14 Out[5]: 16384 Regards, Chris On 10/2/2014 2:38 PM, Edward Vidal wrote: > Hello all, > In the process of learning myhdl and trying to convert a vdh code snippet to myhdl. > RAM_WIDTH_C = 16 is defined as constant > > subtype RamWord_t is unsigned(RAM_WIDTH_C-1 downto 0); -- RAM word type. > > > RAM_SIZE_C = 16384 > For addr I used > > addr_r = addr_r = Signal(intbv(0, min = 0, max = RAM_SIZE_C)) > > which converted addr_r: out unsigned(13 downto 0); which > I am trying dataToRam_r = Signal(intbv(0, min = 0, max = 2**RAM_WIDTH_C - 1)) > which is correct I think but not of subtype RamWord_t > dataToRam_r: out unsigned(15 downto 0); > > What is the process to make it of type RamWord_t > Any and all help is appreciated. > > Edward Vidal Jr. > e-mail dev...@sb... > 915-595-1613 > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |