View Single Post
  #6 (permalink)  
Old 11-13-2007, 04:26 PM
Nial Stewart
Guest
 
Posts: n/a
Default Re: Structured way of changing eg time constants for real world build / simulation?

> I would use a generic, passed up to the top level, with a default
> value defined for synthesis. Then when you instantiate the top level
> module in your testbench for simulation, override the default value
> with a generic map. This can be done for one or a whole group of
> generics. If you use a group of generics, you can define them as
> elements of a record type in a package, and every entity takes that
> generic record. That way when you want to add a generic for some lower
> level entity, you just have to add it's element to the record
> definition, then set it at the top (default and testbench), and use it
> at the leaf level where needed. The record definition acts like a
> conduit through which you can pass anything you want.
>
> Andy



Another nice trick, although after spending ages trying to get my head
round a design I had to pick that used records on port maps everywhere
I tend to try to avoid them.

Sometimes they can be a great tool for obfuscation :-)



Nial.


Reply With Quote