Back in 2012, [tmbinc] discovered a neat little undocumented feature in the Xilinx ISE: the ability to use TCP/IP instead of JTAG cables. [tmbinc] was working on an Open Hardware USB analyzer and discovered the nearly undocumented Xilinx Virtual Cable, a single ‘shift’ command that opens up a TCP connection and sends JTAG data out to another computer on the network. It’s extraordinarily useful, [tmbinc] wrote a daemon for this tool, and everything was right with the world.
Yesterday, [tmbinc] discovered the Xilinx Virtual Cable again, this time in one of Xilinx’s Github repos. The code was extraordinarily familiar, and looking closer at a few of the revisions, he saw it was very similar to code he had written three years ago.
The offending revision in the Xilinx repo is nearly identical to [tmbinc]’s Xilinx Virtual Cable Driver daemon. Variable names are the same, the variables are declared in the same order, and apart from whitespace, code conventions are the same. This is not to say someone at Xilinx stole code from [tmbinc], but if this were a computer science lab, there would be an academic disciplinary hearing. What’s worse, Xilinx plastered their copyright notice at the top of the code.
In an issue [tmbinc] raised, he said he was flattered, but clarified that his code was developed entirely from scratch. He believes the Xilinx code was derived from his own code written three years ago. Since [tmbinc]’s code was uploaded without a license, it defaulted to All Rights Reserved. This does not bode well for the Xilinx legal department.
In any event, you really, really have to wonder what Xilinx’s internal documentation looks like if a random person on the Internet can discover a barely-documented protocol, write a daemon, put it on the Internet, and have someone at Xilinx use that code.
Thanks to the anonymous tipster for sending this into the Hackaday tip jar.
And the code has already been removed, that was fast.
I wouldn’t be surprised if they had just locked it out from people viewing it. It already seems like they executed a lock down in the thread where he raised the issue. It really doesn’t look good on them going around this route for damage control. Properly citing the work would have probably been the only thing that was needed. I’m just confused on way they are even trying to put a BSD license on it towards open sourcing it. Wouldn’t that allow them to hide some of their code?
No, they “removed” it: https://github.com/Xilinx/XilinxVirtualCable/commit/1483ecbf545a6765eeb2b64f8200860d4a838311
I’m not sure if they have an understanding of git…that code is still there. If they wanted to remove it, they should have deleted the repo.
Perhaps they are going to rewrite it completely themselves?
If they went that route in the first place, none of this would have been an issue.
That’s sad, because it was a great appnote. A single attribution, or heck, even just a comment that doesn’t try to _blame_ me, would have been sufficient for me. I’ve already re-licensed the code as CC0 so they could keep using it.
Wow, I just saw this on Friday, and was about to comment to them about it!
As a fun note, for anyone who’s actually using FTDI chips, using bit-bang mode is ridiculously slow, so I actually have an implementation here which uses MPSSE and is ludicrously fast (I just put a note in the readme to put the XVC core CC0 like you did).
As a note to Xilinx:
XVC is cool. Just attribute it properly. Oh, and fix the idiot bug in iMPACT that means you can’t use JTAG chains with more than 1 device in XVC.
Thank you for that code, this is so much better than bitbanging!
Link to idiot iMPACT bug, for the interested. It’s pretty bad. It might actually be dangerous, I don’t know.
hey, it is such a painful bug, really. I have really thought about reverse engineering the xvc-plugin of ISE.
I tried, briefly: the plugin structure looks frustratingly complicated from ltrace’s output, since it’s C++. Joy. Why the hell Xilinx doesn’t open the damn plugin API, I have no god damned clue.
You could half-ass work around the bug by specifying the JTAG device you want’s position in the chain, its IR length, and then just work one device at a time.
For me, it’s easier because I *never* put devices in a real JTAG chain (hurts TCK signal integrity too much and it’s a pain in the ass to route) – I just create a JTAG “hub” using a cheapo CPLD and make some dumb interface to dynamically insert/remove them. So then I just work in iMPACT with 1 device only.
That’s awful nice of you. I was thinking an attribution as well, as I love to see my name in the credits. But seriously, compare this article to the following John Deere article and see where the two, together, are going :/
The DMCA will ultimately greatly harm the OS movement by forcing us to use non-free status on our shit, so they can’t steal it from us and then claim it as their own.
Let me see if I understand here. “Premduth” writes in the Xilinx github discussion:
“In Xilinx almost all of our code is copyrighted by default before we can put it out there and that is why it came with the the standard copyright. This will be changed in the near future to the BSD license I listed above.”
So.. Xilinx wants to take someone else’s code, without permission, and slap a BSD license on it? And that’s supposed to make the situation all better?
I think he’s saying, if you look at it from his / Xilinx’s point of view, that all of “our” (Xilinx’s own) code is copyrighted (to Xilinx) by default. Same as any code a company develops. And in the future they’re going to BSD it, which is good.
I don’t think he’s claiming they’re going to illegally re-license code they don’t own.
Maybe some intern or thesis student had this as a project and copied it from the web, you never know.
Perhaps, we don’t know ‘Premduth’s title, but I guess he works there. And he has a hell of a lot to explain to his boss. First the initial plagiarism, but even more the absurd rebuttal he gave after tmbinc raised the issue. Will he pay be docked for all the PR damage he has done to Xilinx?
Honestly, this whole thing is just bizarre.
XVC isn’t actually undocumented. It’s been documented since 2011, here, behind a registration (maybe pay? dunno) wall.
Xilinx has their *own* implementation of it, for the ML605 board, at that above site. It’s not tmbinc’s implementation – it’s theirs. It runs standalone on a MicroBlaze kernel, using lwip, but lwip is sufficiently close to any socket implementation that porting would’ve been pretty trivial.
So you’ve got an employee, inside Xilinx, who decided that instead of using existing, licensed, coyprighted, code that Xilinx *already had*, he’d go out and use code on Github without even mentioning its source. It makes me wonder how many other hidden contributions like that exist buried inside Xilinx’s code.
It’s not likely to just be Xilinx
I agree, this is very bizarre. Though I could swear that back in 2012, I did search for “xilinx xvc”, and did not find a thing. I was able to find it now (and registered to it, now). It seems that their code – if you can trust their headers – was initially even written in 2006. Maybe they just got it confused after such a long time.
It is impossible for a corporation to check every piece of code inserted in the source tree by employees. Certainly lazy or bad programmers to that on regular basis.
Not impossible if they have a methodology for code check in which is searched against the web using various plagiarism checking methods.
Of course it’s much easier to avoid copyright infringement or open source license conflicts if you establish the code integrity system before beginning a project.
I suppose you could use a check-in method which is checked against plagiarism. But the code on the net is so nebulous, there’s so much of it out there that doesn’t immediately show up on Google. I don’t think you could make a reasonable case that forces somebody to check like that. Probably the only practical way is like this, and when a case occurs, find the person responsible and throw him to the wolves, since it’s his own fault.
This might be the sort of thing an employment contract could cover, the employee bears responsibility for any copyright-infringing they do. It’s not something I really know about, is that possible?
Oh, come on. They pretty well manage their commercial licenses, and when they don’t, the black helicopters (Business Software Alliance rings a bell?) come in.
And they end up paying “damages” to the original software vendor *plus* any mark-up the BSA likes to slap on top of that.
With free software, it’s mostly someone friendly knocking at the door (I know the FSF tries that first too: it takes *years* before they go to court).
Doubling on the fuckup just by “deleting” the files off the public git is just bad culture. Just saying “oh, yes, thanks for your code” and inserting the correct copyright would have sufficed.
I have not a bit of compassion for this kind of behavior/culture. It stinks.
I would think Xilinx would be able to see who did the commit on their internal version control. I’ll be on the lookout for their full explanation which would be one neighborly way to move this issue toward a resolution.
According to the source, it was ‘Alvin Clark’ (who’s also listed on XAPP1251 as author) who attributed the xvcServer.c code to himself – Alvin’s actually an Avnet employee.
So it might not actually be Xilinx’s fault here – if an Avnet employee submitted the code to Xilinx, attributing it to himself, it’s understandable that they might’ve made this mistake.
Actually that might be a good arse-covering method. Have as much possibly litigation-generating activity farmed out to subsidiaries or private companies, so they bear the resulting fines etc. Since they have much less money to lose, they can just go bankrupt.
Then again this is the sort of sneaky thing corporate thieves and fraudsters do, so perhaps I shouldn’t suggest it.
Well, in this case, Avnet is about as large as Xilinx is in terms of operating income, so it doesn’t quite work that way. :)
Also, the funniest thing is that Xilinx left in a bugfix due to an old version of iMPACT’s crappy XVC implementation (it goes through an undesired JTAG state), which makes it really, really obvious.
And if it was the other way around, SWAT was busting yo ass, and the DCMA hammer was going to rape him, but its just a small guy and big corporation, so a sorry is enough….
Small Guy is being very decent about it, and actually wants them to have the code, for everyone’s best interest. Sure that helps a lot. And I’m sure that if they have any sense, they won’t antagonise him too much, even if the lawyers are itching to blunder in (and justify their retainer). Lawyers on retainer, what an awful idea! Like keeping wolverines to protect you from burglars.
And it seems tmbinc intended the code to be open anyway, but just forgot to license it so.
So who wants to comment on that github issue like crazy until Xilinx admits to being wankers!
When I put code up on the web, I put it there as a resource for others to use, (or maybe for others to laugh at). The code is already providing the utility I want from it, and maybe it will be helpful to others – after all it is better than it being forgotten after being archived off to a USB drive somewhere.
If he didn’t want his code to be used by others, then why put it up there in the first place? You don’t have to use GitHub, and you can create private repositories if you want.
And if he did want it used, then what is the problem? Is it that is has been used by a large company and not an individual?
Is it a problem of egos that need stroking? or is it a USA cultural thing where coders want their 10 minutes of fame?
I would be like “Hey Xilinx, I like using your chips, you made use of some of my code – neat!”, and have a little smug feeling…
I don’t know, it doesn’t really feel like “…you made use of some of my code – neat!”, to me it feels more like “…you made use of some of my code – and are now claiming you wrote it and are taking credit for its creation? WTF?”
I think the problem is that Xilink copied it and then put their own copyright note on it. See [tmbinc]’s note above.
So if I took your code and claimed it was my own, you wouldn’t have a problem with that? Because that’s what’s happening here.
Wanting credit for their work is a reasonable thing for normal people.
I must be abnormal. For example, I worked for many nights writing a VHDL DVI-D implementation and put it on my web site. It has been used in many places many times, under many different licenses and copyrights.
For example, the “Neppielight: DIY FPGA-based HDMI ambient lighting” has it re-licensed it under the GPL. (i.e. included it in a GitHub Repo that is licensed under the GPL).
And then ikorb’s gcvideo video project the same code appears under a top level “Copyright (C) 2014-2015, Ingo Korb “.
It is also in some student projects here and there, which usually end up being owned by the institution the student is studying at.
I don’t really care. I’m off doing playing with something else….
Meanwhile the vast majority of us dislike liars and thieves.
The bigger frustation to me is that someone not properly attributing the source of their work implies that they know what the hell they’re doing. There’s a big difference between flat copying code from GitHub and working all of this crap out for yourself and rewriting it (as I know, since that’s exactly what I did in this case).
It depends, in the case of Ingo Korb, say, he might just have forgotten to do the licensing properly, assuming he’s just a man, not a company. Big companies though, you expect better from, since they’re making big money from it, not just getting the same pleasure from tinkering that someone that me or you would get. And since big companies like to defend their copyright, their not owning the code in question is kind of a big deal, not least for the people who “infringe”. It’s not impossible to find one day that tmbinc is sued by Xilinx for stealing code he wrote!
Especially with the disconnect and lack of mutual understanding between engineers and lawyers. It’s the sort of thing where everyone involved would benefit from lawyers with the proper specialisation. And perhaps programmers could have a half-day seminar on the law to yawn through and complain about wasting their time on.
ZZZzzz… *snores* ZZZzzz… *snores* Wait, what? Yeah, the answer is 42. What do you mean that’s an illegal number? Since when? MICROSOFT? How the…? Screw this, I’m going back to being an engineer. The laws of physics are easier to deal with that this crap. At least I don’t need several volumes of books just to know if a transistor will work. 42 volumes just to tell someone whether or not they was infringing on a copyright or trademark? Nope, want nothing of it. Stick me back in my “boring” lab, there’s science to be done!!
Wow time to check the get for anything we have created! I mainly focus on altera tho …
But I must add don’t go blaming xilinx right away … Could be a rouge developer … This is actually fairly common
Seems like a red herring…
Gotta take the makeup away from those herrings…
Seems legit.
Apart from the licensing issue, just red the xapp1251 PDF, and would like to give it a try, but it seems like the sources archive was deleted and all the links are now broken.
Could anybody please send me the files, or a working link to the files for the steps described in xapp1251?
Thank you,
https://hackaday.io/RoGeorge
The code is still in the github commit history.
https://github.com/Xilinx/XilinxVirtualCable/commit/1483ecbf545a6765eeb2b64f8200860d4a838311
Found them, thank you!
I would just look over tmbinc’s original code, and his original post. It’s pretty clear what’s going on.
Actually, for me the code is different. For sure, enums are the same (but that’s what enum are for), and the state declaration is also the same (I would say simplicity is the root cause here), but it’s not the same protocol, starting from handle_data function, it’s a completely different code. In all cases, thanks for showing this code, it’s very useful.
Closed source code is most often dirty code
Amazing hor folks on this forum defend intellectual property when it ‘belongs’ to one of their own… Shame they can’t extend that to all intellectual property… But then hypocrisy is universal…
Oh Xilinx, please fire your lawyers. Those decrepit and incompetent BAR boi’s care more about proving there value then actually caring about making their products openly adaptable. I imagine not one single one can identify the difference between BSD, LGPL, or MIT licenses. Maybe they are terrified that they will get swallowed up by the biggest patent owners/monkeys around. “Nobody ever got fired for buying IBM”. Is this John Cooley to blame again?
F’ This. Maybe if they didn’t try to jerk innovators around with BS licenses and dev tool structures we might actually use their products.
I guess we could blame the JIT manufacturing techinques. I guess the worst irony is that the Simiplified Chinese community have all this stuff exteremly well documented already.
P.S. Cutting off ISE AND Older chip line support is akin to cutting both of your arms off and expecting to grow back new limbs.
The Altera boi’s are just as dumb. So at-least there is that.
Nice to see that they nuked the repo and fixed the licensing / attributing.
My personal experience has been that Xilinx lawyers are making simple and straight forward licensing issues impossible. This sounds just a small continuation of that.
I’m not quite sure if this is an US thing or a Xilinx thing.
Looks like Xilinx fix the issue. Here is how the license reads now:
https://github.com/Xilinx/XilinxVirtualCable/blob/master/XAPP1251/src/xvcServer.c
/* This work, “xvcServer.c”, is a derivative of “xvcd.c” (https://github.com/tmbinc/xvcd)
* by tmbinc, used under CC0 1.0 Universal (http://creativecommons.org/publicdomain/zero/1.0/).
* “xvcServer.c” is licensed under CC0 1.0 Universal (http://creativecommons.org/publicdomain/zero/1.0/)
* by Avnet and is used by Xilinx for XAPP1251.
*
* Description : XAPP1251 Xilinx Virtual Cable Server for Linux
*/