On 30/04/2011 19:34, V G wrote: > But I don't understand what a "reg" does and > what it really does inside the chip. A reg is short for register, e.g. a place to store bits, usually one or=20 more D type flip-flops. This is the basis of sequential (as opposed to combinational) designs=20 (if your knowledge of digital design is rusty, read a book on it, you=20 need to know this stuff well for FPGAs) When you compile your design, have a look at the "schematic" in ModelSim=20 (or whatever Xilinx uses) This is a graphical representation of your design. You will be able to see what different verilog constructs turn into on=20 the chip. I found this quite useful for getting the hang of visualising=20 what my Verilog is doing, and when to use what construct. Try and keep it reasonably simple though, otherwise it will be difficult=20 to read easily. You might be surprised what a couple of statements can=20 turn into. Try things like seeing what an addition of two registers becomes, and=20 compare a case statement to an if else statement. Pong Chu's book goes=20 into things like priority routing and much more, so it should all make=20 sense soon enough if you keep at it. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .