amclain has quit [Quit: Leaving]
promach__ has joined ##openfpga
scrts has quit [Ping timeout: 246 seconds]
SpaceCoaster has quit [Ping timeout: 260 seconds]
promach__ has quit [Quit: Leaving]
SpaceCoaster has joined ##openfpga
scrts has joined ##openfpga
digshadow has quit [Quit: Leaving.]
digshadow has joined ##openfpga
digshadow has quit [Quit: Leaving.]
<rqou> hmm abc has a bug that only fails to build on mingw
<cr1901_modern> rqou: Is it this (or something similar) again? https://bitbucket.org/alanmi/abc/pull-requests/47/fix-windows-yosys-compile-due-to/diff
<cr1901_modern> If so, this would be the third time name mangling bullshit reared it's ugly head since I've build abc the first time
<rqou> not that
<rqou> i'm actually not sure why it only breaks on mingw
<rqou> ug i also have no idea how to use hg because everything is named differently
<rqou> now to investigate how azonenberg broke _both macOS and win64 builds of openfpga
m_w has joined ##openfpga
<azonenberg> rqou: lol
<azonenberg> I would fix that instead by calling ::bind
<azonenberg> less intrusive to the rest of the code
<rqou> you can do that too
<azonenberg> Do it that way and i'll merge
<rqou> but you only used std in two other places anyways
<azonenberg> two vs one... :p
<rqou> alright, changed
<rqou> er nope
<rqou> didn't change the commit message
<rqou> fixed for real
<rqou> stack overflow says that "using namespace std" isn't super great in general though: https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice#1453605
<rqou> btw azonenberg forking submodules is a huge pain
<azonenberg> lol oh?
<rqou> to make a fork of openfpga use a fork of e.g. xptools, you have to manually add a new remote
<rqou> and then switch over to it
<azonenberg> rqou: re the _windows define
<azonenberg> pretty sure that was build system based
<azonenberg> for win32 or win64
<azonenberg> but i guess ms is being silly and compatible and having win32 be set even on win64 :p
<rqou> yeah
<rqou> _WIN32 is always defined
<azonenberg> "was build system based" = i copied the code from another repo
<azonenberg> and must have not copied that config :p
<rqou> even on x86_64 or AARCH64 :P
<azonenberg> lol
<rqou> also, windows aarch64 is probably going to end up wrecking a bunch of assumptions all over again
<rqou> er
<azonenberg> this nonsense is the same reason we have win 10 instead of win 9
<azonenberg> :p
<rqou> maybe not, since we did also have ia64
<openfpga-github> [openfpga] azonenberg pushed 2 new commits to master: https://git.io/vHKtK
<openfpga-github> openfpga/master 8a4cc70 Andrew Zonenberg: Added GetInput() to all BitstreamEntity-derived classes. Began work on post-PAR static timing.
<openfpga-github> openfpga/master 21a9004 Andrew Zonenberg: Updated to latest xptools
<azonenberg> rqou: also re std:: namespace collisions
<azonenberg> my rule is, fix the offending code
<azonenberg> If you ever namespace collide with std:: i consider your code wrong
<rqou> except bind() the syscall predates std::bind() by at least a decade
<azonenberg> Yes, so explicitly specifying the global namespace is an annoying necessity there (the one place in the whole codebase you call it)
<rqou> make that more like 3+ decades actually :P
<rqou> std::bind is a c++11 feature
<azonenberg> I would also agree that naming a standard library function the same as a syscall on a major platform (all major platforms, in fact)
<azonenberg> is a poor decision
<azonenberg> namespaces or no namespaces
<rqou> not a syscall on windows :P
<azonenberg> IMO std:: should not have been namespaced in the first place
<azonenberg> they should have been in the global namespace and considered reserved names
<rqou> um... except there are thousands of them
<rqou> what about freestanding c++ (no STL?)
<azonenberg> Yeah, and?
<rqou> you'll end up reserving thousands of really common names
<azonenberg> Then it would be legal to use those keywords, but a horrible idea because you could never reuse that code in anything with STL
<rqou> and what happens when you want to add more?
<azonenberg> its legal to define your own function in c called printf
<azonenberg> as long as you don't link to libc while doing it :p
<rqou> what happens when the STL needs to add a new name?
<rqou> it'll end up clashing
<rqou> in general namespacing seems to kinda suck in every language though
<azonenberg> well, in particular
<rqou> C++ being particularly bad
<azonenberg> namespacing is something you can use in 3rd party libraries, to prevent them from colliding with each other
<azonenberg> the standard library should not be namespaced because it's assumed everyone is using it
<azonenberg> or, if it *is* namespaced, your code should assume everyone is importing it
<rqou> rust does it that second way
<azonenberg> Because it's, well, the *standard* library
<rqou> code auto-imports the standard library, but it's still namespaced
<rqou> there's also #[no_std] if you're weird and doing embedded stuff
<rqou> rust also has a separation between std (the standard library) and core (compiler intrinsics/glue/internal)
<rqou> damn i really need to rework how raspbian builds are done
<rqou> azonenberg did you know that qemu-user-static is slow? :P :P
<azonenberg> lol
<azonenberg> no really?
<azonenberg> pin-to-pin delays only for now as i don't have setup/hold timing for anything
<rqou> ooh nice
<azonenberg> And right now it just reports every path
<azonenberg> there's no way to set constraints, sort them by delay, etc
<azonenberg> it just does a DFS of the entire graph from one pin until it hits another pin and reports timing along each path it finds
<azonenberg> But the way the code is written you could easily find paths that start/end at synchronous blocks like ffs
<azonenberg> it will take a bit of restructuring to report slowest paths first
<azonenberg> i have to separate the "find the paths" from the "compute timing along the paths"
<rqou> btw, what about xc2bit? :P
<azonenberg> One thing at a time, lol
<azonenberg> just got back from a SAR meeting, i have a lot on my TODO
<rqou> btw in case you want to install Rust: https://www.rustup.rs/
<rqou> slightly improved in that sudo isn't required in the second element of the pipeline :P :P
<rqou> alright, i'm going to go shower and find food
<rqou> and then we can have more bikesheds :P
DocScrutinizer05 has quit [Disconnected by services]
DocScrutinizer05 has joined ##openfpga
mifune has joined ##openfpga
mifune has joined ##openfpga
eduardo_ has joined ##openfpga
eduardo has quit [Ping timeout: 246 seconds]
m_w has quit [Quit: leaving]
mifune has quit [Ping timeout: 240 seconds]
Hootch has joined ##openfpga
<rqou> so, azonenberg
<rqou> i actually want to land xc2bit today :P
<openfpga-github> [openfpga] azonenberg pushed 23 new commits to master: https://git.io/vHKZz
<openfpga-github> openfpga/master 7a12381 Robert Ou: xc2bit: Basic structure for how to represent bitstreams
<openfpga-github> openfpga/master 7ab293d Robert Ou: xc2bit: Added jed parser
<openfpga-github> openfpga/master eac55c8 Robert Ou: xc2bit: Initial commit
<rqou> woot
<rqou> so azonenberg, whitequark: we should bikeshed about how we're going to proceed on this one: https://github.com/azonenberg/openfpga/pull/79
<azonenberg> So, at this point
<azonenberg> let me get this straight
<azonenberg> You have a cleaned-up fork of hidapi in a subdirectory
<azonenberg> It's been tested on all three platforms
<rqou> "cleaned-up"
<rqou> still quite ugly
<rqou> but i deleted all of the functions we definitely won't need
<azonenberg> what's the license again?
<rqou> and I did smoke-test on all three platforms
<azonenberg> :)
<rqou> one of either gpl, bsd, or a custom slightly-more-permissive-than-bsd-but-not-public-domain-equivalent license
<rqou> i elected to use the "bsd" choice
<azonenberg> Ok
<azonenberg> Which is LGPL compatible
<rqou> yes
<azonenberg> Let me pull and test
<rqou> the "custom slightly-more-permissive-than-bsd-but-not-public-domain-equivalent license" should be too
<rqou> but it's custom, so nope
* azonenberg installs libudev-dev
<rqou> right, that's next on my "kill it" list
<rqou> libusb actually optionally depends on libudev too for some reason
<rqou> you just usually don't notice
<azonenberg> Ok i was going to say
<azonenberg> add a cmake dependency
<azonenberg> but if you can remove the udev dependency
<azonenberg> that's even better
<rqou> currently it has:
<rqou> # FIXME: Why do we need udev?
<rqou> target_link_libraries(hidapi
<rqou> udev)
<rqou> json-c has the same problem :P
<azonenberg> Yeah but not a "complain if we don't have it" line
<azonenberg> i'd rather have it fail at configure than build time
<azonenberg> but if you plan to remove the dependency, don't worry about fixing the cmake in the short term
<azonenberg> Tested and works fine for me
<rqou> should still fix json-c though
<openfpga-github> [openfpga] azonenberg pushed 13 new commits to master: https://git.io/vHKnZ
<openfpga-github> openfpga/master 7fe963f cyrozap: Fix use-after-free of HID enumeration
<openfpga-github> openfpga/master 371be48 cyrozap: Fix GetStringDescriptor for the hidapi hidraw backend
<openfpga-github> openfpga/master 76fce9f cyrozap: Switch from libusb to hidapi
<rqou> json-c is surprisingly annoying to compile for a pure-portable-c library
<rqou> it uses autocrap
<rqou> and it needs an override for detecting malloc or something stupid like that
<rqou> woot
<rqou> thanks cyrozap!
<rqou> btw i wonder if this perturbs away the raspi "only works every other time" bug
<azonenberg> Good question, can you test?
<rqou> nope, roommate is asleep so i can't borrow his raspi right now :P
<rqou> i'll test it tomorrow, but it's quite possible we perturbed the bug away
<rqou> so, about the giant mess of xbpar-rs and the FFIPAREngine
<rqou> what should I do about that?
<azonenberg> Hold off on that
<azonenberg> if possible
<rqou> sure, it's pretty buggy and close-to-useless right now
<azonenberg> tl;dr major refactoring of gp4par/xbpar is going to come in the next month or so
<rqou> it's on a branch in my fork
<azonenberg> when i add things like timing driven placement
<azonenberg> i'm going to try to move a bunch of stuff around and clean things up
<azonenberg> also ooh i have two different pcbs coming in on thursday lol
<azonenberg> i have the probes for starshipraider and the rework practice board
<rqou> ugh, libudev internally is really terribly written
<openfpga-github> [openfpga] rqou opened pull request #93: hidapi crap removal (master...hidapi-test) https://git.io/vHKXe
<rqou> please test this extensively, especially across distros
<rqou> (i only have a native non-container install of debian-based distros)
<rqou> it shouldn't change, but who knows
<rqou> udev is a giant mess
<rqou> hmm actually don't merge this yet
<rqou> apparently I broke the rules and need to fix it
<rqou> but sleep first
azonenberg_work has quit [Ping timeout: 246 seconds]
X-Scale has joined ##openfpga
qu1j0t3 has quit [Quit: WeeChat 0.4.3]
qu1j0t3 has joined ##openfpga
m_w has joined ##openfpga
azonenberg_work has joined ##openfpga
Finnpixel has joined ##openfpga
digshadow has joined ##openfpga
amclain has joined ##openfpga
digshadow has quit [Ping timeout: 240 seconds]
digshadow has joined ##openfpga
azonenberg_work has quit [Ping timeout: 260 seconds]
digshadow has quit [Ping timeout: 246 seconds]
mifune has joined ##openfpga
mifune has joined ##openfpga
azonenberg_work has joined ##openfpga
pie__ has quit [Changing host]
pie__ has joined ##openfpga
Finnpixel has quit [Ping timeout: 246 seconds]
digshadow has joined ##openfpga
digshadow has quit [Quit: Leaving.]
digshadow has joined ##openfpga
<rqou> actually it seems the way i'm accessing sysfs is fine
digshadow has quit [Read error: Connection reset by peer]
<rqou> supposedly kay sievers was the one who wrote the documentation claiming what I did is wrong
digshadow has joined ##openfpga
<rqou> and he's the infamous "flamed by linus for breaking abi" guy
<azonenberg_work> lol
<jn__> rqou: isn't that Mauro, the media maintainer?
<rqou> iirc they both got one of these flames
<jn__> remember "Shut up, Mauro!"
<rqou> anyways, the particular piece of sketchiness is that i'm accessing "/sys/dev/char/%d:%d/device/../../%s" to go from a hidraw device to the usb device
<rqou> the first /device part has never been changed in the history of hidraw existing
<rqou> and it goes from the hidraw node to the hid bus node
<rqou> the first /.. goes from the hid bus node to the usb interface node, and this is considered a "testing" level ABI
<rqou> (which de-factor means that you probably can't change it anymore :P )
<rqou> *de-facto
<rqou> and the second /.. goes from the USB interface to the US device
<rqou> this is technically not stable, but wtf would you add that goes in the middle?
<rqou> aanyways, tl;dr i think what i'm doing is fine, and it doesn't require a giant mess of file parsing
<rqou> azonenberg_work: opinions about dropping mac os 10.5 support? (basically already didn't work anyways)
<azonenberg_work> Not a mac guy
<azonenberg_work> how old is that?
<rqou> almost a decade old
m_w has quit [Quit: leaving]
<azonenberg_work> Yeah drop it
<rqou> our de-facto minimum is 10.7, which came out in 2011
<azonenberg_work> Yeah that should be fine
<rqou> lowering this is (hilariously) a build system problem
<rqou> libc++ (with c++11 support) requires 10.7
<rqou> but you can still somehow via huge amounts of effort get gcc+libstcd++ to work
<rqou> and that gives you 10.6 support for anybody still clutching 10.6
<rqou> this means that we don't have mac os x PPC support though
<rqou> for anybody who wants to use this on a G5 tower or something
<rvense> 10.5 is the last to run on ppc
<rvense> .. you just said that
<rqou> yeah, too bad i guess?
<rqou> use linux?
<rvense> i think it's fine.
<qu1j0t3> rqou: 10.5 is last on powerpc
<qu1j0t3> oh
<qu1j0t3> you just said that ;)
* qu1j0t3 still has g5 towers and a g4 powerbook on 10.4 but i suppose this is a losing battle
<qu1j0t3> a lot of iMacs are locked to 10.6 (C2D generation)
<rqou> wait is this the dumb problem with 32-bit EFI?
<rqou> anyways, 10.6 can work, but the binaries i build require 10.7 because i can't be arsed to figure out _how_ to make it work
<rqou> i want to remove an ugly hack for 10.5 though
<qu1j0t3> rqou: Yeah the iMac issue is 32 bit EFI, i think.
<qu1j0t3> rqou: or, at least, that's the issue on early Mac Pros, but they can unofficially run El Capitan with EFI hacks (I'm doing this on a 2,1)
<qu1j0t3> rqou: iMacs can also be hacked but you run into device support issues, around video card, at least
<qu1j0t3> rqou: much as it pains me to say this, i think you should go for your convenience but document the limitations and invite others to overcome them on their own time
<rqou> i just felt that the 10.5 hack was a bit too disgusting to keep
<qu1j0t3> rqou: development velocity is probably the more important thing
<qu1j0t3> well, keep it if it's no cost to keep it?
<rqou> it casts a pointer to a private struct somewhere in iokit
<rqou> right now i'm trying to remove "silly useless shit" in hidapi
<rqou> i can add it back later i guess?
<rqou> it seems unlikely anyone is doing serious dev work on a mac os 10.5 machine
<qu1j0t3> that is true, but i'd at least leave a note or something
<rqou> yeah, i'm working on notes and other random bits
<qu1j0t3> having tried to backport stuff it is a cost/benefit situation i think
digshadow has quit [Quit: Leaving.]
Hootch has quit [Quit: Leaving]
m_t has joined ##openfpga
digshadow has joined ##openfpga
digshadow has quit [Quit: Leaving.]
digshadow has joined ##openfpga
mifune has quit [Ping timeout: 240 seconds]
m_w has joined ##openfpga
mifune has joined ##openfpga
nicdev` has joined ##openfpga
mithro_ has joined ##openfpga
cblam_ has joined ##openfpga
GreeningGalaxy has joined ##openfpga
cblam has quit [Ping timeout: 240 seconds]
mithro has quit [Ping timeout: 240 seconds]
bibor has quit [Ping timeout: 240 seconds]
Ellied has quit [Ping timeout: 240 seconds]
pointfree[m] has quit [Ping timeout: 240 seconds]
nicdev has quit [Ping timeout: 240 seconds]
gruetzkopf has quit [Ping timeout: 240 seconds]
cblam_ is now known as cblam
mithro_ is now known as mithro
gruetzkopf has joined ##openfpga
bibor has joined ##openfpga
gruetzkopf is now known as Guest61631
pointfree[m] has joined ##openfpga
mifune has quit [Ping timeout: 255 seconds]
nicdev` is now known as nicdev
mifune has joined ##openfpga
mifune has joined ##openfpga
<rqou> whitequark: how do i go about debugging a problem with cmake where CMAKE_C_FLAGS only takes effect when I run cmake twice?
<rqou> nvm, i found a relevant stack overflow post
m_t has quit [Quit: Leaving]
mifune has quit [Ping timeout: 260 seconds]
<rqou> azonenberg: btw gp4prog works on linux ppc
<rqou> :P
<rqou> or at least --blink does
<rqou> i didn't test if bitstreams potentially have endianness issues
<openfpga-github> [openfpga] rqou opened issue #94: segfault if timing.json is missing https://git.io/vHild
<azonenberg_work> o_O i need to debug that one
<azonenberg_work> Will look into it when i get home
<azonenberg_work> the timing analysis code is very hacky, i wrote it up last night lol
<azonenberg_work> It assumes you're using a slg4662x
<azonenberg_work> if you try to build for a 140 no idea how it'll react
<rqou> yeah i'm just going to comment out PrintTimingReport for now
<azonenberg_work> It *should* gracefully recover and revert to the old code if there's no timing data
<azonenberg_work> so i need to figure out what's up with that
<rqou> what voltage do i give blinky?
<rqou> 5v?
<azonenberg_work> it should run on anything
<rqou> do the leds auto-enable?
<azonenberg_work> no, gp4prog has to take an argument for that
<rqou> what args?
<azonenberg_work> gp4prog --help
<azonenberg_work> :P
<azonenberg_work> also dont forget --emulate loads to sram and --program burns otp
<rqou> there's a -n, but what pins do i pass?
<azonenberg_work> Pin numbers :p
<rqou> ah i don't need to look up an extra datasheet/manual?
<rqou> amazing!
<azonenberg_work> see Blinky.v
<azonenberg_work> so probably 20,19,18,17,16,15,14,13
<azonenberg_work> are the outputs
<rqou> i didn't realize those were the actual actual pins
<azonenberg_work> Those are pins on the zif socket / test points on the board
<azonenberg_work> If your DUT does not have 20 pins
<azonenberg_work> the DUT pin numbering may not match the ZIF pin numbering exactly
<azonenberg_work> i dont know how they do that
<azonenberg_work> would have to look at the stqfn-14 pin socket
<rqou> oooo
<rqou> azonenberg_work: gp4par/gp4prog work on my imac g3 (running linux)
<rqou> so there weren't any subtle endianness bugs or anything
<rqou> and the most amazing part?
<rqou> real0m0.345s
<rqou> user0m0.224s
<rqou> sys0m0.080s
<rqou> on a system that looks like this:
<rqou> $ cat /proc/cpuinfo
<rqou> processor: 0
<rqou> cpu: 740/750
<rqou> temperature : 30-32 C (uncalibrated)
<rqou> clock: 333.333330MHz
<rqou> revision: 2.2 (pvr 0008 0202)
<rqou> bogomips: 33.32
<rqou> timebase: 16663950
<rqou> platform: PowerMac
<rqou> model: iMac,1
<rqou> machine: iMac,1
<rqou> motherboard: iMac MacRISC Power Macintosh
<rqou> detected as: 79 (Unknown Paddington-based)
<rqou> pmac flags: 00000000
<rqou> L2 cache: 512K unified
<rqou> pmac-generation: NewWorld
<rqou> Memory: 512 MB
<rqou> although I did cheat and ran yosys on my desktop
<azonenberg_work> Lol that is probably slower
<azonenberg_work> also, packing up and heading home
<azonenberg_work> back in a bit
<qu1j0t3> rqou: nice!
<rqou> this is probably the only eda tool in existence that a) actually works on ppc and b) can finish running in less than a second on a machine this slow
azonenberg_work has quit [Ping timeout: 268 seconds]
<rqou> actually that's not completely true
<rqou> kicad can launch on this machine
<rqou> but it crashes if you enable GAL
<rqou> hmm this was also a test that my no-udev rewrite of the hid backend does work on at least one "unusual" system