Search code examples
fpgalatticemodelsim

ModelSim Fatal error in process RAM_i1/RAM_0_0_0/P107 Lattice MACHXO3L_MISC.vhd


I am facing a fatal error when trying to simulate in ModelSim a design that instantiates a RAM IP for the target device MACHXO3L from Lattice Semiconductor. I have compiled their libraries to use in ModelSim, but the simulations always stop due to the following fatal error:

# ** Fatal: (vsim-3483) Delay in signal assignment is not ascending.
#    Time: 20 ns  Iteration: 1  Process: /fft_tb/fft_i/RAM_i1/RAM_0_0_0/P107 File: C:/lscc/diamond/3.11_x64/cae_library/simulation/script/../vhdl/machxo3l/src/MACHXO3L_MISC.vhd Line: 541
# Fatal error in Process P107 at C:/lscc/diamond/3.11_x64/cae_library/simulation/script/../vhdl/machxo3l/src/MACHXO3L_MISC.vhd line 541

ModelSim Fatal Error: ModelSim Fatal Error

Any ideas? It seems that the problem is the Lattice library MACHXO3L_MISC.vhd line 541


Solution

  • As correctly suggested by @user1155120, the problem is solved by changing the simulation time resolution. I changed it to picoseconds by modifying the modelsim.ini file. The parameter to be modified is:

    ; Set SystemC default time unit.
    ; Set to fs, ps, ns, us, ms, or sec with optional 
    ; prefix of 1, 10, or 100.  The default is 1 ns.
    ; The ScTimeUnit value is honored if it is coarser than Resolution.
    ; If ScTimeUnit is finer than Resolution, it is set to the value
    ; of Resolution. For example, if Resolution is 100ps and ScTimeUnit is ns,
    ; then the default time unit will be 1 ns.  However if Resolution 
    ; is 10 ns and ScTimeUnit is ns, then the default time unit will be 10 ns.
    ScTimeUnit = ps
    

    You may also want or need to change the same parameter in the .mpf file, in your project folder. If that doesn't change the simulation resolution you can implicitly do it in the vsim command:

    vsim work.<your_test_bench> -t ps