Thread: [myhdl-list] Another typo in docs
Brought to you by:
jandecaluwe
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: 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 20:04:41
|
On 23/05/14 20:57, Christopher Felton wrote: >> >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:) > Can you do a sibling pull request (I mean, is it possible)? It makes sense to not replicate one another's work! Otherwise can you point me at the relevant repository and I'll fork that? Cheers, Henry |
From: Christopher F. <chr...@gm...> - 2014-05-23 20:56:10
|
On 5/23/2014 3:04 PM, Henry Gomersall wrote: > On 23/05/14 20:57, Christopher Felton wrote: >>>> 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:) >> > Can you do a sibling pull request (I mean, is it possible)? It makes > sense to not replicate one another's work! Otherwise can you point me at > the relevant repository and I'll fork that? > Yes, I can point you to a repo (it will be a little while). I did this awhile ago, the work was originally done on the 0.8dev branch. It will need to be merged to 0.9. Regards, Chris |
From: Henry G. <he...@ca...> - 2014-05-23 21:47:29
|
On 23/05/14 21:55, Christopher Felton wrote: > On 5/23/2014 3:04 PM, Henry Gomersall wrote: >> >On 23/05/14 20:57, Christopher Felton wrote: >>>>> >>>>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:) >>> >> >> >Can you do a sibling pull request (I mean, is it possible)? It makes >> >sense to not replicate one another's work! Otherwise can you point me at >> >the relevant repository and I'll fork that? >> > > Yes, I can point you to a repo (it will be a little while). > I did this awhile ago, the work was originally done on the > 0.8dev branch. It will need to be merged to 0.9. Great, just let me know when you have it. Cheers, Henry |
From: Christopher F. <chr...@gm...> - 2014-05-24 00:52:46
|
On 5/23/14 4:47 PM, Henry Gomersall wrote: > On 23/05/14 21:55, Christopher Felton wrote: >> On 5/23/2014 3:04 PM, Henry Gomersall wrote: >>>> On 23/05/14 20:57, Christopher Felton wrote: >>>>>>>>>> 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:) >>>>>> >>>> Can you do a sibling pull request (I mean, is it possible)? It makes >>>> sense to not replicate one another's work! Otherwise can you point me at >>>> the relevant repository and I'll fork that? >>>> >> Yes, I can point you to a repo (it will be a little while). >> I did this awhile ago, the work was originally done on the >> 0.8dev branch. It will need to be merged to 0.9. > > Great, just let me know when you have it. > > Cheers, > > Henry Here are the merged changes - I don't know if this is the final version/format desired but it is a starting point, I merged it to the 0.9dev branch: https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview One note of caution, I had made these changes a while back on 0.8 branch. I used mercurial to merge but which all went well. But when I pushed it back to the repo above it indicated it had to create a new head. Not 100% positive if we want the closed/dead/hanging head pushed back to the main repo. If you fork/clone this make sure you update to the 0.9dev branch >> hg up -C 0.9-dev Regards, Chris |
From: Jan D. <ja...@ja...> - 2014-05-24 10:16:46
|
0.8 is in maintenance mode. Bug fixes yes, but new development should be based on 0.9. Otherwize things are going to be messy. I have recently merged in or handled all outstanding PRs I believe. Jan On 05/24/2014 02:52 AM, Christopher Felton wrote: > On 5/23/14 4:47 PM, Henry Gomersall wrote: >> On 23/05/14 21:55, Christopher Felton wrote: >>> On 5/23/2014 3:04 PM, Henry Gomersall wrote: >>>>> On 23/05/14 20:57, Christopher Felton wrote: >>>>>>>>>>> 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:) >>>>>>> >>>>> Can you do a sibling pull request (I mean, is it possible)? It makes >>>>> sense to not replicate one another's work! Otherwise can you point me at >>>>> the relevant repository and I'll fork that? >>>>> >>> Yes, I can point you to a repo (it will be a little while). >>> I did this awhile ago, the work was originally done on the >>> 0.8dev branch. It will need to be merged to 0.9. >> >> Great, just let me know when you have it. >> >> Cheers, >> >> Henry > > > Here are the merged changes - I don't know if this is > the final version/format desired but it is a starting > point, I merged it to the 0.9dev branch: > > https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview > > One note of caution, I had made these changes a while > back on 0.8 branch. I used mercurial to merge but which > all went well. But when I pushed it back to the repo above > it indicated it had to create a new head. Not 100% positive > if we want the closed/dead/hanging head pushed back to the > main repo. > > If you fork/clone this make sure you update to the 0.9dev > branch > > >> hg up -C 0.9-dev > > Regards, > Chris > > > > ------------------------------------------------------------------------------ > "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 > -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |
From: Jan D. <ja...@ja...> - 2014-05-24 10:30:36
|
0.8 is in maintenance mode. Bug fixes yes, but new development should be based on 0.9. Otherwize things are going to be messy. I have recently merged in or handled all outstanding PRs I believe. Jan On 05/24/2014 02:52 AM, Christopher Felton wrote: > On 5/23/14 4:47 PM, Henry Gomersall wrote: >> On 23/05/14 21:55, Christopher Felton wrote: >>> On 5/23/2014 3:04 PM, Henry Gomersall wrote: >>>>> On 23/05/14 20:57, Christopher Felton wrote: >>>>>>>>>>> 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:) >>>>>>> >>>>> Can you do a sibling pull request (I mean, is it possible)? It makes >>>>> sense to not replicate one another's work! Otherwise can you point me at >>>>> the relevant repository and I'll fork that? >>>>> >>> Yes, I can point you to a repo (it will be a little while). >>> I did this awhile ago, the work was originally done on the >>> 0.8dev branch. It will need to be merged to 0.9. >> >> Great, just let me know when you have it. >> >> Cheers, >> >> Henry > > > Here are the merged changes - I don't know if this is > the final version/format desired but it is a starting > point, I merged it to the 0.9dev branch: > > https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview > > One note of caution, I had made these changes a while > back on 0.8 branch. I used mercurial to merge but which > all went well. But when I pushed it back to the repo above > it indicated it had to create a new head. Not 100% positive > if we want the closed/dead/hanging head pushed back to the > main repo. > > If you fork/clone this make sure you update to the 0.9dev > branch > > >> hg up -C 0.9-dev > > Regards, > Chris > > > > ------------------------------------------------------------------------------ > "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 > -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |
From: Christopher F. <chr...@gm...> - 2014-05-24 12:38:11
|
On 5/24/14 4:56 AM, Jan Decaluwe wrote: > 0.8 is in maintenance mode. Bug fixes yes, but > new development should be based on 0.9. Otherwize > things are going to be messy. Of course, but I had made the changes on the 0.8 branch when we were doing 0.8 dev. I attempted to leverage mercurial to merge and prune. The only reason I mentioned it was as a heads up and/or a reminder for me I guess to be safe I will manually create a new clone and copy the files over because I am not 100% sure what happened on 0.8. Regards, Chris |
From: Christopher F. <chr...@gm...> - 2014-05-24 12:46:44
|
Henry, I recreated the doctest repo to make sure there were not lingering effects on previous branches. Hopefully you haven't clone it yet and no harm, otherwise if you did clone, could you reclone https://cf...@bi.../cfelton/myhdl_09dev_doctest And make the changes in the new repo (with the same name :) Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-04 17:30:02
|
On 24/05/14 01:52, Christopher Felton wrote: > Here are the merged changes - I don't know if this is > the final version/format desired but it is a starting > point, I merged it to the 0.9dev branch: > > https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview Did you ever had this working? I'm getting a problem in which inspect.getsource is unable to return the correct source of the function inside always_comb. Specifically, the source of muxLogic in comb1 in rtl.rst is given as: def test(): print "z a b sel" for i in range(8): a.next, b.next, sel.next = randrange(8), randrange(8), randrange(2) yield delay(10) print "%s %s %s %s" % (z, a, b, sel) i.e. the source of test(). Clearly, this means the sensitivity list is not found properly with a resultant error raised by myhdl. The test code works fine in a standalone .py file, so it's some interaction with sphinx doctest. Cheers, Henry |
From: Henry G. <he...@ca...> - 2015-01-04 17:38:25
|
On 04/01/15 17:29, Henry Gomersall wrote: > On 24/05/14 01:52, Christopher Felton wrote: >> >Here are the merged changes - I don't know if this is >> >the final version/format desired but it is a starting >> >point, I merged it to the 0.9dev branch: >> > >> >https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview > Did you ever had this working? > > I'm getting a problem in which inspect.getsource is unable to return the > correct source of the function inside always_comb. > > Specifically, the source of muxLogic in comb1 in rtl.rst is given as: > > def test(): > print "z a b sel" > for i in range(8): > a.next, b.next, sel.next = randrange(8), randrange(8), > randrange(2) > yield delay(10) > print "%s %s %s %s" % (z, a, b, sel) > > i.e. the source of test(). Clearly, this means the sensitivity list is > not found properly with a resultant error raised by myhdl. > > The test code works fine in a standalone .py file, so it's some > interaction with sphinx doctest. Further to this, I've got a working doctest suite for rtl.rst. This is at: https://bitbucket.org/heng/myhdl/branch/0.9-dev I had to replicate some code in the documentation for doctest to work (which just makes it easier to copy and paste, though potentially open to replication errors down the line). The issue seemed to be related to globals in the doctest string, though I've not tried to hard to get to the bottom of it. My hg-fu is low, so I've no idea what's going on with multiple heads and whatnot - I'd appreciate being enlightened. It's not exactly intuitive! Cheers, Henry |
From: Christopher F. <chr...@gm...> - 2015-01-06 04:25:58
|
<snip> > > My hg-fu is low, so I've no idea what's going on with multiple heads and > whatnot - I'd appreciate being enlightened. It's not exactly intuitive! > hg multiple heads, usually need to be merged. This is the default case when you are modifying your local copy (tip) and then pull from somewhere else. The cure is typically a merge. If you merge right after a pull all works. if not you might have to specify the heads to merge, something like: >> hg heads >> hg merge tip ... More information here: http://mercurial.selenic.com/wiki/MultipleHeads This post uses nice diagrams (Directed Acyclic Graph (a DAG)) to show how heads are created and merged, and merge vs. rebase. This might help visualize what is going on. http://softwareswirl.blogspot.com/2009/04/truce-in-merge-vs-rebase-war.html This might be helpful: http://mercurial.selenic.com/wiki/GitConcepts Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-06 20:47:30
|
On 06/01/15 04:23, Christopher Felton wrote: >> >My hg-fu is low, so I've no idea what's going on with multiple heads and >> >whatnot - I'd appreciate being enlightened. It's not exactly intuitive! >> > > hg multiple heads, usually need to be merged. This is > the default case when you are modifying your local copy > (tip) and then pull from somewhere else. The cure is > typically a merge. If you merge right after a pull all > works. if not you might have to specify the heads to > merge, something like: > > >> hg heads > >> hg merge tip ... > > More information here: > http://mercurial.selenic.com/wiki/MultipleHeads > > This post uses nice diagrams (Directed Acyclic Graph > (a DAG)) to show how heads are created and merged, and > merge vs. rebase. This might help visualize what is > going on. > http://softwareswirl.blogspot.com/2009/04/truce-in-merge-vs-rebase-war.html > > This might be helpful: > http://mercurial.selenic.com/wiki/GitConcepts Thanks for that. Is my repository in a fit state for a PR? It doesn't seem to be complaining about multiple heads at the moment. I can fold in any changes that come out of the current discussions about the best doctest strategy. Henry |
From: Christopher F. <chr...@gm...> - 2015-01-06 12:20:38
|
On 1/4/15, 11:38 AM, Henry Gomersall wrote: > On 04/01/15 17:29, Henry Gomersall wrote: >> On 24/05/14 01:52, Christopher Felton wrote: >>>> Here are the merged changes - I don't know if this is >>>> the final version/format desired but it is a starting >>>> point, I merged it to the 0.9dev branch: >>>> >>>> https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview >> Did you ever had this working? >> >> I'm getting a problem in which inspect.getsource is unable to return the >> correct source of the function inside always_comb. >> >> Specifically, the source of muxLogic in comb1 in rtl.rst is given as: >> >> def test(): >> print "z a b sel" >> for i in range(8): >> a.next, b.next, sel.next = randrange(8), randrange(8), >> randrange(2) >> yield delay(10) >> print "%s %s %s %s" % (z, a, b, sel) >> >> i.e. the source of test(). Clearly, this means the sensitivity list is >> not found properly with a resultant error raised by myhdl. >> >> The test code works fine in a standalone .py file, so it's some >> interaction with sphinx doctest. > > Further to this, I've got a working doctest suite for rtl.rst. This is at: > > https://bitbucket.org/heng/myhdl/branch/0.9-dev > > I had to replicate some code in the documentation for doctest to work > (which just makes it easier to copy and paste, though potentially open > to replication errors down the line). The issue seemed to be related to > globals in the doctest string, though I've not tried to hard to get to > the bottom of it. > I did not find a work around for this. Your approach is nice to enable doctest but I am worried the maintenance will be a pain (double code snips). Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-06 19:44:34
|
On 06/01/15 12:10, Christopher Felton wrote: >> I had to replicate some code in the documentation for doctest to work >> >(which just makes it easier to copy and paste, though potentially open >> >to replication errors down the line). The issue seemed to be related to >> >globals in the doctest string, though I've not tried to hard to get to >> >the bottom of it. >> > > I did not find a work around for this. Your approach is nice > to enable doctest but I am worried the maintenance will be a > pain (double code snips). Yeah, I can't work out how else to do it (easily). I noticed the FSM code later on works fine in which the test suite is defined differently - everything is done inside a function. Perhaps this is a solution, though I sort of thought it's quite useful showing a few different ways to work. Cheers, Henry |
From: Ben <ben...@gm...> - 2015-01-06 20:31:44
|
On Tue, Jan 6, 2015 at 1:10 PM, Christopher Felton <chr...@gm...> wrote: > On 1/4/15, 11:38 AM, Henry Gomersall wrote: >> On 04/01/15 17:29, Henry Gomersall wrote: >>> On 24/05/14 01:52, Christopher Felton wrote: >>>>> Here are the merged changes - I don't know if this is >>>>> the final version/format desired but it is a starting >>>>> point, I merged it to the 0.9dev branch: >>>>> >>>>> https://bitbucket.org/cfelton/myhdl_09dev_doctest/overview >>> Did you ever had this working? >>> >>> I'm getting a problem in which inspect.getsource is unable to return the >>> correct source of the function inside always_comb. >>> >>> Specifically, the source of muxLogic in comb1 in rtl.rst is given as: >>> >>> def test(): >>> print "z a b sel" >>> for i in range(8): >>> a.next, b.next, sel.next = randrange(8), randrange(8), >>> randrange(2) >>> yield delay(10) >>> print "%s %s %s %s" % (z, a, b, sel) >>> >>> i.e. the source of test(). Clearly, this means the sensitivity list is >>> not found properly with a resultant error raised by myhdl. >>> >>> The test code works fine in a standalone .py file, so it's some >>> interaction with sphinx doctest. >> >> Further to this, I've got a working doctest suite for rtl.rst. This is at: >> >> https://bitbucket.org/heng/myhdl/branch/0.9-dev >> >> I had to replicate some code in the documentation for doctest to work >> (which just makes it easier to copy and paste, though potentially open >> to replication errors down the line). The issue seemed to be related to >> globals in the doctest string, though I've not tried to hard to get to >> the bottom of it. >> > > I did not find a work around for this. Your approach is nice > to enable doctest but I am worried the maintenance will be a > pain (double code snips). Maybe there is a way using the ``doctest_global_setup`` config value [0]. The conf.py file is python so it should be possible to read (part of) another python file to populate that variable. That code would be automatically 'duplicated' on top of each file ... Just my 2c. Ben. [0] http://sphinx-doc.org/ext/doctest.html#confval-doctest_global_setup |
From: Henry G. <he...@ca...> - 2015-01-06 20:44:59
|
On 06/01/15 20:31, Ben wrote: >>> I had to replicate some code in the documentation for doctest to work >>> >>(which just makes it easier to copy and paste, though potentially open >>> >>to replication errors down the line). The issue seemed to be related to >>> >>globals in the doctest string, though I've not tried to hard to get to >>> >>the bottom of it. >>> >> >> > >> >I did not find a work around for this. Your approach is nice >> >to enable doctest but I am worried the maintenance will be a >> >pain (double code snips). > Maybe there is a way using the ``doctest_global_setup`` config value > [0]. The conf.py file is python so it should be possible to read (part > of) another python file to populate that variable. That code would be > automatically 'duplicated' on top of each file ... I did wonder if there was some trick that could be done with defining functions elsewhere. I can't see how this solves it though. Is there some way in which a global (or perhaps a hidden local) can be used to make sure the displayed code is correct? I don't see how we get round the problem that a carried forward instance factory seems to get broken by doctest. Henry |
From: Christopher F. <chr...@gm...> - 2015-01-08 14:05:35
|
On 1/6/2015 2:31 PM, Ben wrote: <snip> >>> >>> Further to this, I've got a working doctest suite for rtl.rst. This is at: >>> >>> https://bitbucket.org/heng/myhdl/branch/0.9-dev >>> >>> I had to replicate some code in the documentation for doctest to work >>> (which just makes it easier to copy and paste, though potentially open >>> to replication errors down the line). The issue seemed to be related to >>> globals in the doctest string, though I've not tried to hard to get to >>> the bottom of it. >>> >> >> I did not find a work around for this. Your approach is nice >> to enable doctest but I am worried the maintenance will be a >> pain (double code snips). > > Maybe there is a way using the ``doctest_global_setup`` config value > [0]. The conf.py file is python so it should be possible to read (part > of) another python file to populate that variable. That code would be > automatically 'duplicated' on top of each file ... > > Just my 2c. > > Ben. I think there are a couple different approaches to workaround the issue. But I don't know if it helps achieve the overall goal of doctest, which is (in my mind): 1. verify the code snips are correct in the documentation with automated and regression testings I think for this to be useful it really needs to test the code that is eventually displayed. This means that the doctest in the sphinx documentation might not be possible depending if the issue can be resolved. Because there are multiple systems etc. not sure where/how to start debugging the issue. If more regression tests are desired it would be easier to create more tests than try and enable tests embedded in the documentation. Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-08 14:44:41
|
On 08/01/15 14:00, Christopher Felton wrote: > This means that the doctest in the sphinx documentation > might not be possible depending if the issue can be > resolved. Because there are multiple systems etc. not > sure where/how to start debugging the issue. > > If more regression tests are desired it would be easier > to create more tests than try and enable tests embedded > in the documentation. I agree with this. However, as seems to be the case, it is possible to have a version of the code which has a test bench function rather than is a set of global operations which seems to work as desired (see the FSM code further down). If this is the case we can just change the structure of the code to fit that model. Cheers, Henry |
From: Christopher F. <chr...@gm...> - 2015-01-08 15:02:47
|
On 1/8/2015 8:44 AM, Henry Gomersall wrote: > On 08/01/15 14:00, Christopher Felton wrote: >> This means that the doctest in the sphinx documentation >> might not be possible depending if the issue can be >> resolved. Because there are multiple systems etc. not >> sure where/how to start debugging the issue. >> >> If more regression tests are desired it would be easier >> to create more tests than try and enable tests embedded >> in the documentation. > > I agree with this. However, as seems to be the case, it is possible to > have a version of the code which has a test bench function rather than > is a set of global operations which seems to work as desired (see the > FSM code further down). If this is the case we can just change the > structure of the code to fit that model. > Is this what you currently have in your repo? Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-08 15:07:47
|
On 08/01/15 15:01, Christopher Felton wrote: > On 1/8/2015 8:44 AM, Henry Gomersall wrote: >> >On 08/01/15 14:00, Christopher Felton wrote: >>> >>This means that the doctest in the sphinx documentation >>> >>might not be possible depending if the issue can be >>> >>resolved. Because there are multiple systems etc. not >>> >>sure where/how to start debugging the issue. >>> >> >>> >>If more regression tests are desired it would be easier >>> >>to create more tests than try and enable tests embedded >>> >>in the documentation. >> > >> >I agree with this. However, as seems to be the case, it is possible to >> >have a version of the code which has a test bench function rather than >> >is a set of global operations which seems to work as desired (see the >> >FSM code further down). If this is the case we can just change the >> >structure of the code to fit that model. >> > > Is this what you currently have in your repo? Yup https://bitbucket.org/heng/myhdl/raw/641c450dac65cfa16edd42c45a43c101f3aa2db1/doc/source/manual/rtl.rst Cheers, Henry |
From: Christopher F. <chr...@gm...> - 2015-01-08 15:56:52
|
On 1/8/2015 9:07 AM, Henry Gomersall wrote: > On 08/01/15 15:01, Christopher Felton wrote: >> On 1/8/2015 8:44 AM, Henry Gomersall wrote: >>>> On 08/01/15 14:00, Christopher Felton wrote: >>>>>> This means that the doctest in the sphinx documentation >>>>>> might not be possible depending if the issue can be >>>>>> resolved. Because there are multiple systems etc. not >>>>>> sure where/how to start debugging the issue. >>>>>> >>>>>> If more regression tests are desired it would be easier >>>>>> to create more tests than try and enable tests embedded >>>>>> in the documentation. >>>> >>>> I agree with this. However, as seems to be the case, it is possible to >>>> have a version of the code which has a test bench function rather than >>>> is a set of global operations which seems to work as desired (see the >>>> FSM code further down). If this is the case we can just change the >>>> structure of the code to fit that model. >>>> >> Is this what you currently have in your repo? > Yup > > https://bitbucket.org/heng/myhdl/raw/641c450dac65cfa16edd42c45a43c101f3aa2db1/doc/source/manual/rtl.rst > A quick look this looks good for a PR. I will fork tonight and test on my system(s) as well. I am a little confused why one of the expected output tables had to be changed (worried it is system dependent based on the random values even though it is seeded). Regards, Chris |
From: Henry G. <he...@ca...> - 2015-01-08 16:26:39
|
On 08/01/15 15:54, Christopher Felton wrote: > On 1/8/2015 9:07 AM, Henry Gomersall wrote: >> >On 08/01/15 15:01, Christopher Felton wrote: >>> >>On 1/8/2015 8:44 AM, Henry Gomersall wrote: >>>>> >>>>On 08/01/15 14:00, Christopher Felton wrote: >>>>>>> >>>>>>This means that the doctest in the sphinx documentation >>>>>>> >>>>>>might not be possible depending if the issue can be >>>>>>> >>>>>>resolved. Because there are multiple systems etc. not >>>>>>> >>>>>>sure where/how to start debugging the issue. >>>>>>> >>>>>> >>>>>>> >>>>>>If more regression tests are desired it would be easier >>>>>>> >>>>>>to create more tests than try and enable tests embedded >>>>>>> >>>>>>in the documentation. >>>>> >>>> >>>>> >>>>I agree with this. However, as seems to be the case, it is possible to >>>>> >>>>have a version of the code which has a test bench function rather than >>>>> >>>>is a set of global operations which seems to work as desired (see the >>>>> >>>>FSM code further down). If this is the case we can just change the >>>>> >>>>structure of the code to fit that model. >>>>> >>>> >>> >>Is this what you currently have in your repo? >> >Yup >> > >> >https://bitbucket.org/heng/myhdl/raw/641c450dac65cfa16edd42c45a43c101f3aa2db1/doc/source/manual/rtl.rst >> > > A quick look this looks good for a PR. I will fork > tonight and test on my system(s) as well. I am a > little confused why one of the expected output tables > had to be changed (worried it is system dependent > based on the random values even though it is seeded). Do you mean changed from the original source you had up? Yeah, that concerned me slightly too - sorry, I should have noted that. This would suggest it should be stable... https://docs.python.org/3/library/random.html#notes-on-reproducibility though this is worth noting too... http://stackoverflow.com/questions/11929701/why-is-seeding-the-random-generator-not-stable-between-versions-of-python Note that the always_comb code is replicated as it stands. Henry |
From: Christopher F. <chr...@gm...> - 2015-01-09 04:31:50
|
On 1/8/15, 10:26 AM, Henry Gomersall wrote: > On 08/01/15 15:54, Christopher Felton wrote: >> On 1/8/2015 9:07 AM, Henry Gomersall wrote: >>>> On 08/01/15 15:01, Christopher Felton wrote: >>>>>> On 1/8/2015 8:44 AM, Henry Gomersall wrote: >>>>>>>>>> On 08/01/15 14:00, Christopher Felton wrote: <snip> >>>>>> Is this what you currently have in your repo? >>>> Yup >>>> >>>> https://bitbucket.org/heng/myhdl/raw/641c450dac65cfa16edd42c45a43c101f3aa2db1/doc/source/manual/rtl.rst >>>> >> A quick look this looks good for a PR. I will fork >> tonight and test on my system(s) as well. I am a >> little confused why one of the expected output tables >> had to be changed (worried it is system dependent >> based on the random values even though it is seeded). > > Do you mean changed from the original source you had up? Yeah, that > concerned me slightly too - sorry, I should have noted that. > > This would suggest it should be stable... > https://docs.python.org/3/library/random.html#notes-on-reproducibility > > though this is worth noting too... > http://stackoverflow.com/questions/11929701/why-is-seeding-the-random-generator-not-stable-between-versions-of-python > > Note that the always_comb code is replicated as it stands. > I forked and tested and no errors. I think the duplicate code should be removed and change to the other test. Regards, Chris |