pie__ has quit [Read error: Connection reset by peer]
pie_ has joined ##openfpga
<openfpga-github> [openfpga] azonenberg pushed 2 new commits to master: https://git.io/vQr5f
<openfpga-github> openfpga/master 1836f52 Andrew Zonenberg: Added JtagMaster
<openfpga-github> openfpga/master c8f33d0 Andrew Zonenberg: Finished initial JtagPipeBridge implementation
theMagnumOrange has joined ##openfpga
<rqou> so it works?
DingoSaar_ has quit [Remote host closed the connection]
DingoSaar_ has joined ##openfpga
<azonenberg> rqou: it's jtagging, if thats what you mean
<azonenberg> but if you see my latest tweets, the emulation is wrong
<azonenberg> but now i can reproduce in sim and view internal state of the CPLD etc
<azonenberg> So should be a ton easier to debug
cyrozap_web has joined ##openfpga
<cyrozap_web> Hey, pointfree, where'd all your PSoC bitstream docs go? All the stuff that used to be here is gone: http://odroid.0xffffffff.in/~deploy/psoc-switching/
<cyrozap_web> I was thinking of writing a more complete bitstream-to-Verilog tool tonight.
philpem has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
cyrozap_web has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cyrozap_web has joined ##openfpga
cr1901_modern has quit [Ping timeout: 248 seconds]
cyrozap_web has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cyrozap_web has joined ##openfpga
<pointfree> cyrozap_web: It's back http://odroid.0xffffffff.in/~deploy/psoc-switching/
<pointfree> Now with VS and other stuff on it too
m_w has joined ##openfpga
<cyrozap_web> pointfree: Thanks!
cr1901_modern has joined ##openfpga
<pointfree> cyrozap_web: np. Let me know if I forgot anything.
<cyrozap_web> pointfree: The stuff that was here is gone, too: https://hub.darcs.net/pointfree/psoc-diagrams-to-tables/
<cyrozap_web> I just went through some of the links in the channel logs to find these, not sure if you've replicated the information elsewhere.
m_w has quit [Quit: leaving]
* cyrozap_web considers writing an IRC logger that auto-saves all posted links to the Internet Archive
<rqou> cyrologger? :P
<pointfree> http://odroid.0xffffffff.in/~deploy/psoc-switching/HV-bits-and-regs.txt is obsolete and psoc-diagrams-to-tables needs to be updated because it looks like there is mirroring about the center of the HV tiles.
<pointfree> Also my server is now supplied with enough current so it should not go offline under high load.
<cyrozap_web> pointfree: Thanks again!
<cyrozap_web> > my server is now supplied with enough current
<cyrozap_web> uhh
<cyrozap_web> Would you mind if I had the IA archive those pages?
<rqou> wait, it's actually an odroid then
<rqou> ?
<rqou> maybe you should dump it under doc/ in the repo
<pointfree> Yeah it's an Odroid XU4 in my apartment and I added a big HDD
<rqou> i thought odroids were in famously lagging mainline kernels by an insane amount?
<cyrozap_web> rqou: I like to archive links so whoever sees these logs in the future doesn't have to go hunting for the new locations. Though, there's no reason we couldn't do both.
<cyrozap_web> rqou: The Odroid C2 can run mainline. You're probably thinking of Allwinner SoC-based boards.
<rqou> hmm, probably a problem with the older odroids
<cyrozap_web> The effort to 100% mainline the Amlogic S905* SoC kernels is pretty recent.
<pointfree> I had something that generates tables from diagrams like this https://hub.darcs.net/pointfree/psoc-diagrams-to-tables/browse/switching.4th for the HC tiles somewhere but never made public...
<rqou> the one i was thinking of isn't even an amlogic
<rqou> iirc it was one of the exynos ones
<cyrozap_web> Oh, yeah, that's because Samsung will literally not sell anything to you unless you're a Korean company, so their SoCs don't wind up on a lot of dev boards. Also, IIRC, they have a locked/proprietary bootloader and don't really release SDKs for anything but Android.
<cyrozap_web> That said, Samsung _does_ do a lot of mainlining work themselves now, so the kernel situation with their SoCs isn't terrible.
<rqou> do you know what the situation with Kirin chips is?
<cyrozap_web> But since their main use of SoCs is in smartphones and Chromebooks, which are enormous markets, they have very little incentive to get their chips out into the hands of hobbyists.
<cyrozap_web> Kirin is HiSilicon (a.k.a. Huawei)
<rqou> i meant how close they are to upstream
<rqou> so my new phone (since my old phone has now totally quit working properly) is on 4.1.18
<rqou> so better than qualcomm but still not great
<cyrozap_web> They've been working on mainlining some of the stuff to support their 96boards devices, but good luck getting support for any of their other SoCs.
<cyrozap_web> Same for MediaTek and all the other SoC manufacturers that sell SoCs used on 96boards devices.
<rqou> hmm i wonder if i can easily break into EL3 on my phone? :P
<cyrozap_web> Maybe? But good luck getting any docs for your SoC.
<rqou> it's also a Kirin 960, which has a 96boards board
<cyrozap_web> rqou: Which phone is it?
<rqou> the dead phone is a nexus 6p
<rqou> new phone is a huawei p10 plus
ZipCPU|Laptop has quit [Ping timeout: 248 seconds]
ZipCPU|Laptop has joined ##openfpga
<rqou> but now this kernel probably can't boot android, can it?
<rqou> yeah i know
<rqou> i need to prepare to re-unlock the bootloader because apparently a system update relocks it
<rqou> quality(tm)
<cyrozap_web> Android doesn't require too many changes from mainline nowadays, though I don't know the specifics because I have no desire to run Android on my mini PCs :P
<rqou> binder? ashmem? "the shit needed to make SurfaceFlinger work?"
<azonenberg> rqou: i have a pair of odroid c2s
<azonenberg> was gonna set one up on my microscope and send the other to my brother as a cheap web browsing box
<cyrozap_web> Someone got a 2013 Nexus 7 running mainline with the Freedreno OpenGL driver with "only 50 patches" (or something like that), and that's a Qualcomm device.
<rqou> i remember that
<rqou> too bad it didn't seem to have enough explanations for "people who know linux reasonably well but know nothing about android"
<rqou> nor explanations of "how do i do that to a new device?"
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- \o/]
scrts has quit [Ping timeout: 240 seconds]
<rqou> yeah sure
<rqou> now what about "now do i enable a new device?"
<cyrozap_web> Step 1: Get complete vendor docs
<cyrozap_web> Step 2:
<cyrozap_web> Use vendor docs to write drivers
<rqou> which drivers are needed to actually make android boot?
<rqou> how do i tell why android isn't booting?
<cyrozap_web> UART
<rqou> how does android even boot?
<cyrozap_web> Same as any OS
<rqou> fine :P
<rqou> after pid1 is launched, what happens? (on android)
scrts has joined ##openfpga
<cyrozap_web> No idea, I don't really care about Android. You should look into LineageOS's docs (continuation fork of Cyanogenmod) for porting to a new device.
<rqou> wait, what happened to Cyanogenmod?
<cyrozap_web> Cyanogen, Inc. killed it.
<cyrozap_web> Literally took down the domain, the wiki, and everything else.
<cyrozap_web> But the main thing you're missing is that it's not hard to get Linux to _boot_ on a device.
<mtp> but once you've booted it, you're running linux
<rqou> i mean, i know that
<rqou> i've booted super-bare-metal systems before
<rqou> where init is basically busybox ash
<cyrozap_web> It's hard to get _mainline_ Linux to boot _and_ utilize all the hardware peripherals without any blobs or a hacked-to-death kernel.
<rqou> but yeah, things that i can't find any good documentation for include "what is a surfaceflinger? what does it need to work? how does (e.g.) Minecraft PE or the calendar app interact with the GPU?"
<azonenberg> Ok so... looks like led[2:0] are behaving correctly with this new patched emulator
<azonenberg> but led[3] is total garbage
* azonenberg investigates...
_whitelogger has joined ##openfpga
<azonenberg> or nope
<azonenberg> it's MC6
* azonenberg goes and checks that
scrts has quit [Ping timeout: 276 seconds]
mifune has joined ##openfpga
mifune has joined ##openfpga
mifune has quit [Changing host]
scrts has joined ##openfpga
<azonenberg> Soooo right_pterms[28]
<azonenberg> Which is PTC for NC6
<azonenberg> is correct
<azonenberg> it's a pulse that goes high for one clock every time we're supposed to toggle count[3]
<azonenberg> Whiiich means the bug is in the macrocell and not the PLA (I also found an inversion bug in the PLA, separately)
<azonenberg> ... whoah
<azonenberg> this is interesting
<azonenberg> the OR term is showing toggles
<azonenberg> So my OR array is derping
<cyrozap_web> pointfree: Hey, so I was just thinking, have you tried bulk-loading a bitstream config into the configuration registers?
<azonenberg> oook
<azonenberg> Here's my problem
<azonenberg> the PLA OR array is completely borked
<azonenberg> i have configs i'm totally not supposed to
<pointfree> cyrozap_web: What do you mean by bulk-loading? Do you mean writing a loop that goes through all possible routes, etc?
<azonenberg> the OR array config in the bitstream is all 1s (i.e. no terms selected)
<azonenberg> the parsed OR config in my config SRAM has a lot of 0 bits
<cyrozap_web> pointfree: My thoughts are that if it's possible to have OpenOCD load bitstreams on its own (via JTAG/SWD without the use of the ARM core), we could possibly standardize our bitstream files and tools around ELF and ihex.
<pointfree> cyrozap_web: It is possible. I put up an example of loading a configuration over SWD here https://github.com/azonenberg/openfpga/wiki/UDB-%26-Routing-Examples#sample-config-0-route-from-portpin-22-to-portpin-21-blue-led-through-the-dsi
<pointfree> ^ made from the ascii diagram without any Cypress PSoC Creator tools at all.
<pointfree> cyrozap_web: What are your thoughts on kiml's ihex based format? https://github.com/kiml/PSOC_programmer/blob/master/docs/gen_config
<cyrozap_web> pointfree: Alright, I'm going to try converting that to an ihex file and loading it with OpenOCD. If that works, we can kind of treat the PSoC as an expensive, RAM-based CPLD with an ARM core attached :)
<cyrozap_web> That would require use of the Cortex-M3 for decompression, wouldn't it?
<cyrozap_web> That'd be more useful for when we want to store the bitstream in flash.
<cyrozap_web> I'm just talking about directly loading the bitstream, FPGA-style.
<pointfree> cyrozap_web: kiml's sample projects can generate config.hex's from config.conf's and load them from flash with the Cortex-M3 https://github.com/kiml/PSOC_compiler/tree/master/demo3b
<cyrozap_web> ...right.
<cyrozap_web> But I just want to load over SWD/JTAG, not flash (for now).
<pointfree> cyrozap_web: Are you looking for a way to generate bitstreams to be loaded over SWD for scripting purposes?
<cyrozap_web> pointfree: kinda
<cyrozap_web> For scripting, for easily dumping and reloading configs, and so I only have to write one config file parser/generator.
<cyrozap_web> Because any bitstream-to-verilog translator needs to know what locations in the file map to which locations in memory.
<cyrozap_web> And I don't want to write a PSoC emulator that executes firmware that decompresses a bitstream into the emulator's memory...
<cyrozap_web> ... although that would be kind of cool.
eduardo_ has joined ##openfpga
eduardo__ has quit [Ping timeout: 248 seconds]
<openfpga-github> [openfpga] azonenberg pushed 1 new commit to master: https://git.io/vQokF
<openfpga-github> openfpga/master dcea3ae Andrew Zonenberg: Fixed several bugs in XC2C emulator. Now runs a more complex blinky bitstream correctly.
<azonenberg> go tell me this doesnt look like a real coolrunner rotated 90 deg
<rqou> wtf
<azonenberg> the layout is very similar
<azonenberg> OR array in the middle, AND left and right
<azonenberg> FBs butterflied around a central spine with bitstream stuff and ZIA
<azonenberg> and macrocells off to the sides kinda out of the way
<azonenberg> its not exact but ti's surprisingly similar
<azonenberg> Sooo let's see, ZIA is fully implemented
<azonenberg> PLA AND and OR are fully implemented and, after these fixes, seem good
<azonenberg> (will test further)
<azonenberg> Macrocells... bits 26:22 are implemented, 21:18 (FF set/reset mode) are not yet
<azonenberg> Latch mode for the FF is not implemented
<azonenberg> The InZ bit 15 is not implemented
<azonenberg> neither is 14
<azonenberg> bit 13:12 are implemented
<azonenberg> 11 is
<azonenberg> 10 is Schmitt trigger, which I ignore as I'm not doing custom IO drivers
<azonenberg> 9:8 is the XOR, which is implemented
<azonenberg> 7 is the otput mux, i did that
<azonenberg> 6:3 is output enable/mode, ignored intentionally
<azonenberg> 2:1 are termination and slew, which i ignore
<azonenberg> 0 is power-up state of the FF, which i do
<azonenberg> Global clock enables are not yet implemented
<azonenberg> GSR mux is not yet supported
<azonenberg> Global OE is not yet implemented
<azonenberg> (at some point i need to support output enable/mode to do tristate, I have T outputs that are not yet being used)
<azonenberg> Then global termination mode is being ignored, as are I/O standard configuration and dedicated input termination
<azonenberg> So basically tristate IOs and latches and one or two macrocell muxes and i'm done
cyrozap_web has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mifune has quit [Quit: Leaving]
knielsen has quit [Ping timeout: 240 seconds]
knielsen has joined ##openfpga
scrts has quit [Ping timeout: 248 seconds]
Hootch has joined ##openfpga
scrts has joined ##openfpga
pie_ has quit [Ping timeout: 260 seconds]
pie_ has joined ##openfpga
scrts has quit [Ping timeout: 248 seconds]
pie_ has quit [Ping timeout: 248 seconds]
scrts has joined ##openfpga
pie_ has joined ##openfpga
pie_ has quit [Ping timeout: 260 seconds]
pie_ has joined ##openfpga
pie_ has quit [Ping timeout: 268 seconds]
pie_ has joined ##openfpga
<qu1j0t3> azonenberg: that's an interesting layout (re screenshot). What produces its organic appearance? I was expecting a lot more visible structure.
ZipCPU|Laptop has quit [Ping timeout: 260 seconds]
<azonenberg> qu1j0t3: that's just how the PAR did it
<azonenberg> and i was actually impresed at how *much* structure there was
<azonenberg> Sooo it looks like i'm going to be speaking at hardwear.io on bitstream RE etc
<azonenberg> now i have to actually do the research :D
<qu1j0t3> it's just less regular than i expected
<azonenberg> Lol you clearly have not looked at much post-PAR layout
<azonenberg> ISE normally makes giant blobs of hash with little discernable structure :P
<azonenberg> this is way more structured than usual
<qu1j0t3> true, i'm not an expert
<qu1j0t3> and i've never looked at ISE output
<nurelin> azonenberg: going to talk about the CR2 RE ?
<azonenberg> nurelin: Yes, and more
<azonenberg> i want to do some higher level RE tools that are independent of target device
<azonenberg> the abstract was kinda generic so i would have flexibility to do actual RE work
<azonenberg> and not get tied into one niche
<nurelin> tools based on chip imaging ?
<azonenberg> I want to make a generic RE framework
<azonenberg> that takes in bitstreams from $DEVICE
<azonenberg> for some large set of formats
<azonenberg> turns them into Yosys RTLIL
<azonenberg> then does higher level analytics as yosys passes
<azonenberg> e.g. turning collections of xors into adders
<azonenberg> sn00n: Re your question in the other chan
<balrog> azonenberg: would there be a way to implement a jtag-killer that isn't a chip-killer?
<azonenberg> As of right now, the open toolchains i am aware of
<azonenberg> lattice ice40 -> icestorm
<azonenberg> silego greenpak4 -> gp4par
<azonenberg> xilinx coolrunner-2 -> cr2par, WIP
<sn00n> ah, ok
<sn00n> but no artix 7 or cyclon v and so on?
<azonenberg> Correct
<azonenberg> Those are major undertakings
<azonenberg> clifford is interested in artix7 and is meeting with some folks to discuss today if memory serves me right
<azonenberg> But no real progress yet
<azonenberg> i'm gonna start working on spartan3a soonish to get my feet wet with LUT FPGAs
<balrog> I thought someone was working on cyclone but I forget who
<sn00n> "no real progress" means like 5% done?
<azonenberg> yeah somebody was tinkering
<azonenberg> sn00n: less than that
<sn00n> what are the problems? checksums?
<sn00n> oh
<azonenberg> more like "interested but havent done anything"
<azonenberg> lol, checksums
<azonenberg> the CRC is known
<azonenberg> thats the easy part
<sn00n> ah, cool
<sn00n> the bitstream format is complete nasty brain fuck? :)
<azonenberg> Yes :p
<sn00n> hmpf
<azonenberg> the high level format is a chunk based file format with basically (register, length, block of data)
<azonenberg> that is documented
<felix_> azonenberg: have you already made some die photos of the lower layers of an artix7? would probably really help us to figure out the global routing switch boxes
<felix_> yes, we're currently discussing things
<azonenberg> the actual fabric configuration stuff goes into the "frame data register in" and "frame address register"
<azonenberg> Going into THAT, you have addresses to "frames" a kB or so in size and then frame contents
<azonenberg> none of the frame contents are doc'd
<azonenberg> or what frame address does what
<azonenberg> felix_: i have not
<azonenberg> me or digshadow, i forget which (we've passed the dies around) have an xc7a35t decapped and top layer imaged
<azonenberg> but nothing below
<felix_> ok
<sn00n> azonenberg: is there a kind of a wiki about "what we currently know"?
<azonenberg> there's the openfpga wiki on github
<azonenberg> but clifford isnt posting there re 7 series
<sn00n> ok, so it's kinda non-public?
<sn00n> like i could ask him, maybe he would tell me style?
<azonenberg> More like, he doesnt have anything worth sharing
<azonenberg> :p
<sn00n> ah ok ^^'
<azonenberg> this is what i have for coolrunner-2
<azonenberg> it should be pretty much complete but needs to be rewritten in a more human-readable fashion
<azonenberg> i.e. noob-accessible
<sn00n> we'll see! (if noob campatible) :>
<azonenberg> thanatos.virtual.antikernel.net/unlisted/not-datasheet.pdf
<azonenberg> gaah
<azonenberg> that was the full doc i was working on a year or two back
<azonenberg> it's incomplete
<azonenberg> but this is the style my final doc will be
<sn00n> nice
<azonenberg> Including relevant history on older device families etc
<sn00n> my naive intention was kinda "writing a backend for llvm" :>
<azonenberg> lol llvm? no chance
<balrog> azonenberg: it almost sounds like you want an LLVM-like framework for this sort of stuff
<azonenberg> balrog: Yes, that is my goal
<azonenberg> i'm considering (but not definite)
<azonenberg> using yosys RTLIL as the IR
<azonenberg> but the general goal is to lift bitstreams, die photos, etc up to a tech-dependent "assembly language"
<azonenberg> i.e. raw cell-level netlist
<azonenberg> then to a tech-independent IR
<azonenberg> then to behavioral RTL
<balrog> is yosys RTLIL a good abstraction?
<azonenberg> Dont know
<azonenberg> I need to tinker a bit to decide :p
<azonenberg> i need metadata it doesnt natively provide but may be able to add w/ attributes etc
<azonenberg> things like, this LUT was at LUT A of SLICE_X0Y4
<azonenberg> Since sometimes placement gives hints (carry chains etc)
<balrog> it might be worth looking at how LLVM-IR does stuff like that :P
<azonenberg> as well as just heuristics that related logic should be grouped nearby
<azonenberg> eh
<azonenberg> llvm ir is inherently sequential, circuit netlists are inherently parallel
<azonenberg> i think there wont be too many equivalents other than the general idea of IR-based reversing
<balrog> no, I mean the hints/heuristics/metadata side
<azonenberg> oh
<azonenberg> perhaps
<balrog> yeah, you can't reuse LLVM-IR, but there might be good ideas in their design
<balrog> and darn, their IR reference is 220 pages :|
<azonenberg> Because from an actual intel gathering perspective
<azonenberg> REing the bitstream is almost boring
<balrog> I remember when it was a lot less than that
<azonenberg> converting a bitstream to a cell level netlist is a laborious but well defined process
<azonenberg> its a 1:1 equivalence
<azonenberg> i.e. bit to ncd
<azonenberg> the fun bit is going from a ncd or similar up to .v :p
<azonenberg> and a .v full of LUT6 instances doesnt count
<nurelin> 1:1 ?
<azonenberg> i want case statements
<azonenberg> and muxes
<azonenberg> and, with some human guidance, hierarchy
<nurelin> ncd is that close to the final bitstream ?
<balrog> interesting, there's a bunch of work out there involving LLVM-IR and FPGAs... some of it related to things like OpenCL
<balrog> most seeming to try to do C to RTL though
<balrog> (hah)
X-Scale has joined ##openfpga
<azonenberg> ncd is fully placed
<azonenberg> and routed
<azonenberg> and is 1:1 with the bitstream, yes
<azonenberg> the only thing not in the ncd is a few configuration settings re multiboot and such
<rqou> is it? i though you could have an unrouted ncd?
<azonenberg> or SPI clock rate
<azonenberg> ok let me rephrase
<azonenberg> the _map.ncd is unrouted
<rqou> also azonenberg you're up early :P
<azonenberg> the final ncd is fully par'd
<azonenberg> and i usually get up this early if i plan to go in to the office
<azonenberg> But plans changed
<rqou> anyways, who was it here who linked the "jet lag adjusts easier in one direction" research paper?
<rqou> :P
<nurelin> bitgen would then just correctly pack the ncd data and add some configuration on top
<azonenberg> Yep
<azonenberg> pretty much
<azonenberg> to rephrase
<azonenberg> the data written to FDRI is 1:1 with the NCD
<azonenberg> bitgen creates all of the framing around it
<rqou> azonenberg: is there really a point in doing bitstream RE right now? as opposed to working on a PAR tool?
<azonenberg> Yes
<azonenberg> I won't be focusing on unknown bitstream though
<azonenberg> I'll be doing my research on greenpak and coolrunner
<azonenberg> the focus is on creating *higher level* analysis tools
<rqou> oh for that yes
<rqou> i meant "is there a point in sinking time into the s3a/a7 RE?"
<azonenberg> Oh
<azonenberg> S3A would be for my own education more so than practical utilits
<azonenberg> utility*
<azonenberg> its simple enough that it's viable to actually learn the architecture in a timely fashion
amclain has joined ##openfpga
<cr1901_modern> azonenberg: Does going from 4-LUTs to 6-LUTs really increase the complexity that much (I know I'm oversimplifying, btw)?
<azonenberg> it's not that
<azonenberg> it's that, s3a has almost no hard IP
<azonenberg> and a fairly small number of primitives
<azonenberg> rqou: so if macrocell config bit 14 is 1 (input-to-ZIA driver disabled)
<azonenberg> Does that disable the FF-to-ZIA path too (bit 15 = 1)?
<azonenberg> or only the ibuf-to-ZIA (bit 15 = 0)
<azonenberg> rqou: Is the behavior of the greenpak DFF when set and reset are both asserted specified?
Hootch has quit [Quit: Leaving]
m_w has joined ##openfpga
digshadow has quit [Quit: Leaving.]
<rqou> azonenberg: the disable bit disables both paths
<azonenberg> Thought so, just checking
Hootch has joined ##openfpga
<rqou> it acts as a mux followed by a tristate
<azonenberg> That's probably exactly what it is
<rqou> the DFF behavior seems to be specified in the cpld libraries guide, but i've never tested in hardware
<azonenberg> either that, or two pass transistors with an AND on the enable to each
<azonenberg> i dont have that doc handy
<azonenberg> which way is it?
<azonenberg> right now i have reset taking precedence over set
<azonenberg> and POR taking precedence over both
<rqou> FDCP has CLR (reset) taking precedence
<azonenberg> Ok, so that's good
<azonenberg> That's how i have it implemented now
<rqou> note that LDCP (latch) doesn't match what yosys expects
<rqou> not that yosys can infer a LDCP-type latch anyways
<azonenberg> lol
<azonenberg> i'm still working on bitstream emu right now
m_w has quit [Quit: leaving]
bit_lySLH2uSZHed has joined ##openfpga
m_w has joined ##openfpga
bit_lySLH2uSZHed has left ##openfpga [##openfpga]
<azonenberg> rqou: so, project organization/structure question
<azonenberg> Do you think a bitstream-to-netlist tool using the openfpga libraries belongs in the openfpga repo, or its own?
<balrog> azonenberg: I think there should be an org for the project and one repo per major tool
<balrog> Git is not designed for single monolithic repos :P
<azonenberg> So you'd want to split the greenpak and coolrunner stuff?
<azonenberg> even though they share a lot of code?
<balrog> is the shared code in some sort of library?
<azonenberg> Yes
<balrog> it almost seems like it should be
<balrog> which then would have its own repo (and you could use submodules for all that)
<azonenberg> More stuff should be moved to that library, it can be more generic
<azonenberg> But yeah i can probably rearrange stuff at some point
<azonenberg> For now let me make a new repo for hardware RE stuff...
<rqou> ugh i hate submodules
<azonenberg> i actually have the netlist-tools repo
<azonenberg> maybe i can revive that
<balrog> rqou: eh, why?
<rqou> mostly because their states seem to often get out of sync
<rqou> they don't clone when you clone the toplevel
<rqou> and forking becomes a huge pain
<balrog> yeah you have to do git submodule update --init --recursive
<balrog> and if you want to update the code in the submodule you have to go there, pull, and commit (the reason for that is so submodules can allow pinning a version)
<balrog> but submodules are best for bundled stuff
<balrog> if you're having a library that gets installed with `make install`, submodules don't make sense
<rqou> i'd rather have a super-repo
<balrog> then separate repos and instructions saying "install this dependent library" make more sense
<balrog> super-repos work with svn but kinda fall apart with git because everything is stored forever and you get a lot of cruft
<rqou> i don't really care about cruft
<balrog> it also means you can't easily isolate commits
<balrog> (svn works because each directory can be pulled into its own repo)
<lain> I've said it before and I'll say it again (paraphrasing from some quote, I forget who said it): git is a great toolkit for building a VCS, someone should really do that.
<balrog> but like, bisect becomes significantly more annoying
<rqou> yes, i've heard this joke too :P
<lain> rqou: it's not a joke, it's reality :D
<azonenberg> rqou: so thinking a bit more
<lain> git is about the least user friendly thing I've used in recent memory, save perhaps the openbsd installer
<azonenberg> i'm probably going to say, make install openfpga
<azonenberg> then have netlist-tools be self contained given that
<rqou> arrgh i hate things that work like that
<rqou> now i have to go through a whole "install" process on the dependencies
<azonenberg> well the thing is, openfpga is set up to be a self contained project with its own packaging etc
<azonenberg> it wont work well as a submodule
<balrog> but "openfpga" is several projects in one
<rqou> i would just dump the RE stuff into "openfpga" also
<azonenberg> not really, any more than yosys is several in one
<balrog> rqou: messy, crufty repo :(
<balrog> azonenberg: icestorm is not part of yosys though
<openfpga-github> [yosys] azonenberg pushed 25 new commits to master: https://git.io/vQKRp
<openfpga-github> yosys/master 908ce3f Robert Ou: coolrunner2: Also construct the XOR cell in the macrocell
<openfpga-github> yosys/master a64b566 Robert Ou: coolrunner2: Initial techmapping for $sop
<openfpga-github> yosys/master 6e0fb88 Robert Ou: coolrunner2: Initial commit
<balrog> the high level libraries are
<rqou> wait did clifford merge my PR or what did you just do?
<azonenberg> He merged it a while ago
<azonenberg> I pulled upstream to my fork
<azonenberg> which logs here
<rqou> ah, last i looked (before i was sick) it hadn't been merged yet
<azonenberg> he tweaked it a bit
<azonenberg> but merged
<balrog> rqou: basically there should be a balance between "single monolithic repo" and "dozens of tiny repos" is what I'm saying
<balrog> the former means a ton of unnecessary cruft; the latter is a pain in the ass
<rqou> i'd rather have cruft than pain in the ass
<openfpga-github> [netlist-tools] azonenberg pushed 1 new commit to master: https://git.io/vQK0c
<openfpga-github> netlist-tools/master f180e0d Andrew Zonenberg: Updated README, reviving this project
<balrog> rqou: why can't there be a reasonable in-between?
<rqou> there probably can be, i've just never seen it
Hootch has quit [Ping timeout: 276 seconds]
Hootch has joined ##openfpga
<pointfree> I like how with mecrisp-stellaris I can just union mount with upstream because they don't endorse any dvcs, and that means I can use a better designed dvcs than git such as darcs or pijul for my subsystem, eg:
<pointfree> sudo mount -t overlay overlay -o lowerdir=mecrisp-stellaris-2.3.6,upperdir=mecrisp-stellaris-cy8c5888,workdir=mecrisp-stellaris mecrisp-stellaris
<rqou> > needs sudo
<rqou> you automatically lose :P
<lain> what about subtrees?
<lain> which I only just heard of.
<rqou> wait, this exists? TIL
<rqou> thanks git
<balrog> rqou: wow... last I heard of that it wasn't yet included with git
<pointfree> Just about everything in the Linux (ACL) whac-a-mole security theater needs sudo because it's not a capability system. Although conveniently I don't need sudo to delete the contents of my home directory.
<rqou> hmm, subtrees sound like they aren't any better than a super-repo if we control both the toplevel and the dependency
<azonenberg> pointfree: lol
<azonenberg> ... oooh my PCBs shipped
<azonenberg> Getting closer to thermal characterization
DingoSAL has joined ##openfpga
DingoSaar_ has quit [Ping timeout: 240 seconds]
DingoSAL has quit [Remote host closed the connection]
DingoSAL has joined ##openfpga
DingoSAL has quit [Remote host closed the connection]
DingoSaar has joined ##openfpga
<awygle> i've found subtrees to be a bit more convenient for "i want to compose many dependent repositories into a larger project-specific repository" than submodules
<awygle> iirc
<awygle> it's been a while since i've looked in-depth but i remember subtree being really good for saying "i want to pull in the current versions of all of these relatively stable dependencies for my new project and afterwards i want them to just look like code", but really bad for updating dependencies later
<awygle> whereas submodules were a pain every time you had to touch them (setting up a new project, deploying to a new machine, etc) but were much better isolated
<awygle> (the company at which i learned this tried to make their own tool based on google's repo tool, then eventually converted to a monorepo)
<azonenberg> Neither handles all of the dependent repos changing frequently
<azonenberg> in both direcitons
<azonenberg> i.e. pushing to upstream and pulling updates
<azonenberg> i basically want a symlink to another repo
<azonenberg> so a pull will pull the latest version of that
<azonenberg> a push will go to upstream
<awygle> yeah i hear you. git is not good at that, even though it seems like it should be.
<awygle> it looks like mercurial is a little better maybe, but idk anybody who actually uses mercurial
<rqou> the TAs for a class i took used mercurial
<rqou> all of my project team used git bridges to interact with the repository
<balrog> python was probably the biggest mercurial-using projects
<balrog> they recently moved to git
<balrog> recently meaning a few years ago
<balrog> 2015-2016
<pointfree> facebook uses mercurial because it scales better than git
m_w has left ##openfpga ["Leaving"]
<azonenberg> ok, finished implementing all to-be-supported macrocell features
<azonenberg> waiting for a build to test
<azonenberg> aaand failed to route due to congestion
* azonenberg looks
<azonenberg> Global clocks failed to route due to congestion? Hmmm
<azonenberg> rqou: Do the coolrunner latches have a clock enable?
<azonenberg> i.e. is PTC used for anything in latch mode?
<azonenberg> ah ok i see whats going on
<azonenberg> need to add muxing on the latches
cyrozap_web has joined ##openfpga
<cyrozap_web> <balrog> it also means you can't easily isolate commits
<cyrozap_web> balrog: `git log subdirectory`
<cyrozap_web> That'll give you the commit log filtered to only include changes in that subdirectory.
clifford has quit [Ping timeout: 260 seconds]
<cyrozap_web> azonenberg: If you want to be able to make changes to inter-tool API's/ABI's, I strongly recommend using a monorepo with subdirectories for each tool--at least while the project is still small and in rapid development. Git submodules are a huge maintenance burden, and result in build systems (see: https://github.com/frida/frida).
<azonenberg> cyrozap_web: so, what i do is
<azonenberg> i use submodules for libraries that are shared across unrelated projects
<azonenberg> like the log framework is now used by both my antikernel stuff and openfpga
<azonenberg> but those submodules do not have a build system of their own
<azonenberg> they just drop into a subdirectory and are built as part of the parent project
<azonenberg> and statically linked in
<azonenberg> Anything bigger becomes its own full repo and is just manually installed systemwide
<cyrozap_web> azonenberg: That seems sane.
<azonenberg> the log repo contains a leaf-level cmakelists and splashfile
<azonenberg> to integrate into a larger cmake or splash project
<azonenberg> but is not intended to ever be checked out on its own and built
<azonenberg> For tightly coupled things, like the different openfpga tools, i do one repo with a subdir per tool
<azonenberg> even if it's modular, helps to have it all in one place
<cyrozap_web> s/result in build systems/result in complex build systems/
digshadow has joined ##openfpga
digshadow has quit [Client Quit]
cyrozap_web has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<azonenberg> Sooo let's see, i need to go assemble the reworkctf board's front side tonight if i have a chance...
DingoSaar has quit [Remote host closed the connection]