shaiko
Advanced Member level 5
- Joined
- Aug 20, 2011
- Messages
- 2,644
- Helped
- 303
- Reputation
- 608
- Reaction score
- 297
- Trophy points
- 1,363
- Activity points
- 18,302
Hello,
This is a question about coding styles and your approach to designing digital circuits in HDL - I'll phrase as:
When you're describing reusable logic (not customized logic with special features):
How deep do you hierarchize your design?
Or, what are your design "atoms"?
A simple example to elaborate:
An SPI peripheral consists of several logical components:
Shift register, clock generation logic, IO toggling, flag generation(ready/received data), etc...
If you look deeper - the clock generation logic will always have a counter in its heart and a comparator.
1. Will you design the SPI peripheral as a single component?
2. Will you divide it to components (shift register, clock generator , etc...) in several files ?
3. Will you go even further down and describe the clock generator as a counter and comparator ?
4. Maybe even (getting crazy) deeper?
This is a question about coding styles and your approach to designing digital circuits in HDL - I'll phrase as:
When you're describing reusable logic (not customized logic with special features):
How deep do you hierarchize your design?
Or, what are your design "atoms"?
A simple example to elaborate:
An SPI peripheral consists of several logical components:
Shift register, clock generation logic, IO toggling, flag generation(ready/received data), etc...
If you look deeper - the clock generation logic will always have a counter in its heart and a comparator.
1. Will you design the SPI peripheral as a single component?
2. Will you divide it to components (shift register, clock generator , etc...) in several files ?
3. Will you go even further down and describe the clock generator as a counter and comparator ?
4. Maybe even (getting crazy) deeper?