Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Generics on the command line

Does anyone know of a way to pass a generic value in to my top-level VHDL design from a command-line build flow? For instance, if my top level file has

Generic (
  STAMP : integer
);

I'd like some way to pass STAMP = $(date +%s) to quartus_map.

Right now I'm calling quartus_sh --tcl_eval to make some set_parameter calls before calling quartus_map, but that seems really really kludgey.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    There is a "quartus_map --set" option to change QSF assignments, but I don't know if it works for Parameters. I would suggest writing a proper script instead of calling --tcl_eval:

    quartus_sh -t set_date.tcl

    where set_date.tcl will use Tcl to get the date and set it on the QSF.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    alternatively you can have the TCL modify the source code to give the value a different default value, or move it into a package and do the same thing.