From: C. M. <cm...@gm...> - 2010-04-03 19:24:59
|
My bad! As I was experimenting, I forgot to specify the xor and reflection options. So pycrc could not generate the table and I had to set it up myself. When I define all the options, pycrc builds the table for me. Thank you for the sanity check! On Sat, Apr 3, 2010 at 11:09 AM, C. Mundi <cm...@gm...> wrote: > Thanks for your quick response. I am out of the office today but will > send my command line and output files tomorrow or Monday. I did > specify individual parameters on the command line and generated > separate c and h files -- no main(). > > BTW, I took a quick look at the py files. Wow. A whole macro > language. Impressive. > > Thanks! > > > On 4/3/10, Thomas Pircher <te...@gm...> wrote: > > C. Mundi wrote: > >> I was a little surprised that all my crc's were coming back zero until I > >> realized I forgot to initialize the table! > > > > Oh! Sorry, I guess I should state that more prominently in the > > documentation. > > > >> It would be nice to update the example at the end of the man page now > that > >> the most functions require a pointer to a crc_config_t. > > > > There are actually two examples in pycrc: > > - The fully fledged version contained in test/main.c > > - A shorter version generated by the --generate c-main option > > > > I have updated the man page (http://www.tty1.net/pycrc/pycrc.html) with > an > > additional paragraph that points to the example code. > > > > > > But I don't understand the second part of your last sentence. If your > model > > is > > fully defined when you generate the C code (using either the --model > option > > or > > each of the options --width, --poly, --reflect-in, --xor-in, > --reflect-out > > and > > --xor-out) then you do not need to pass a pointer to a crc_cfg_t > structure. > > You also don't need to call crc_table_init() and in general, the code > runs > > faster. > > > > I spent some time for the last version to further reduce the cases where > the > > crc_cfg_t structure is used, so if you have come across of a case where > it > > is > > still used unnecessarily, please let me know! > > > > Thank you, > > Thomas > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Pycrc-users mailing list > > Pyc...@li... > > https://lists.sourceforge.net/lists/listinfo/pycrc-users > > > |