sb0_ changed the topic of #m-labs to: https://m-labs.hk :: Logs http://irclog.whitequark.org/m-labs
<_whitenotifier-6> [m-labs/nmigen] whitequark pushed 1 commit to master [+1/-0/±9] https://git.io/fhJ2H
<_whitenotifier-6> [m-labs/nmigen] whitequark 9e30a0b - cli: new module, for basic design generaton/simulation.
<_whitenotifier-6> [m-labs/nmigen] whitequark pushed 1 commit to master [+1/-0/±9] https://git.io/fhJ27
<_whitenotifier-6> [m-labs/nmigen] whitequark cf79738 - cli: new module, for basic design generaton/simulation.
<_whitenotifier-6> [nmigen] Error. The Travis CI build could not complete due to an error - https://travis-ci.org/m-labs/nmigen/builds/471473942?utm_source=github_status&utm_medium=notification
<_whitenotifier-6> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/471474157?utm_source=github_status&utm_medium=notification
<_whitenotifier-6> [nmigen] Success. 79.37% remains the same compared to 621ddde - https://codecov.io/gh/m-labs/nmigen/commit/cf79738744994de37b7a77666845a447d7ebe2e0
<_whitenotifier-6> [nmigen] Success. Coverage not affected when comparing 621ddde...cf79738 - https://codecov.io/gh/m-labs/nmigen/commit/cf79738744994de37b7a77666845a447d7ebe2e0
tmbinc2 has quit [Ping timeout: 246 seconds]
tmbinc2 has joined #m-labs
<cr1901_modern> sb0: Did you check the most recent commits on that PR? For some reason Github's didn't mark stuff as resolved when I updated.
<cr1901_modern> Anyways, the crux of that PR is that tests shouldn't fail if you don't have proprietary toolchains installed. Which they will if you run build(source=True). But the tests should be run. >>
<cr1901_modern> So _if_ a given test fails because the toolchain isn't installed, I rerun the test with source=False. Because build isn't idempotent, I have to recreate the toolchain object.
<cr1901_modern> if the build fails*.
<cr1901_modern> sb0: Alternate idea... raise unittest.SkipTest if toolchains aren't installed. That should make it simpler.
<sb0> cr1901_modern: yes, it's still complicated
<sb0> why is it more than a few if's?
<cr1901_modern> Because you potentially have to run platform.build() twice
<sb0> why?
<cr1901_modern> Xilinx, ISE, and Diamond can raise an exception if the toolchain_path doesn't exist. THe other toolchains don't have this problem.
<cr1901_modern> So I either handle the exception (rerun platform.build()) or the test fails.
<cr1901_modern> Or alternately I could skip the test.
<sb0> can you explain the logic of what you are trying to do?
<cr1901_modern> Python tests fail if they raise an exception, right? Most test exceptions indicate that the last committer broke the code. IMO the exception raised from platform.build() when toolchains don't exist is spurious; it shouldn't cause CI to fail.
<sb0> and why the tests should care whether the toolchain has this sourcing script or not?
<sb0> what we do with artiq is set certain environment variables that e.g. say that the hardware is present
<sb0> otherwise the corresponding tests are skipped
<sb0> can't the same thing be done here?
<cr1901_modern> That'll work too.
<cr1901_modern> >and why the tests should care whether the toolchain has this sourcing script or not?
<cr1901_modern> And to answer this question... ummm I guess it doesn't have to.
<cr1901_modern> My logic here was: "If sourcing is enabled, anticipate a spurious exception. If it's disabled, any exception raised should fail the test."
<cr1901_modern> Your idea is cleaner tho.
<cr1901_modern> sb0: TLDR I was trying to make the unittests smarter so the user didn't have to do manual work
<sb0> the exception may not be that spurious and also the user wants to know if the toolchain gets tested or not
<cr1901_modern> So toolchain tests (for the proprietary ones anyway) should be opt-in?
<whitequark> cr1901_modern: do not run platform.build twice
<whitequark> in current migen this can mess up the gateware
<whitequark> because of finalization quirks
<whitequark> iirc i hit it in glasgow and had to monkey patch a workaround
<cr1901_modern> even if I recreated the platform object?
<whitequark> just avoid it
<whitequark> nmigen is designed to not have this problem
<cr1901_modern> what form do artiq vars take? /me takes a look
<cr1901_modern> MIGEN_HAS_ISE, MIGEN_HAS_VIVADO, MIGEN_HAS_DIAMOND
<cr1901_modern> and well MIGEN_HAS_QUARTUS if that backend ever gets love
<cr1901_modern> Looks like MIPS realized they lost the war...
<whitequark> they were at war?
<whitequark> i think they were asleep.
<cr1901_modern> Maybe they were neutral, hoping that their router contracts would be enough to get by. I dunno. My gut feeling is "too little too late", though I'm not against a litigation-proof open MIPS core.
<sb0> cr1901_modern: yes, disable the toolchain test unless some environment variable is set
<sb0> why do you care about mips? use lm32, risc-v or even or1k
<whitequark> mips went open-source
<whitequark> that doesnt make it worth anything
<sb0> cr1901_modern: in general people have only one shitty FPGA toolchain installed, which is enough pain already
<cr1901_modern> Yea I seem to be an outlier there
<cr1901_modern> I have 3
<cr1901_modern> (on different machines)
<cr1901_modern> sb0: I don't care about MIPS, just... the more RISCy CPUs the merrier lol.
<whitequark> not really
<whitequark> we do not need more shitty CPUs like mips
_whitelogger has joined #m-labs
<cr1901_modern> sb0: >yes, disable the toolchain test unless some environment variable is set
<cr1901_modern> Since we don't actually build, toolchain tests without source variable are unaffected if the toolchain isn't present. Do you want me to include env vars for those too?
cr1901_modern1 has joined #m-labs
cr1901_modern has quit [Disconnected by services]
cr1901_modern1 has quit [Client Quit]
cr1901_modern has joined #m-labs
rohitksingh has joined #m-labs
<sb0> cr1901_modern: if the toolchain is installed, then it should build. if it's not, do nothing.
<cr1901_modern> ack. Give me a day or so to rework the tests then
rohitksingh has quit [Ping timeout: 250 seconds]
rohitksingh has joined #m-labs
_whitelogger_ has joined #m-labs
_whitelogger has quit [Ping timeout: 268 seconds]
<_whitenotifier-6> [m-labs/nmigen] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fhJK1
<_whitenotifier-6> [m-labs/nmigen] whitequark 2b6ddbb - back.rtlil: fix swapped operands in mux codegen.
whitequark has quit [Ping timeout: 250 seconds]
<_whitenotifier-6> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/471525683?utm_source=github_status&utm_medium=notification
<_whitenotifier-6> [nmigen] Success. 79.37% remains the same compared to cf79738 - https://codecov.io/gh/m-labs/nmigen/commit/2b6ddbb7139c98d05c7e8e49ab6c8ac2fccfbfbf
<_whitenotifier-6> [nmigen] Success. Coverage not affected when comparing cf79738...2b6ddbb - https://codecov.io/gh/m-labs/nmigen/commit/2b6ddbb7139c98d05c7e8e49ab6c8ac2fccfbfbf
whitequark has joined #m-labs
_whitelogger has joined #m-labs
_whitelogger has joined #m-labs
<whitequark> hm
<whitequark> so I've rechecked everything and... *now* the split and joined files synthesize to the same LUT count in Yosys
<whitequark> I have no idea why
<whitequark> this doesn't make any damn sense. it was *definitely* different before
rohitksingh has quit [Ping timeout: 272 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 246 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 250 seconds]
rohitksingh has joined #m-labs
<_whitenotifier-6> [m-labs/nmigen] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fhJPd
<_whitenotifier-6> [m-labs/nmigen] whitequark 4e49772 - cli: generate: guess file type from extension.
<_whitenotifier-6> [m-labs/nmigen] whitequark pushed 3 commits to master [+0/-0/±3] https://git.io/fhJPF
<_whitenotifier-6> [m-labs/nmigen] whitequark 45a4747 - back.rtlil: only translate switch tests once.
<_whitenotifier-6> [m-labs/nmigen] whitequark 9faa1d3 - back.rtlil: do not translate empty fragments.
<_whitenotifier-6> [m-labs/nmigen] whitequark 5702767 - back.rtlil: emit dummy logic to work around Verilog deficiencies.
<_whitenotifier-6> [nmigen] Error. The Travis CI build could not complete due to an error - https://travis-ci.org/m-labs/nmigen/builds/471551870?utm_source=github_status&utm_medium=notification
<_whitenotifier-6> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/471551888?utm_source=github_status&utm_medium=notification
<_whitenotifier-6> [nmigen] Success. 79.37% remains the same compared to 2b6ddbb - https://codecov.io/gh/m-labs/nmigen/commit/57027672632844176193ad75ceb8d5196d1b1aba
<_whitenotifier-6> [nmigen] Success. Coverage not affected when comparing 2b6ddbb...5702767 - https://codecov.io/gh/m-labs/nmigen/commit/57027672632844176193ad75ceb8d5196d1b1aba
rohitksingh has quit [Ping timeout: 246 seconds]
<whitequark> and it of course simulates correctly too
<whitequark> in iverilog and nmigen sim
<whitequark> and iverilog and yosys ingest the identical rtl
<whitequark> no changes for synth/sim
<_whitenotifier-6> [nmigen] whitequark opened issue #13: Case with key wider than test results in assertion failure - https://git.io/fhJ1S
rohitksingh has joined #m-labs
early` has quit [Ping timeout: 268 seconds]
early has joined #m-labs
rohitksingh has quit [Ping timeout: 246 seconds]
<cr1901_modern> sb0: Is something like this fine for creating a per-toolchain env var? http://ix.io/1wFc
<cr1901_modern> (This gets fed into os.getenv() to determine whether to run a test build or not)
Gurty has quit [Quit: Kooll ~o~ datalove <3³\infty]
balrog has quit [Quit: Bye]
zng has quit [Ping timeout: 250 seconds]
balrog has joined #m-labs