myhdl-list Mailing List for MyHDL (Page 51)
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...> - 2014-05-23 19:57:41
|
> > Would it make sense to convert the code snippets in the Sphinx > documentation to doctests so this can be picked up automatically? I can > have a bash at this if desired (certainly, the FSM one above would be > useful as a doctest). Yes, I think this is a great idea, I actually have a start on this. I have a couple sections completed with doctest. If others agree I can create a PR with my changes and then you can add to if you like :) > Also (and separately), is there a reason why the API docs aren't > autogenerated with Sphinx autodoc (with the content in the Python > docstrings)? > Don't know if there is a reason for this? Regards, Chris |
From: Henry G. <he...@ca...> - 2014-05-23 19:48:49
|
Please don't think I'm trying to be annoying with this - I'm having a great time expanding my horizon whilst reading every line of documentation in great detail. Referring to the code in http://docs.myhdl.org/en/latest/manual/rtl.html#finite-state-machine-modeling The reset signal in the testBench() should be initialised to 1 to yield the output expected in gtkwave shown below it. I've pushed the change to my MyHDL fork on bitbucket - as before, PR on demand. Would it make sense to convert the code snippets in the Sphinx documentation to doctests so this can be picked up automatically? I can have a bash at this if desired (certainly, the FSM one above would be useful as a doctest). Also (and separately), is there a reason why the API docs aren't autogenerated with Sphinx autodoc (with the content in the Python docstrings)? Cheers, Henry |
From: Henry G. <he...@ca...> - 2014-05-23 17:19:23
|
There is a typo in the docs for ResetSignal http://docs.myhdl.org/en/latest/manual/reference.html#myhdl.ResetSignal As it reads, both True and False async args lead to an asynchronous reset. I've pushed this (minor) change to my fork and can raise a PR if desired. Cheers, Henry |
From: Henry G. <he...@ca...> - 2014-05-23 09:42:04
|
The link on the MyHDL community page (http://www.myhdl.org/support/community.html) to the MyHDL mailing list appears to be broken - under Firefox I get a redirecting error for http://sourceforge.net/mail?group_id=91207 . I found my way to subscribe through the Gmane page. Cheers, Henry |
From: Josy B. <jo...@c-...> - 2014-05-20 09:03:31
|
Thanks Chris, Being too busy at the moment I will file enhancement request later. I can live with a work-around as I only need to expose a single module to the Qsys project Regards, Josy |
From: Christopher F. <chr...@gm...> - 2014-05-19 22:10:12
|
On 5/19/14 5:06 PM, Christopher Felton wrote: > On 5/19/14 3:47 PM, Josy Boelen wrote: >> Josy Boelen <josy <at> c-cam.be> writes: >> >>> >>> When setting toVHDL.numeric_ports = False >>> the following construct: >>> simx.next = DVectors - DObj >>> >>> gets converted into: >>> ed_ed_edc_0_simx <= signed(resize(DVectors(18-1 downto 0), 19) - >> unsigned >>> (DObj)); >>> >>> where it should be: >>> either >>> ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors)(18-1 downto 0), >> 19) >>> - unsigned(DObj)); >>> (or ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors(18-1 downto 0)), >> 19) >>> - unsigned(DObj));) >>> >>> Both DObj and DVectors are ports >>> For now I can live with the workaround of not setting >> toVHDL.numeric_ports to >>> False, but at some point in the future I will have to expose >>> std_logic_vectors in stead of unsigned ports (as this is what Altera's >> Qsys >>> allows for VHDL-based components) >>> >>> Best regards, >>> >>> Josy >>> >>> >> ---------------------------------------------------------------------------- >> No takers? >> Do I have to move it to the bug report list? >> >> Regards, >> >> Josy >> > > That might be the best bet, I haven't read the details > yet and some of these features I have not used (I will > not be of much use in the near future :) > > You can log it as an issue here: > https://bitbucket.org/jandecaluwe/myhdl/issues?status=new&status=open > Note, if you add it to the issue tracker it probably is a feature request. As noted by another user .numeric_port is not an advertised feature. I don't know if it is complete or not. You might want to add an issue as "enhancement" and for the completion of the feature. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2014-05-19 22:06:28
|
On 5/19/14 3:47 PM, Josy Boelen wrote: > Josy Boelen <josy <at> c-cam.be> writes: > >> >> When setting toVHDL.numeric_ports = False >> the following construct: >> simx.next = DVectors - DObj >> >> gets converted into: >> ed_ed_edc_0_simx <= signed(resize(DVectors(18-1 downto 0), 19) - > unsigned >> (DObj)); >> >> where it should be: >> either >> ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors)(18-1 downto 0), > 19) >> - unsigned(DObj)); >> (or ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors(18-1 downto 0)), > 19) >> - unsigned(DObj));) >> >> Both DObj and DVectors are ports >> For now I can live with the workaround of not setting > toVHDL.numeric_ports to >> False, but at some point in the future I will have to expose >> std_logic_vectors in stead of unsigned ports (as this is what Altera's > Qsys >> allows for VHDL-based components) >> >> Best regards, >> >> Josy >> >> > ---------------------------------------------------------------------------- > No takers? > Do I have to move it to the bug report list? > > Regards, > > Josy > That might be the best bet, I haven't read the details yet and some of these features I have not used (I will not be of much use in the near future :) You can log it as an issue here: https://bitbucket.org/jandecaluwe/myhdl/issues?status=new&status=open Regards, Chris |
From: Josy B. <jo...@c-...> - 2014-05-19 20:53:22
|
Josy Boelen <josy <at> c-cam.be> writes: > > When setting toVHDL.numeric_ports = False > the following construct: > simx.next = DVectors - DObj > > gets converted into: > ed_ed_edc_0_simx <= signed(resize(DVectors(18-1 downto 0), 19) - unsigned > (DObj)); > > where it should be: > either > ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors)(18-1 downto 0), 19) > - unsigned(DObj)); > (or ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors(18-1 downto 0)), 19) > - unsigned(DObj));) > > Both DObj and DVectors are ports > For now I can live with the workaround of not setting toVHDL.numeric_ports to > False, but at some point in the future I will have to expose > std_logic_vectors in stead of unsigned ports (as this is what Altera's Qsys > allows for VHDL-based components) > > Best regards, > > Josy > > ---------------------------------------------------------------------------- No takers? Do I have to move it to the bug report list? Regards, Josy |
From: Guy E. <gu...@no...> - 2014-05-14 07:56:05
|
Hello, I've noticed that the "toVHDL.numeric_ports" atttribute is not described in the manual. Is that an omission or is the use of this attribute not recommended/deprecated? Thanks, Guy. -- Guy Eschemann noasic e.K. Sundheimer Feld 6 77694 Kehl, Germany Tel.: +49 (0) 7851 63 66 305 Mobile: +49 (0) 173 72 51 886 gu...@no... Follow me on Twitter: @geschema http://noasic.com http://fpga-news.de USt-IdNr.: DE266749532 HRA 703582, Amtsgericht Freiburg i. Br. Visit us at ALL PROGRAMMABLE PLC2 Days 2014 20-22.05.2014, Stuttgart, Germany |
From: Josy B. <jo...@c-...> - 2014-05-10 08:51:32
|
When setting toVHDL.numeric_ports = False the following construct: simx.next = DVectors - DObj gets converted into: ed_ed_edc_0_simx <= signed(resize(DVectors(18-1 downto 0), 19) - unsigned (DObj)); where it should be: either ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors)(18-1 downto 0), 19) - unsigned(DObj)); (or ed_ed_edc_0_simx <= signed(resize(unsigned(DVectors(18-1 downto 0)), 19) - unsigned(DObj));) Both DObj and DVectors are ports For now I can live with the workaround of not setting toVHDL.numeric_ports to False, but at some point in the future I will have to expose std_logic_vectors in stead of unsigned ports (as this is what Altera's Qsys allows for VHDL-based components) Best regards, Josy |
From: Christopher F. <chr...@gm...> - 2014-05-08 13:34:12
|
On 5/7/2014 2:54 PM, Guy Eschemann wrote: > Hello, > > I was wondering whether MyHDL has anything similar to VHDL's inertial or > transport delay models. Not that I would need them, it's just out of > curiosity. > > Thanks, > Guy. > The /Signal/ has a delay argument: Signal(val=None, delay=None) A simple example: def m_add(a, b, c): @always_comb def rtl(): c.next = a and b return rtl def test(): a = Signal(bool(0), delay=10) b = Signal(bool(0), delay=1) c = Signal(bool(0)) ... https://gist.github.com/cfelton/a0dbd2c12070a649bb56 http://www.edaplayground.com/x/3Gw (waveform attached, signal order is funny though) The delay is in simulation steps, if you want to relate sim steps back to a physical meaning you have to manage it yourself, e.g. we could arbitrarily say 1 sim step is 1ps and a 1ns delay would be delay=1000 (make sure you set the traceSignals and Cosimulation timescales if needed). Regards, Chris |
From: Guy E. <gu...@no...> - 2014-05-07 19:54:47
|
Hello, I was wondering whether MyHDL has anything similar to VHDL's inertial or transport delay models. Not that I would need them, it's just out of curiosity. Thanks, Guy. |
From: Josy B. <jo...@c-...> - 2014-05-07 10:56:44
|
Josy Boelen <josy <at> c-cam.be> writes: > > When converting a state machine MyHDL translates the last 'elif ... :' > >... > > As a side effect it 'repaired' a case where toVHDL > lumped together several states into a single 'when others =>' block and > generated 'if then else' constructs to elaborate those lumped-in states. > > Regards, > > Josy I must edit the last sentence: apparently the 'tangled state machine case' is in another module ... I'll post a follow up thread on this later Regards, Josy |
From: Guy E. <gu...@no...> - 2014-05-07 08:55:05
|
Am 05.05.2014 15:23, schrieb Christopher Felton: > > > Yes, the generators (see [1] for intro on generators) > cannot have the user-defined code attribute only a > module (a function). > > Typically, in MyHDL we call a (myhdl) module a Python > function that returns MyHDL generators (yes this overlaps > with the Python definition of a module, context specific > (i.e. a file)). > > As Josy, replied, if you modify the code to (sorry changed > some of the signal names, see below) > > Regards, > Chris > I didn't realize that user-defined code cannot be applied to generators. This is something that a (future?) MyHDL linter may want to check. Thanks, Guy. |
From: Josy B. <jo...@c-...> - 2014-05-07 08:44:57
|
When converting a state machine MyHDL translates the last 'elif ... :' into a 'when others =>'statement. I felt this is rather impure so I looked in the _toVHDL.py source and changed the following around line 1146: #07-05-2014 jb: do not use default clause for last test # for i, (test, suite) in enumerate(node.tests): for _, (test, suite) in enumerate(node.tests): self.writeline() item = test.case[1] if isinstance(item, EnumItemType): itemRepr = item._toVHDL() else: itemRepr = self.BitRepr(item, obj) comment = "" # # potentially use default clause for last test # if (i == len(node.tests)-1) and not node.else_: # self.write("when others") # comment = " -- %s" % itemRepr # else: # self.write("when ") # self.write(itemRepr) self.write("when ") self.write(itemRepr) #07-05-2014 end That did the trick. As a side effect it 'repaired' a case where toVHDL lumped together several states into a single 'when others =>' block and generated 'if then else' constructs to elaborate those lumped-in states. Regards, Josy |
From: Josy B. <jo...@c-...> - 2014-05-07 08:23:29
|
The following code: def module(... , D, ... , Q, ...): L_WIDTH_D = len(D) L_WIDTH_Q = len(Q) L_N = L_WIDTH_D / L_WIDTH_Q counter = Signal(intbv(0 , min = 0, max = L_N)) ... if counter == L_N - 1: gets translated into VHDL as : signal counter: unsigned(1 downto 0); ... if (signed(resize(counter, 3)) = (L_N - 1)) then In VHDL I would have simply written the test as: if ( counter = (L_N - 1) ) then and I don't see why MyHDL should do different. Perhaps, as Python doesn't know 'constants' it interprets 'L_N - 1' as a possibly signed value? Regards, Josy |
From: Christopher F. <chr...@gm...> - 2014-05-06 20:10:50
|
On 5/2/14 3:55 AM, Guy Eschemann wrote: > Hello, > > it looks like searching the docs for "User-defined code" does not give > any results. This is unfortunate, because there actually is a section in > the manual about user-defined code > (http://docs.myhdl.org/en/latest/manual/conversion.html#user-defined-code). > > > > Regards, > Guy. > > What's weird, is it gives you a result in the menu area (left column) - odd. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2014-05-06 19:41:36
|
On 5/3/2014 3:14 AM, Josy Boelen wrote: > Guy Eschemann <guy <at> noasic.com> writes: > > I experimented a bit with your code and got the intended result when > replacing 'inc_comb.vhdl_code' with 'top.vhdl_code'. Now you wrapped > 'inc_comb' inside a 'top' module which is the one you convert, so this may > make sense? > > Regards, > > Josy > Yes, the generators (see [1] for intro on generators) cannot have the user-defined code attribute only a module (a function). Typically, in MyHDL we call a (myhdl) module a Python function that returns MyHDL generators (yes this overlaps with the Python definition of a module, context specific (i.e. a file)). As Josy, replied, if you modify the code to (sorry changed some of the signal names, see below) Regards, Chris [1] http://docs.myhdl.org/en/latest/manual/background.html#a-small-tutorial-on-generators #--------------------------------------------------------------- def m_top(clock, reset, x, y): incx = Signal(y.val) g = m_next_count(x, incx, 8) @always_seq(clock.posedge, reset=reset) def rtl(): y.next = incx return g, rtl def m_next_count(x, y, n): @always(x) def logic(): pass y.driven = "wire" return logic m_next_count.vhdl_code = \ """ $y <= ($x + 1) mod $n """ clock = Signal(bool(0)) reset = ResetSignal(0, active=0, async=True) x,y = [Signal(intbv(0, min=-256, max=256)) for _ in range(2)] toVHDL(m_top, clock, reset, x, y) --------------------------------------------------------------- -- File: m_top.vhd -- Generated by MyHDL 0.9dev -- Date: Mon May 5 08:17:25 2014 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use std.textio.all; use work.pck_myhdl_09.all; entity m_top is port ( clock: in std_logic; reset: in std_logic; x: in signed (8 downto 0); y: out signed (8 downto 0) ); end entity m_top; architecture MyHDL of m_top is signal incx: signed (8 downto 0); begin incx <= (x + 1) mod 8 M_TOP_RTL: process (clock, reset) is begin if (reset = '0') then y <= to_signed(0, 9); elsif rising_edge(clock) then y <= incx; end if; end process M_TOP_RTL; end architecture MyHDL; |
From: Josy B. <jo...@c-...> - 2014-05-03 08:14:36
|
Guy Eschemann <guy <at> noasic.com> writes: I experimented a bit with your code and got the intended result when replacing 'inc_comb.vhdl_code' with 'top.vhdl_code'. Now you wrapped 'inc_comb' inside a 'top' module which is the one you convert, so this may make sense? Regards, Josy |
From: Guy E. <gu...@no...> - 2014-05-02 09:20:27
|
Hello, is there anything wrong with the following code? What I'm seeing is that the generated VHDL code does not include the specified user-defined code. from myhdl import * def top(nextCount, count, n): def inc_comb(nextCount, count, n): @always(count) def logic(): # do nothing here pass nextCount.driven = "wire" return logic inc_comb.vhdl_code =\ """ $nextCount <= ($count + 1) mod $n; """ inst_inc_comb = inc_comb(nextCount, count, n) return instances() if __name__ == '__main__': nextCount = Signal(intbv(0)[8:]) count = Signal(intbv(0)[8:]) n = 8 inst_top = toVHDL(top, nextCount, count, n Regards, Guy. |
From: Guy E. <gu...@no...> - 2014-05-02 08:55:54
|
Hello, it looks like searching the docs for "User-defined code" does not give any results. This is unfortunate, because there actually is a section in the manual about user-defined code (http://docs.myhdl.org/en/latest/manual/conversion.html#user-defined-code). Regards, Guy. |
From: Guy E. <gu...@no...> - 2014-05-02 08:37:05
|
Hello, I've posted a new MyHDL-related question to Stackoverflow: http://stackoverflow.com/questions/23423971 Regards, Guy. |
From: Christopher F. <chr...@gm...> - 2014-05-01 14:20:52
|
On 4/29/2014 9:05 AM, Josy Boelen wrote: > Guy Eschemann <guy <at> noasic.com> writes: > >> >> >> Hello, >> I've been wondering about this:>>> from myhdl import * >> >>> a = modbv(0, min = 0, max = 16) >> >>> a >> intbv(0) >> >> Why does the last command print "intbv(0)" instead of "modbv(0)"? >> Regards, >> Guy. > > modbv is derived from intbv and hasn't got it's own __repr__ function > (yet?) so it uses the one from the intbv class. > > Regards, > > Josy Thanks for pointing this out, this should be modified as suggested. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2014-05-01 14:15:06
|
On 4/30/2014 11:35 AM, Keerthan jai.c wrote: > Awesome, should I submit a bug report/pull request? > My opinion yes, but it is not clear if this is a bug against the trunk or a feature/fix for 0.9. I would create a PR towards 0.9. It will provide the opportunity for more testing. Regards, Chris |
From: Keerthan jai.c <jck...@gm...> - 2014-04-30 16:35:44
|
Awesome, should I submit a bug report/pull request? On Mon, Apr 28, 2014 at 5:29 PM, Lars <L...@rs...> wrote: > > > > <at> Keerthan: > > Thanks. I will try and post the result. > > > > yes, works with _toVHDL. > > thx, > Lars > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > -- have a nice day -jck |