Forum Discussion

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

time in generic clause of entity for synthesis

Dear All,

is it possible to use generic of type 'time' in an entity declaration which is used for synthesis? I'd like to use time specification as top-entity generic parameter, which is in the sub-entity recalculated to integer and hence it is fully synthesizable (recalculation using e.g. 100 ns / 25 ns leads to integer right?).

This works great in simulation, however quartus refuses to instantiate block claiming that 's' does not exist:

entity top_entity is

generic (

DELAY_LINE_DEPTH : integer := 8; --! default FIFO used for BLR

RESET_PULSE_LENGTH : integer := 50; --! length of automatically generated reset

BCF_DEFAULT_THRESHOLD_VALUE : integer := 3700; --! default value of threshold loaded when register is reset

MAX6627_AUTORUN : time := 2s); --! autorun of max circuit

13 Replies

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

    According to my STANDARD library, the name of the second unit is 'sec' and not 's'... even if all the other units are 'ms' 'us' 'ns' etc...

    So it seems that Modelsim is doing more than the standard.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Confirmed. 1sec works in Q9.1, so modelsim extends the standard behaviour

    thanks for clarification

    d.