<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.
<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.
<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>
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
<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?