Re: [myhdl-list] Another typo in docs
Brought to you by:
jandecaluwe
From: Henry G. <he...@ca...> - 2015-01-09 11:14:03
|
On 09/01/15 04:30, Christopher Felton wrote: > 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. I think the problem is the introspection method done in always_comb. func.func_globals.items() just returns the wrong thing under doctest when there is a break in the code and no amount of playing around seems to solve this. I've implemented a workaround in which mux_1 and the signals are created directly below the Mux code, these are then used in the test bench. I think it's pretty good and doesn't substantially detract from the information presentation. Cheers, Henry |