<azonenberg> anyway, as an example
<azonenberg> they do not publish jitter values for the delay line
<whitequark> ah
<azonenberg> meanwhile if i go to say xilinx DS181 they characterize pattern dependent jitter for both a clock pattern and a PRBS
<azonenberg> in ps per tap
<azonenberg> xilinx also publishes FF setup/hold times
<azonenberg> silego only publishes "delay" for the ff, whatever that is
<whitequark> maybe silego doesn't know
<azonenberg> sum of setup and hold? clock to out?
<azonenberg> that was my thought, lol
<azonenberg> i feel like they dont do nearly as much characterization
<azonenberg> Which is kind of annoying for me as a toolchain writer, i want to make a timing analysis tool
<azonenberg> but they dont publish enough info
<azonenberg> and its not like they're xilinx hiding some of the timing info for the routing fabric in their tool suite
<azonenberg> i don't think they have the info at all
<whitequark> i mean it can be acquired...
<whitequark> by the way
<azonenberg> I am seriously considering doing my own device characterization on a couple of samples at T/V corners
<whitequark> i recently thought of a way to acquire this info with a very high resolution
<azonenberg> living without process corner characterization
<whitequark> without like, a 1GHz scope or something
<azonenberg> just use an FPGA for the digital side of things
<whitequark> so you basically only need a) a configurable delay line and b) a high-speed latching comparator
<azonenberg> send, say, a clock and a data signal with slowly increasing phase shifts
<whitequark> then you compare phase
<azonenberg> then see how far you have to go before the ff output starts going metastable
<azonenberg> bear in mind also, greenpaks are not used for super duper high speed stuff
<azonenberg> so if you have +/- 1ns measurement accuracy, that's probably plenty
<azonenberg> that's only like +/- 5 ns over a 5 stage combinatorial path, which is very long for a device that only has 25 luts
<azonenberg> So if you give conservative numbers and the device can actually run at 150 MHz instead of the 130 you predicted
<azonenberg> is that a huge problem?
<azonenberg> (given the realistic operating freq of many greenpak designs is closer to 10 MHz)
<openfpga-github> [openfpga] azonenberg pushed 2 new commits to master: https://git.io/vP6bd
<openfpga-github> openfpga/master 888973b Andrew Zonenberg: tests: clarified test procedure for Delay test
<openfpga-github> openfpga/master 3d0fde5 Andrew Zonenberg: greenpak4: initial implementation of GP_DELAY block
<whitequark> right
<azonenberg> Anyway, if it comes to that
<azonenberg> i seriously do intend to do timing characterization myself
<azonenberg> but i'm not at that point yet
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 12c7477 to 563315c: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 563315c Travis CI User: Update documentation
<travis-ci> azonenberg/openfpga#97 (master - 888973b : Andrew Zonenberg): The build was fixed.
<azonenberg> whitequark: anyway, now that i got that out of the way
<azonenberg> back to the DAC
<azonenberg> I think what i am actually going to have to do next is the DCMP/PWM block
<azonenberg> because the DAC gets its input from a DCMP/PWM
carl0s has joined ##openfpga
<azonenberg> whitequark: btw, gp4prog
<whitequark> okay
<azonenberg> how/where do we want to document that
<whitequark> yeah?
<whitequark> hm
<azonenberg> in gp4-hdl.pdf?
<azonenberg> separate doc?
<azonenberg> i feel like we need a full manual, not just a --help text
<whitequark> separate doc
<whitequark> well
<whitequark> I don't really see a point in a full manual...
<whitequark> what specifically would you expand on there?
<azonenberg> Hmm
<azonenberg> i guess its ok for now
* azonenberg continues reading
<azonenberg> so, looks like the SPI core is only usable in one direction at a time?
<azonenberg> like, ser-par or par-ser
<azonenberg> but not both?
<azonenberg> reg<1661>
<azonenberg> seems to specify one direction or the other
<whitequark> I believe so, yes
<azonenberg> and in ser-par mode with fabric output
<azonenberg> it steps on a lot of fabric signals in one of the matrices
<azonenberg> So that is somthing i'm putting off for a bit
tecepe has quit [Ping timeout: 244 seconds]
<azonenberg> also, lol
<azonenberg> reg,1910>
<azonenberg> reg<1910> *
<azonenberg> "CNT test enable"
tecepe has joined ##openfpga
<azonenberg> Any idea what the "reset output control from pin 8" is?
<azonenberg> reg<2012:2011>
<whitequark> pin 8 is POR_O
<azonenberg> Why would you do that rather than routing POR through the routning matix?
<azonenberg> matrix*
<whitequark> see 22.2
<whitequark> it gets high after POR_OUT
<whitequark> which is what goes to the matrix
<whitequark> I think so that by the point external stuff starts getting out of POR, matrix is already fully initialized
<whitequark> *including* any init on negedge(POR_OUT)
<whitequark> or posedge
<azonenberg> So basically, if i am routing POR to pin 8 i should set that
<whitequark> yep
<azonenberg> And warn if I route POR to any other pin?
<whitequark> I... think so
<azonenberg> something about "not using dedicated routing, may cause glitches"
<azonenberg> easy to add in the DRC
* azonenberg moves probes and tests
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
carl0s has quit [Quit: Leaving]
<rqou> azonenberg: on oscilloscopes, I think I'm pretty lucky because I just "happen to have" a TDS3054
<rqou> 500mhz b/w, 5 GS/s
<rqou> 4 channel
<azonenberg> lol
<azonenberg> lucky indeed
<azonenberg> mine is 2 channel 1 GSa/s
<azonenberg> 100 MHz b/w
<azonenberg> plus a 16 channel LA that sucks hard
<rqou> ds1052e?
<azonenberg> 1102d
<rqou> so not the hacked one :P
<azonenberg> Nope
<azonenberg> got an educational discount, it wasnt too bad
<rqou> random question for you: how do I go about trying to assemble a microscope setup?
<azonenberg> For what purpose?
<azonenberg> :p
<rqou> ideally one for soldering and one for chip imaging
doomlord has joined ##openfpga
<rqou> I have a cheap Chinese setup for soldering
<azonenberg> Aaand just lost power
maaku has quit [Quit: No Ping reply in 180 seconds.]
maaku has joined ##openfpga
<azonenberg> Got the generator running in record time though
<azonenberg> whitequark: wtf ctest
<azonenberg> stderr/stdout are really screwed up under ctest
<azonenberg> it's doing some funky buffering
<azonenberg> so if i printf(foo) to stdout, printf(bar) to stderr, printf(baz) to stdout
<azonenberg> with a fflush after each printf
<azonenberg> i may see bar foo baz as the message order
<azonenberg> or foo baz bar
<rqou> have you ever looked at how the tty subsystem works? I'm not surprised at all
<azonenberg> if i print it to an actual console, it works as intended
<azonenberg> only with ctest's buffering it fails
<rqou> pipes also behave differently from ttys
<azonenberg> Expected result:
<azonenberg> Checking post-route design rules...
<azonenberg> Warning: Pin P9 is driven by the power-on reset, but is does not have dedicated reset routing.
<azonenberg> This may lead to synchronization issues or glitches if this pin is used to drive resets on external logic.
<azonenberg> That is indeed what i see when i run in a shell
<azonenberg> but the error is printed like 50 lines earlier under ctest
<azonenberg> 8: Indexing...
<azonenberg> 8: Port rst_out1 connects to:
<azonenberg> 8: Warning: Pin P9 is driven by the power-on reset, but is does not have dedicated reset routing.
<azonenberg> 8: bit 0: node rst_out1
<azonenberg> 8: This may lead to synchronization issues or glitches if this pin is used to drive resets on external logic.
<azonenberg> 8: Port rst_out2 connects to:
<rqou> fflush doesn't have to synchronize stdout/stderr with each other
<rqou> only within each
<rqou> iirc Eclipse also does this with Java
<azonenberg> Hmm
<azonenberg> so fflush is not a blocking operation?
<azonenberg> i thought it blocked until the write went all the way to the underlying device
<azonenberg> or does it only flush the userspace buffer and the kernel is allowed to buffer it more?
<rqou> I was under the impression that it's only a reorder barrier
<azonenberg> reordering with respect to what, though?
<rqou> other I/O on the same file
<azonenberg> i thought the whole point was to sync multiple writes if you had several handles to one stream or similar
<azonenberg> oh, i see
<azonenberg> So if you are in a console
<azonenberg> stdout and stderr are the same handle
<azonenberg> and fflush is a reorder barrier
<rqou> but this might be different for pipes/ttys
<azonenberg> if you have two separate pipes
<azonenberg> then they get merged on the far end of the pipes
<azonenberg> then it wont barrier those
<azonenberg> i wonder how hard it would be for the log framework to either take a special arg for running under ctest, or detect that automatically
<rqou> I'm not sure what is actually guaranteed
<azonenberg> and redirect any error/warning output to the same handle as other log messages
<azonenberg> Which will guarantee sync
<rqou> fflush is extra complicated I think because the C runtime can also do buffering
<rqou> but iirc buffering behavior can change if I/O is redirected
<azonenberg> Yeah
<azonenberg> seems like the easiest option is to have an arg for the log framework
<openfpga-github> [openfpga] azonenberg pushed 1 new commit to master: https://git.io/vP6hn
<openfpga-github> openfpga/master 8f6a559 Andrew Zonenberg: greenpak4/gp4par: Added dedicated routing for pin 8 reset output. Added DRC warning if POR drives an IOB other than pin 8.
<azonenberg> that says "use stdout even for error/warning messages"
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rqou> you might be able to guess by calling isatty
<rqou> I don't know if ctest just uses pipes or a pty
<rqou> this part of UNIX sucks
<azonenberg> i want to allow io redirection though
<azonenberg> in the general case
<azonenberg> it seems easier to just have the "run gp4par under ctest" cmake macro pass a special arg
<azonenberg> there is already dedicated code for that case in the cmakelists
<azonenberg> adding an arg is trivial
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 563315c to 96be24d: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 96be24d Travis CI User: Update documentation
<travis-ci> azonenberg/openfpga#98 (master - 8f6a559 : Andrew Zonenberg): The build was broken.
<rqou> hmm according to http://man7.org/linux/man-pages/man3/fflush.3.html fflush doesn't flush kernel buffers at all
<rqou> it only flushes userspace stdio buffering
<azonenberg> interesting
<rqou> but according to google, pipes/terminals don't need e.g. fsync to flush them
<azonenberg> also woo power is back
<rqou> this might just be a ctest problem
<azonenberg> well THAT broke badly
<azonenberg> .me investigates
wareya has joined ##openfpga
<rqou> I've never had power problems due to storms here
<whitequark> azonenberg: rqou: you don't need buffering problems
<cr1901_modern> azonenberg: Modern planarized CMOS is going to require a delayer, even without an IC package (meaning no decap), correct?
<whitequark> azonenberg: rqou: lack of interleaving is enough
<whitequark> e.g. imagine that within its quantum, the program under test writes:
<whitequark> "A" to stdout, "B" to stderr, "C" to stdout
<whitequark> if stdout.fd==stderr.fd, then with all the flushes it will write ABC to console
<whitequark> if !=, then even with all flushes, once ctest is reading, it will first read "AB" from the out pipe and "C" from the err pipe
<cr1901_modern> Erm, did you mean "AC" and "B"?
<whitequark> yeah
<azonenberg> whitequark: welp, in that case then the solution is to force all writes under ctest to use stdout
<azonenberg> right?
<whitequark> indeed
<azonenberg> should be a straightforward tweak to logtools
<openfpga-github> [openfpga] azonenberg pushed 1 new commit to master: https://git.io/vP6hN
<openfpga-github> openfpga/master cc5117a Andrew Zonenberg: gp4par: fixed null deref during DRC if POR is not used in the specific netlist
<cr1901_modern> How is lack of interleaving distinctive from a buffering problem (your output is in the wrong order either way)?
<whitequark> I guess it is a sort of a buffering problem after all
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 96be24d to 33f1b08: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 33f1b08 Travis CI User: Update documentation
<travis-ci> azonenberg/openfpga#99 (master - cc5117a : Andrew Zonenberg): The build was fixed.
<openfpga-github> [logtools] azonenberg pushed 1 new commit to master: https://git.io/vP6jJ
<openfpga-github> logtools/master 2297b20 Andrew Zonenberg: Added argument to force error/warning messages to go to stdout (for use under CTest etc)
<cr1901_modern> Are there any other possible failure modes for a stdout/stderr buffering problem? Besides not being flushed at all if the program crashes (Idk what POSIX requires)?
<openfpga-github> [logtools] azonenberg pushed 1 new commit to master: https://git.io/vP6jU
<openfpga-github> logtools/master 9978be6 Andrew Zonenberg: Fixed typo in last commit
<openfpga-github> [openfpga] azonenberg pushed 3 new commits to master: https://git.io/vP6jq
<openfpga-github> openfpga/master a5f0747 Andrew Zonenberg: tests: now using --stdout-only on gp4par to avoid stdout/stderr interleaving issues
<openfpga-github> openfpga/master d523e1e Andrew Zonenberg: updated to latest logtools
<openfpga-github> openfpga/master 71ff2fa Andrew Zonenberg: updated to latest logtools
<cr1901_modern> azonenberg: Why does 2>&1 fail again?
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 33f1b08 to 9db7656: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 9db7656 Travis CI User: Update documentation
<travis-ci> azonenberg/openfpga#100 (master - a5f0747 : Andrew Zonenberg): The build passed.
doomlord has joined ##openfpga
<cyrozap> azonenberg: Why are you even using separate stdout/stderr in the first place if you want to keep everything in chronological order? If a user wants to pipe only the errors into a log file but those errors require context from stdout to understand, then having a separate error output isn't useful.
<cyrozap> I would just prefix everything with timestamps and "DEBUG:", "WARNING:", "INFO:", "ERROR:", etc. for easy grepping.
<whitequark> that's pretty hard to read though
<whitequark> too much noise
<azonenberg> cyrozap: the errors are DRC errors and its obvious what they mean independently
<azonenberg> what i want to avoid is errors appearing in the middle of stdout progress messags
<azonenberg> like, before the event that caused the error even happened according to stdout
<azonenberg> the new setup works fine
<azonenberg> default prints error/warning to stderr, other to stdout
<azonenberg> you can pipe fine and run in a terminal fine
<cr1901_modern> Until it breaks on Windows :)
<azonenberg> New behavior is the same as old unless you pass --stdout-only
<azonenberg> Which, for now, is only the case if you are calling it from ctest in my script
<whitequark> cr1901_modern: actually, now we could simply drop the support for Win32, now that there is a Linux subsystem ;p
<cr1901_modern> I suppose... but I'm not really prepared to run MSYS2 *and* the Linux Subsystem and deal with their interactions
<cr1901_modern> Although I do like what I've read so far re: Linux Subsystem
<cyrozap> azonenberg: I guess what I'm wondering is, when would there be a time when you'd want separate output?
<whitequark> cyrozap: stderr to terminal, stdout to log
<whitequark> I always run yosys and gp4par like that
<cr1901_modern> whitequark: Additionally, isn't WSL Windows 10 only b/c of pico processes?
<whitequark> such that I can rapidly see if there are any warnings or errors
<whitequark> cr1901_modern: yup
<cr1901_modern> Yea, I didn't upgrade to Win 10... and now The Button is gone :P
<cyrozap> whitequark: But wouldn't you also want to log errors?
<whitequark> cyrozap: oh hm, what I just described actually happens with two log sinks
<whitequark> hmm
<whitequark> guess the only reason to have that is having the conventional behavior for >/dev/null
<whitequark> but that can also be achieved with -q...
<cr1901_modern> All of a sudden PowerShell kinda makes sense with it's spitting out data structures instead of text
<cyrozap> whitequark: Yeah, and if you want to log everything but only look at the errors sometimes, you can just grep for them. With a single stream, you could very easily just pipe it all to grep to just get errors/non-errors.
<whitequark> no, that's obnoxious.
m_w has joined ##openfpga
<cyrozap> One of the appeals of POSIX systems is that you can pipe together a bunch of independent programs to get the output you want. I don't see what's obnoxious about that.
<whitequark> the fact that it never does quite what you want
<whitequark> in other words, no, you can't.
<whitequark> try sorting the output of objdump -t by symbol size someday
<cr1901_modern> awk? (I haven't tried it, btw)
DocScrutinizer05 has quit [Disconnected by services]
DocScrutinizer05 has joined ##openfpga
<whitequark> yes, awk, at which point you could use a real programming language instead and drop the pretense
<cyrozap> whitequark: Ok, so pipe to a small bit of Python?
<whitequark> no, use a real programming language instead of trying to pretend that shell is an acceptable one for doing anything
<cr1901_modern> I wonder why sort can't do it
<whitequark> because sort can't extract an nth column
<cr1901_modern> So we need something like a cut-sort-paste lol
<cr1901_modern> T_T
<whitequark> and anyway, if you look at the options to ls, or grep, or whatever, it becomes quite evident that "a bunch of independent programs" was a failed promise in the first place
<cr1901_modern> (I thought sort could extract nth column)
<whitequark> it's more of "a bunch of ad-hoc behavior that by chance works together for a few common cases, and allows some people to pretend that this is a good idea"
<cr1901_modern> I wonder if it went something like this: Up until GNU Project started, people grudgingly chained programs together, got sick of it, and then wanted, say ls to do more instead of chaining programs together
<cr1901_modern> So the bigger the audience Unix was, the less they wanted to do things as intended by greybeards who thought the extra work of chaining was worth keeping the underlying programs "simple"
* cr1901_modern thankfully has no OS allegiance. If it has the concept of a HOME directory, a central location to store program configurations, and a PATH, I'm happy.
<cr1901_modern> Or I'll manage*
<lain> powershell is pretty rad :3
<lain> I mean, there's stuff I absolutely hate about it, but I still personally find it more productive than any other scripting language I've touched
<lain> python is a close second
<lain> but now that powershell is open source and cross-platform (well, getting there, still very alpha)... no point in messing with others :P
<cr1901_modern> Can powershell be used as your login shell on *nix?
<whitequark> sure
<cyrozap> whitequark: What do you mean sort can't extract an nth column? You can sort by any column you want.
m_w has quit [Quit: leaving]
<cyrozap> lain: Well, the "Power" in "Powershell" really comes from how you can treat a lot of stuff on Windows as objects, but you don't have that on *nix since everything is a file there, so I'm not sure how useful it will be.
<lain> ehhh
<lain> even just feeding text into powershell, it's got a lot of builtins for handling a variety of text formats and converting it to a more useful object form
<lain> xml, json, csv, probably also tab-separated, can all be converted to objects in a single command
<cyrozap> Oh, that's actually pretty nice
<whitequark> cyrozap: hm, you are right, and that's in POSIX sort
<whitequark> I thought that was a GNU extension for some reason
<cyrozap> lain: Of course, in other shells, you can operate on the text directly, so there's no need to convert to an object in the first place.
<lain> I mean, in terms of quickly doing stuff, someone fluent in python or similar can probably accomplish the same thing in equal time, but I really enjoy the powershell semantics and object-pipeline style (also I'm a .net dev at heart, so having all of .net accessible directly is quite handy)
<lain> and you can eg. call COM APIs trivially, or even native (non-.NET) dlls
<whitequark> of course there *is* a reason to convert it to an object
<whitequark> when your "text" is really not text at all, but something more structured
<lain> but I guess python and co. probably have that also somewhere
<whitequark> classic example: extract the IP address from the output of ifconfig
<cr1901_modern> whitequark: I would have not been surprised if it was an extension. I feel like swapping columns should be doable without awk tho (it's not AFAIK)
<cyrozap> whitequark: ifconfig | grep inet | awk '{print $2}'
<azonenberg> woo i have power again
<whitequark> yeah, that's such a nice solution
<cyrozap> you can even skip the grep stage and use awk to grab the second line directly
<azonenberg> gonna have to buy more gas after this weekend, lol
<whitequark> don't forget LC_ALL=C
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
digshadow1 has quit [Ping timeout: 260 seconds]
digshadow has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has quit [Ping timeout: 260 seconds]
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 265 seconds]
azonenberg_work has joined ##openfpga
Bike has quit [Quit: seple]
azonenberg has joined ##openfpga
azonenberg_work has quit [Ping timeout: 250 seconds]
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 252 seconds]
azonenberg_work has joined ##openfpga
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has quit [Ping timeout: 256 seconds]
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 250 seconds]
doomlord has joined ##openfpga
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 260 seconds]
azonenberg_work has joined ##openfpga
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has quit [Ping timeout: 260 seconds]
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 245 seconds]
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
azonenberg_work has joined ##openfpga
azonenberg has joined ##openfpga
azonenberg_work has quit [Ping timeout: 244 seconds]
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
doomlord has joined ##openfpga
azonenberg_work has quit [Ping timeout: 252 seconds]
azonenberg_work has joined ##openfpga
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
azonenberg_work has quit [Ping timeout: 250 seconds]
azonenberg_work has joined ##openfpga
<azonenberg_work> grr
<azonenberg_work> apparently even though we have power back
<azonenberg_work> the comcast wiring is in sorry shape
<dalias> i feel so sorry for everyone stuck with comcast...
Bike has joined ##openfpga
<azonenberg_work> it was that or DSL
<azonenberg_work> Good news is i have business class service
<cr1901_modern> I am... relatively satisfied with my comcast experience? o.0;
<azonenberg_work> So i should get an SLA credit
<dalias> well dsl is generally a lot better choice
<dalias> ah business-class is less horrible
<dalias> home-class cable service is so utterly awful i wouldn't even consider using it without a vpn
<cr1901_modern> how does a VPN help?
<dalias> they do things like proxying and modifying http traffic
<dalias> to insert "your bill is due" or "don't download warez again or you'll be suspended lol" popups and stuff
<cr1901_modern> proxying? (HTTP modifying I already knew about)
<dalias> well there's some sort of proxy involved in doing that -- you can't do major changes without reassembling the packets into a stream, modifying the stream, and re-packetizing it
<dalias> i don't know if they do caching proxying too but i wouldn't be surprised
<dalias> crappy mobile isps in many countries do
<dalias> and it often ends up breaking sites with incorrect cache control headers
<cr1901_modern> Is caching proxying different from "we store multiple copies of a website throughout the Internet to balance load"?
<qu1j0t3> well yes. it's the reverse idea, in a sense.
<qu1j0t3> it gives _you_ a nearby cache
<qu1j0t3> while a CDN tries to minimise latency for as many people as possible
<cr1901_modern> I'm looking up "caching proxy" and Google is just giving me the results for "return a copy of the data to prevent load issues"
<cr1901_modern> So that's why I'm confused
<azonenberg_work> dalias: wait what
<azonenberg_work> comcast home MITMs your HTTP traffic???
<azonenberg_work> wooow
<cr1901_modern> azonenberg_work: Yes, supposedly. And I thought most ISPs do it
<azonenberg_work> o_O
<azonenberg_work> If i ever had that happen to me
<azonenberg_work> i'd be calling the FCC about it
<azonenberg_work> Pretty sure i could make a wiretap act case out of it if i wanted to
<dalias> it should break their common carrier status and make them liable for all illegal content that passes through them
<qu1j0t3> cr1901_modern: yes, they are not the same thing. A caching proxy is ONE cache near you. A CDN is many many copies distributed globally.
<azonenberg_work> the act of tampering with the stream implies that they are observing it in order to distinguish HTTP from HTTPS etc
<azonenberg_work> Their only defense would be 18 USC 2511 2a.1
<azonenberg_work> "It shall not be unlawful under this chapter for an operator of a switchboard, or an officer, employee, or agent of a provider of wire or electronic communication service, whose facilities are used in the transmission of a wire or electronic communication, to intercept, disclose, or use that communication in the normal course of his employment while engaged in any activity which is a necessary incident to the rendition of his service or t
azonenberg has joined ##openfpga
<cr1901_modern> qu1j0t3: So basically, assume I'm using ONE cache near me for any website I visit unless I'm explicitly downloading from an HTTP mirror (such as for GNU software) or a CDN?
digshadow has quit [Ping timeout: 252 seconds]
<azonenberg_work> MITMing certainly qualifies as "service observing"
<azonenberg_work> by any reasonable definition
<azonenberg_work> and constant mitm is not a service quality check
<qu1j0t3> cr1901_modern: the caching proxy would still be involved, just that upstream might be a mirror or CDN, yes.
<azonenberg_work> You might be able to make a CFAA claim too
<azonenberg_work> all you have to do is build a system that breaks when the html is tampered with
<azonenberg_work> by, say, reading the Nth DOM tag and printing it or something
<azonenberg_work> and use it in some commercial activity, however trivial
<azonenberg_work> dalias: anyway, i have never seen any evidence of modification of traffic over comcast business service
<cr1901_modern> qu1j0t3: Oh I see... so the problem is that my ISP can choose what requests it decides to forward to another upstream mirror and what requests it decides to stop right there at the first caching server?
<azonenberg_work> if they're passively sniffing IDGAF, anything i care about is PGP'd or TLS'd, or both
<azonenberg_work> And I just got a $45 SLA credit after calling to complain about the downtime
<azonenberg_work> So while i do hate comcast
<qu1j0t3> cr1901_modern: well, yeah, the proxy can apply policy of various kinds. So they're often useful to businesses e.g.
<azonenberg_work> for now they're the least bad of the bad options :p
<cr1901_modern> Can you tell I'm not all that familiar with how the Internet works in detail? lol
<cr1901_modern> I'm surprised I even know how ARP works now that I think about it
<cr1901_modern> (prob b/c I had to debug problems with it before on my home network)
digshadow has joined ##openfpga
<dalias> azonenberg_work, one of the things you pay for in business class is probably the "privilege" of them _not_ modifying your traffic
<azonenberg_work> dalias:
<azonenberg_work> loool
<azonenberg_work> i really would like to see some lawyer try and make a case over that
<dalias> since they know you might be using http in either direction (in or out) for restful api calls, soap, etc. where injection might badly break applications
<azonenberg_work> its no different from the phone company randomly inserting (say) ads into your telephone calls
<dalias> *nod*
<azonenberg_work> not knowing if you're calling a client or 911
<azonenberg_work> where that could have serious consequences
<dalias> "if you're calling a client you should have a business line!"
<azonenberg_work> lol
<azonenberg_work> ok fine, a doctor on call from home then
<dalias> :-)
<azonenberg_work> in the middle of talking to a patient the line goes dead and they hear an ad for comcast TV
<azonenberg_work> you know how many people would tolerate that?
<dalias> afaik so far they haven't used it to inject new ads
<dalias> they probably inject hidden js for analytics/tracking
<azonenberg_work> ...
<azonenberg_work> aaanyway i'm gonna turn off my LTE tether to save battery on the phone
<dalias> and maybe replace ads to redirect revenue to themselves
<dalias> and add popups for "account warnings" (overdue bill, etc)
azonenberg_work has quit [Ping timeout: 265 seconds]
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
azonenberg_work has quit [Ping timeout: 244 seconds]
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
reportingsjr has joined ##openfpga
azonenberg_work has quit [Ping timeout: 265 seconds]
mifune has joined ##openfpga
<pointfree> Does anyone know if the CY8CKIT-059 has overvoltage protection? I'm going to start testing my usb driver code and it would be cool if I could have the KitProg and USB plugged in at the same time. I know that the PSoC 5LP SchmartBoard does NOT have the protection.
azonenberg has joined ##openfpga
doomlord has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg has joined ##openfpga
azonenberg has quit [Ping timeout: 245 seconds]
azonenberg_work has joined ##openfpga
<azonenberg_work> Welp, my comcast link is still flapping like crazy every few minutes
<azonenberg_work> back online from LTE
<azonenberg_work> whitequark etc: what do you think is a good place to put the userID for greenpak designs?
<azonenberg_work> gp4par argument?
<azonenberg_work> constraint? hard ip block?
<rqou> hmm i've never noticed comcast doing a transparent proxy/mitm here
<rqou> they do block off port 25 though
<azonenberg_work> well yeah almost all non-business isps block mail
<rqou> (i heard you can hack that if you really want because it's supposedly done on the cable modem)
<azonenberg_work> or wait
<azonenberg_work> do you mean inbound?
<azonenberg_work> or outbound
<rqou> both iirc
<azonenberg_work> o_O they block OUTBOUND?
<azonenberg_work> i mean not a huge deal these days
<rqou> so you can't send spam with an infected pc
<azonenberg_work> as all of my mail is over TLS which uses different ports
<rqou> the smtp submission port 578 isn't blocked
<azonenberg_work> 587 you mean?
<rqou> yeah
<rqou> my roommate actually had a really fun experience with the port 25 block a while ago
<rqou> he was testing some program that sent email via a local MTA, and it wasn't working
<rqou> eventually he decides "screw it, i'll debug this later"
<azonenberg_work> lol
<rqou> and then goes to the university campus for lecture
<rqou> and then all of his test emails go through :P
<azonenberg_work> lol
<azonenberg_work> whitequark: also for when you're around... is there any way to use gp4prog to determine the userid of a currently running SRAM emulation bitstream?
<rqou> at some point i should hack the cable modem to unblock this just because i can
<rqou> the cable modem has some kind of backdoor+security bug that gives you a root shell
<azonenberg_work> lol
<azonenberg_work> one of the many reasons i dont use isp modems as firewalls or border routers
<azonenberg_work> i consider them outside my perimeter
<jn__> rqou: /proc/cpuinfo plz :P
<rqou> Processor : ARMv6-compatible processor rev 4 (v6b)
<rqou> BogoMIPS : 399.76
<rqou> Features : swp half thumb fastmult edsp java
<rqou> CPU implementer : 0x41
<rqou> CPU architecture: 6TEJ
<rqou> CPU variant : 0x0
<rqou> CPU part : 0xb76
<rqou> CPU revision : 4
<rqou> Cache type : write-back
<rqou> Cache clean : cp15 c7 ops
<rqou> Cache lockdown : format C
<azonenberg_work> armv6? wow
<rqou> Cache format : Harvard
<rqou> I size : 32768
<rqou> I assoc : 4
<rqou> I line length : 32
<rqou> I sets : 256
<rqou> D size : 16384
<rqou> D assoc : 4
<rqou> D line length : 32
<rqou> D sets : 128
<rqou> Hardware : puma5
<rqou> Revision : 0001
<rqou> Serial : 0000000000000000
<rqou> # cat /proc/cmdline
<rqou> root=/dev/mtdblock6 mtdparts=spansion:0x20000(U-Boot),0x10000(env1),0x10000(env2),0x3b0000@0x40000(UBFI1),0x3b0000@0x3f0000(UBFI2),0xd1144@0x416bc(Kernel)ro,0x2aac00(RootFileSystem)ro,0x50000@0x7b0000(nvram) console=ttyS0,115200n8 ethaddr0=00:00:CA:11:22:33 usbhostaddr=00.00.00.00.00.00 boardtype=tnetc550
<jn__> my docsis modem runs eCos *and* linux on a broadcom dual-core mips
<rqou> # cat /proc/version
<rqou> Linux version 2.6.18_pro500 (ccbuild@hawkeye.arrs.arrisi.com) (gcc version 4.2.0 TI-Puma5 20100224) #1 PREEMPT Tue Dec 16 06:40:31 EST 2014
<rqou> thanks broadcom
<jn__> uuuh. 2.6.18!
<jn__> ancient!
<rqou> it's embedded, what did you expect?
<rqou> i mean, getting to this root shell itself involved a security vulnerability
<rqou> so there's nothing new here :P
<rqou> in case you're curious, what you do is you need to type "ping ; sh" in the restricted cli
<rqou> azonenberg_work: I assume that this bullshit is what keeps you employed? :P
<azonenberg_work> rqou: lol
<azonenberg_work> Pretty much, except not in consumer cable modems
<azonenberg_work> things like power plant control systems, medical implants, etc
<azonenberg_work> i mean if someone wanted a cable modem tested we'd do it
<rqou> somebody should modify the c runtime so that any use of system() whatsoever automatically raises a compiler warning
<azonenberg_work> but i dont see much of that myself
<azonenberg_work> what about execve?
<azonenberg_work> thats not exactly hard to screw up either
<rqou> harder than system()
<azonenberg_work> true
<azonenberg_work> or popen
<azonenberg_work> or a bunch of other calls
<azonenberg_work> i have a list of things i often flag during code reviews
<azonenberg_work> system is certainly on the list
<jn__> execve is reasonably easy to get right. system isn't
<azonenberg_work> True
<azonenberg_work> system with anything but hard coded args, that is
<azonenberg_work> with hard coded args its pretty safe
<jn__> right
<rqou> in that case you probably didn't need to invoke system at all
<azonenberg_work> if you do things like output redir etc
<azonenberg_work> it may still be easier
<azonenberg_work> and it has a big win over execve
<azonenberg_work> its portable across platforms
<azonenberg_work> Of course the program you call may not be
<rqou> win32? :P
<azonenberg_work> but, system will be around even on non-posix
<azonenberg_work> as its c standard
mifune has quit [Ping timeout: 260 seconds]
<rqou> but some semantics might be different
<azonenberg_work> Yeah
<azonenberg_work> just saying that is one potential reason to use it
<rqou> sure
<rqou> in general though portability to win32 is lots and lots of fun
<azonenberg_work> yeah which is why these days i dont bother
<azonenberg_work> :p
<rqou> imho trolliest way to make a program nonportable: in a program that accesses serial ports, log output to <name of serial port>.log
<azonenberg_work> hey
<rqou> so e.g. ttyUSB0.log on linux, COM1.log on windows
<azonenberg_work> if you run it as root
<azonenberg_work> no reason you can't write to /dev/ttyUSB0.log
<azonenberg_work> :P
<rqou> the problem is on windows COM1.<anything> is still the special COM1 device
<azonenberg_work> wait what?
<azonenberg_work> you cannot create a file called COM1.txt anywhere on windows?
<azonenberg_work> or is it ok if you do a fully qualified path
<azonenberg_work> like c:\COM1.txt
<rqou> i don't think you can do that either
<rqou> it's a msdos compatibility hack
<azonenberg_work> wow
<azonenberg_work> you're right
<azonenberg_work> i just tried
<azonenberg_work> COM99.txt is legal, COM1.txt is not
<rqou> iirc you can do \\.\c:\com1.txt
<rqou> have fun trying to access it after that
<azonenberg_work> lol
<azonenberg_work> wooow
<azonenberg_work> the more i learn about windows internals the more i cant stand it :P
<rqou> imho nt kernel might be ok, but win32 is definitely a huge pile of wtf
<azonenberg_work> a huge pile of something, for sure :p
<rqou> but hey, we have the linux subsystem now :P
<rqou> GNU/NT ftw :P
<jn__> who wants to revive geNToo?
azonenberg has joined ##openfpga
<rqou> is that gentoo for linux subsystem or something else?
<jn__> it's gentoo for something-with-NT. i don't remember the details
<rqou> coLinux?
<jn__> i actually don't know if geNToo used that, but i think not
<azonenberg_work> aaand my comcast went up for a few sec then died again
<azonenberg_work> grrreat
<azonenberg_work> </Frosted Flakes>
<rqou> jn__: I have an even better and more masochistic idea: Gentoo/ASAN on linux subsystem
<jn__> is that Gentoo with lots of -fsanitize=address?
<rqou> yes
<rqou> i remember reading a rant from somewhere on the internet where somebody tried using Gentoo/ASAN and had to give up
<rqou> because both screen and tmux tripped ASAN constantly
<jn__> somehow i doubt ASan works on the subsystem
<rqou> i'm skeptical too
azonenberg has quit [Ping timeout: 245 seconds]
<cyrozap> pointfree: I think it only has a resettable fuse, but most (if not all) PSoCs support 5V operation.
eightdot_ is now known as eightdot
m_w has joined ##openfpga
digshadow has quit [Ping timeout: 252 seconds]
digshadow has joined ##openfpga
* azonenberg_work stabstabs comcast
<openfpga-github> [openfpga] azonenberg pushed 3 new commits to master: https://git.io/vPibt
<openfpga-github> openfpga/master 3b902e7 Andrew Zonenberg: gp4prog: Reformatting to make gp4prog comply with coding style guidelines
<openfpga-github> openfpga/master 37a3e4d Andrew Zonenberg: Added support for specifying bitstream ID code in gp4par (so it's burned into the bitfile)
<openfpga-github> openfpga/master 191706a Andrew Zonenberg: doc: Alphabetized arguments. Documented --stdout-only argument.
<azonenberg_work> whitequark: So, i think the primary place for setting the usercode should be gp4par
<azonenberg_work> its a property of the bitstream, not something you set when programming the chip
<azonenberg_work> example: you set the xilinx usercode in bitgen, not impact
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 9db7656 to 7ada805: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 7ada805 Travis CI User: Update documentation
<azonenberg_work> Also i'm implementing support for read protection, also in gp4par but logging to the console in gp4par
<rqou> gp4 has read protection?
<rqou> does it actually work?
<azonenberg_work> It has read protection
<azonenberg_work> I have not attempted to defeat it
<azonenberg_work> If i wanted to, i probably could do so easily
<rqou> i wonder if you can just glitch it
<azonenberg_work> Good question
<azonenberg_work> i have a decapped 46620v in my lab now
<travis-ci> azonenberg/openfpga#101 (master - 3b902e7 : Andrew Zonenberg): The build passed.
<azonenberg_work> that i was meaning to delayer and SEM image
<rqou> i wonder how many devices can be easily glitched?
<rqou> i was under the impression that many microcontrollers are vulnerable to glitching
<azonenberg_work> Many are glitchable to defeat software checks
<azonenberg_work> like a bootloader password
<azonenberg_work> i'm less familiar with glitching code protection
<azonenberg_work> that said, it would not at all surprise me if there are easy non-invasive glitches to break it
<azonenberg_work> I just dont know the theory as well
<rqou> i've definitely seen a number of microcontrollers that had outright logic errors in their programming that allowed dumping hidden code
<rqou> e.g. many years ago i dumped the bootrom for the PIC-based VEX robotics controller
<azonenberg_work> Was that a software bug in the app?
<azonenberg_work> or a silicon bug
<rqou> the lock bit is set for the bootloader region, but the bootloader had a readback command that wasn't range checked
<rqou> software bugs
<azonenberg_work> ah, ok so a software bug but in ROM code?>
<rqou> yeah, i've seen a number of those
<azonenberg_work> Yeah not surprised
<azonenberg_work> anyway i want to understand silego's silicon better
<azonenberg_work> But i have to tread carefully, and probably not publish much
<azonenberg_work> because i dont want to damage our relationship
<rqou> i see
<azonenberg_work> whereas with somebody like xilinx, as long as they don't sue me
<azonenberg_work> i couldn't care less what they think of me
<azonenberg_work> i'm small fry with no special treatment already
<azonenberg_work> i am getting priority treatment from silego though, and i want to keep it that way
<azonenberg_work> So while i do intend to do some die imaging and analysis
<azonenberg_work> it will be to satisfy my curiosity, not publishable
<rqou> my favorite rom bug leading to dumping a hidden rom is probably the gameboy advance bios rom
<rqou> the bios had a number of support functions like a fast memcpy and divide
<rqou> all the "normal" memory accessing functions checked if the source address was in the bios region
<rqou> but there was one function that forgot to check
<rqou> it was named MidiKey2Freq
<rqou> which was an invertible function and took a pointer to input data
<rqou> and had no range checks
<rqou> oops
<azonenberg_work> lol
<openfpga-github> [openfpga] azonenberg pushed 1 new commit to master: https://git.io/vPib2
<openfpga-github> openfpga/master dffec61 Andrew Zonenberg: greenpak4/gp4par: can now set read protection as a gp4par argument. gp4prog can set but not unset, and logs the final value
<rqou> the nintendo ds bios was dumped via a similar bug
<azonenberg_work> So i'm working up from the end of the bitstream spec
<azonenberg_work> making sure i have every bit implemented, or making a note in the docs that feature X is not supported
<rqou> the nintendo ds bios has this huge block of data that is some type of initial s-box for a modified blowfish
<azonenberg_work> Have to figure out some details of the pin 2 resets
<azonenberg_work> the doc changed the description of the reset recently
<rqou> somebody somehow discovered (I'm assuming by blind luck) that some of these random bytes can be interpreted as a load opcode followed by a return opcode in thumb mode
<rqou> so you can set up registers in the right way and blindly jump into this magic address
<azonenberg_work> lool
<azonenberg_work> executing the sbox
<azonenberg_work> who would have thought
<azonenberg_work> also, thats what NX is for :p
<rqou> the 3ds finally fixed all of these problems because the "secure" part of the bootrom is permanently disabled after boot
<rqou> (assuming you can't glitch past that)
<rqou> somebody dumped the gameboy color bootrom a few years back by glitching past the "disable rom" opcode
<openfpga-github> [openfpga] azonenberg force-pushed gh-pages from 7ada805 to 92186a2: https://git.io/v6vmV
<openfpga-github> openfpga/gh-pages 92186a2 Travis CI User: Update documentation
<rqou> over a decade after the gameboy color initially came out :P
<rqou> people were finally able to definitively confirm the color values of the GBC custom palettes
<travis-ci> azonenberg/openfpga#102 (master - dffec61 : Andrew Zonenberg): The build passed.
<rqou> the GBC bootrom has some brilliant logic that essentially says "if game == <hardcoded list of really popular black and white gameboy games> then set color palettes to <hardcoded set of colors>"
talsit has left ##openfpga [##openfpga]
<azonenberg_work> lol wait
<azonenberg_work> so they retroactively colorized GB games??
<rqou> yeah, for e.g. Pokemon Red/Blue
<rqou> i heard that the original gameboy bootrom was actually dumped by the most painful method
<rqou> somebody took die pictures and manually wrote down all 2048 bits
azonenberg has joined ##openfpga
<azonenberg_work> lol
<rqou> the person who dumped the GBC bootrom then redumped it via glitching :P
<whitequark> azonenberg_work: ack
<rqou> the original GB bootrom actually had a TOCTOU "vulnerability" that was discovered decades ago
<azonenberg_work> whitequark: do you think the options should remain in gp4prog?
<azonenberg_work> or be entirely gp4par
<azonenberg_work> (code prot and userid)
<whitequark> both seem useful in gp4prog