I come from SW world and recently I've started to create FPGA designs in VHDL. I've read about the block
concurrent statement and its principal uses like organize architecture grouping concurrent code and guard signals, which is not recommendable.
But this is one of many possibilities in order to implement the same functionality. For instance, I've been implemented a CRC frame checker with a VHDL function. It has one bit value input, and return a register with the cumulative CRC value of all bit inputs.
I think the same functionality can be implemented with a block
. What is the best option for resource utilization? When would you use a block
and when would not? Which is the best case to implement a block
?
Thanks,
block
statement. – Matthew Taylorgenerate
statement, there is an optionalbegin
which gives you an optional declarative region to declare "local" signals. I'm interested in your other suggestion, though. Can you give an example? – Matthew Taylor{block_declarative_item}
(in Ashenden at least) so the block is actually implicit. On the other, one example would be a process describing a pipeline where you can use either signals or variables for pipeline registers, but using variables, you would have to describe the pipeline backwards. Using signals you can describe it forwards (first stage first), but if you want to keep these local signal declarations local, one way is a block. (I had an example in another Q/A but can't find it atm) – user_1818839