Thursday, September 30, 2010

argc, argv

Let's face it, this should be second nature. But here's a nice link:

http://www.crasseux.com/books/ctutorial/argc-and-argv.html

Hints and tips for fscanf etc

Here are a couple of nice sites with examples for fscanf and other similar functions:

A good example for how to check for EOF, with a special extra treat on how to do fscanf without using fscanf:

http://stackoverflow.com/questions/3764014/how-do-you-read-scanf-until-eof-in-c

Gorgeous tabular function definition with a nice example section at the end:

http://www.cplusplus.com/reference/clibrary/cstdio/fscanf/

The same thing for sscanf:

http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

Sunday, September 19, 2010

step-by-step using COREGEN

To include a fifo from COREGEN in the design, do this:

1. Insert the component and port map from the .vho file in your VHDL at the appropriate places.

2. Add the EDN file as the source for the component

3. Make sure the ngc file is in the same directory as the project or it just won't fucking compile. Adding the ngc as a source file doesn't work. Actually, to be safe, just either generate the core into the project directory rather than a subdirectory, or copy all the files up from the subdirectory.

3a. This link has a clue (in answer #4) on how to add the subdirectory to the search path, but I'm not sure that it's worth the trouble, and the clue is not complete:

http://thedailyreviewer.com/hardware/view/xilinx-ise-constanly-asking-to-regenerate-a-core-file-111129027

Wednesday, September 15, 2010

How to tell if my XP is 32 or 64 bit

Short answer: You'd know if it was 64 bit.

Slightly better answer: The OS listed in the My Computer properties would have a "64" somewhere in the name.

This KB entry from M$ spells the above out for every possible OS with step by step instructions:

http://support.microsoft.com/kb/827218