Author Topic: Lattice IP use with Modelsim  (Read 889 times)

0 Members and 1 Guest are viewing this topic.

Offline rayhaynesTopic starter

  • Newbie
  • Posts: 1
  • Country: us
Lattice IP use with Modelsim
« on: May 15, 2024, 07:00:42 pm »
I'm using the ModelSim that came with the Diamond 3.13 installation and running simulations successfully on a medium sized design (multiple modules with multiple levels of hierarchy) and but once I add my first Lattice IP block, a customized FIFO_DC, I run into a problem.
I used IP Express to create the IP (my_fifo).
Added the my_fifo.v that was created by IP Express in the project root to the my VLOG list of files.
Added -L xp2 to the vsim command line and now I'm stuck at this error when I run the simulation:

Error (suppressible): (vsim-10000) Unresolved defparam reference to 'LUT4_16' in LUT4_16.initval

I get this error for each of the defparams in the my_fifo.v file (there are many). Here is code snipit from the my_fifo.v file that is creating the error:

Code: [Select]
// synopsys translate_off
defparam LUT4_16.initval = 16'h8000 ;
// synopsys translate_on
ROM16X1 LUT4_16 (.AD3(scuba_vhi), .AD2(wren_i), .AD1(scuba_vhi), .AD0(scuba_vhi), .DO0(dec0_wre3))

When expand the xp2 library in modelsim I can see the ROM16x1 entry.

The xp2 library came pre-compiled and VMAP'ed in this Lattice version of Modelsim

What step am I missing?
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7818
  • Country: ca
Re: Lattice IP use with Modelsim
« Reply #1 on: May 15, 2024, 10:59:46 pm »
Try writing the line like this:
Code: [Select]
ROM16X1 #( .initval (16'h8000) ) LUT4_16 (.AD3(scuba_vhi), .AD2(wren_i), .AD1(scuba_vhi), .AD0(scuba_vhi), .DO0(dec0_wre3))
If this doesn't work, then the 'initval' is not a proper parameter within 'ROM16x1'.
Maybe 'initval' needs to be uppercase?

Also, some of Lattice's functions actually have fake parameters generated by their wizard code generator, where Lattice Diamond uses comments to set controls for their FPGA compiler which are completely ignored by Modelsim.  Lattice's PLL is notorious for this placing controls and settings as ASCII text as actual comments in your code and Diamond fails to fully reach a proper timing if you remove those /* abc_frequency = number_mhz */ in your code.
« Last Edit: May 15, 2024, 11:08:31 pm by BrianHG »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf