Autor: C.J. Adams-Collier Data: A: Zoltán Herczeg CC: Chris Collier, pcre-dev Assumpte: Re: [pcre-dev] PCRE as FPGA
Thank you Zoltán!
Yes, I think "find all matches" would make the perfect first of the raisons
d'être! This is looking to be a very promising project.
Chris and I are meeting tonight in Seattle to talk a little about the
project with our friends from the Seattle Perl Users Group (SPUG). If any
of you are in the Seattle area and would like to chat, you're welcome to
met us on Capitol Hill at Metrix Create:Space after 1800 local. I think
the bit that I am most concerned with is the compiler which targets the
FPGA's gate array microcode. How different is it from other microcodes
that GCC might target currently?
Cheers,
C.J.
On Mar 17, 2015 1:11 AM, "Zoltán Herczeg" <hzmester@???> wrote:
> Hi,
>
> you are not the first one who are interested in moving PCRE to an FPGA on
> this list. From technical point of view, you probably can put PCRE onto any
> device provided you can compile C code for your target platform. The core
> PCRE library has been written in standard C, and it depends only on basic
> system calls (memory allocator, memory compare/copy, etc.). Nothing
> special. PCRE test and grep tools requires a bit more, but you likely don't
> need them.
>
> I think the difficult part will be to exploit the massively parallel
> nature of an FPGA. PCRE is a depth-first search engine, which uses a
> backtracking engine for matching. This approach provides a well predictable
> behaviour for users, and this level of control what makes backtracking
> engines so popular. JIT compiling works extremely well with PCRE, since it
> fits the depth-first nature of the engine, and we can do many static
> compiler optimizations (e.g instruction scheduling, branch optimizations).
> The backtracking part is very unique though. But I feel doing this on an
> FPGA will be really challenging, since the matching process is not designed
> for parallel execution. In general you need to find the first character
> where a depth-first search finds a match. But some restricted use cases
> might be good candidates (e.g find all matches).
>
> Regards,
> Zoltan
>
> "C.J. Adams-Collier" <cjac@???> írta:
> >Thanks Phillip,
> >
> >What I meant by "lower level" was targeting something other than an OS
> with
> >file system, memory management and other such conveniences.
> >
> >Perhaps the gcc-dev list might be more appropriate, but I thought there
> >might be some things more specific to the application.
> >
> >Have any of the list members considered putting PCRE on dedicated silicon
> >and what that might entail? For example, what services does libpcre
> depend
> >on in terms of system calls and state management which might not be
> >available without a kernel between it and the hardware?
> >
> >Cheers,
> >
> >C.J.
>
>