Forum: FPGA, VHDL & Verilog Passing a generic value from a tcl script to a generic package file in VHDL

von Abdallah (Guest)

Rate this post
0 useful
not useful
Hello Guys

Simple question, yet I cannot find an answer anywhere for it. I even 
read book chapters on the subject, and still cannot figure it out.

So here it is, I can pass a generic value from a tcl script to the top 
layer in an a certain hierarchy using the "-g" flag when simulating, and 
then I pass down this generic to the sub-modules within it.

However, my problem is this. I am trying to make a generic package file, 
and I want pass the generics from a tcl script into the package file,

Then after this is done, I will instantiate the generic package file in 
each module and they can all read what was passed to the package 

So I want this: Genrics in tcl => pass to Generic_PKG => instantiate 
package in submodules => parametrize all modules.

This is my current case: Genrics in tcl => pass to Generic_Top_module => 
pass down to sub-modules => parametrize all modules.

Thanks in advance!

von vancouver (Guest)

Rate this post
0 useful
not useful
You could let your tcl script generate the pkg itself, i.e. a code 
generator. If your pkg just contains parameters, this should be quite 
easy to implement.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.