From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] fpga zynq: Check the bitstream for validity
Date: Fri, 28 Oct 2016 16:05:46 -0600 [thread overview]
Message-ID: <20161028220546.GA19693@obsidianresearch.com> (raw)
In-Reply-To: <20161028210015.GA19901@live.com>
On Fri, Oct 28, 2016 at 02:00:15PM -0700, Moritz Fischer wrote:
> > What did you do to get a working bitfile? Are you using one of the
> > Vivado automatic flows that 'handles' this for you? I am not.
>
> https://github.com/EttusResearch/fpgadev/blob/master/usrp3/tools/scripts/viv_utils.tcl#L165
Hm 404
> Is what our build process does (we set the byte_swap_bin parameter to
> 1). You're right in that write_bitstream will give you a non-swapped
> version.
?? byte_swap_bin is not documented in UG835
> If we reevaluate now that we wanna support swapping we should do this at
> a framework level. Maybe a preprocess callback or a FPGA_MGR_SWAP flag.
> I'll need to think about this :-)
I'm perfectly fine with the driver only working with a single canonical
bitfile format. That seems completly reasonable, and I prefer an
efficient programming sequence for performance.
Further, eventually this framework is going to have to be fixed to be
able to DMA out of the page cache and in that world there is no
sensible option to process the data before sending it on to the
hardware.
> > So from my perspective, this driver is incompatible with the output of
> > the Xilinx tools. I don't really care, we always post-process the
> > output of write_bitfile, and I am happy to provide a canonized
> > bitstream, but the driver needs to do more to help people get this
> > right.
>
> Ok, so I'm fine with adding the checks and a warning if you don't find
> the sync word. We could add documentation describing which format we
> expect.
Maybe you could send a patch to update the comments for the driver, or
add a documentation file how to produce an acceptable format using
Xilinx tools..
> Ok. That sounds reasonable.
So, the question still remains, should the driver require the header
be stripped (eg the sync word is the first 4 bytes), or should it
search the first bit for an aligned sync word?
Either requirement is acceptable to the hardware. My patch does the
former, I suspect you need the later?
Jason
next prev parent reply other threads:[~2016-10-28 22:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 22:54 [PATCH] fpga zynq: Check the bitstream for validity Jason Gunthorpe
2016-10-27 7:42 ` Michal Simek
2016-10-27 14:32 ` Jason Gunthorpe
2016-10-27 8:50 ` Matthias Brugger
2016-10-27 14:39 ` Jason Gunthorpe
2016-10-28 11:06 ` Matthias Brugger
2016-10-28 15:47 ` Jason Gunthorpe
2016-10-28 16:36 ` Matthias Brugger
2016-10-28 16:55 ` Jason Gunthorpe
2016-10-28 18:23 ` Moritz Fischer
2016-10-28 20:26 ` Jason Gunthorpe
2016-10-28 21:00 ` Moritz Fischer
2016-10-28 22:05 ` Jason Gunthorpe [this message]
2016-10-29 0:09 ` Moritz Fischer
2016-10-31 16:23 ` Jason Gunthorpe
2016-11-01 6:39 ` Michal Simek
2016-11-01 15:33 ` Jason Gunthorpe
2016-11-01 17:48 ` Michal Simek
2016-11-08 0:05 ` Jason Gunthorpe
2016-11-09 14:21 ` Mike Looijmans
2016-11-09 15:18 ` Matthias Brugger
2016-11-09 16:00 ` Jason Gunthorpe
2016-11-09 15:56 ` Jason Gunthorpe
2016-11-09 17:31 ` Mike Looijmans
2016-11-28 18:00 ` Jason Gunthorpe
2016-11-08 0:46 ` Jason Gunthorpe
2016-11-08 9:59 ` Matthias Brugger
2016-11-08 16:24 ` Jason Gunthorpe
2016-10-28 11:12 ` Matthias Brugger
2016-10-28 15:48 ` Jason Gunthorpe
2016-10-28 16:37 ` Matthias Brugger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161028220546.GA19693@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).