4

i'm relatively new at fpga (vhdl) programming. So i have no clue about resource cost of different solutions to a problem... So i was wondering which approach makes most sense if i want to implement some memory mapped registers inside an fpga design. Should i design 1 address decoder that strobes al the registers on an address match or is it better to design each register with its own decoder (or at least each subcomponent like pwm generator which uses a couple of registers in my implementation).

Thanks in advance for the insights Regards Jan

1 Answer 1

4

The critical resource is usually not gates (LUTs), but engineering time, and so the primary concern is to make the design easy to manage and modules easy to reuse.

For that reason alone, you should make a hierarchical address decode, where each module is responsible for partitioning and decode of the address space it has been allocated.

So in your case, the PWM generator should have separate address decoder for registers allocated in the address space given to the PWM module at the next higher level in the hierarchy.

To learn about resource usage you can install a FPGA synthesis tool and experiment with different approaches; that is a good exercise which will help you choose between different implementations.

Sign up to request clarification or add additional context in comments.

1 Comment

This is the correct approach. You might see some older FPGA designs using the "centralized" bus approach, where all register decoding is done in one central module. This does not lend itself to portability or reusability. Creating a distributed register interface is significantly easier for reuse, it lends itself nicely to documentation, and resource utilization is lower.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.