I'm new to Lattice Diamond, but I have experience with Xilinx ISE, Vivado and Quartus :).
I found - like in Xilinx ISE - that Lattice Synthesis Engine (LSE) supports generic parameters for the top-level entity. (right-click "impl1" -> Properties => HDL Parameters)
I tested it with integer parameters and it worked: A_BITS=10;D_BITS=32
.
But how can I pass a string parameter?
My tests:
A_BITS=10;D_BITS=32;FILENAME=ocram_sdp.mem
This results in an unknown literal value errorERROR - D:/git/PoC/src/mem/ocram/ocram_tdp.vhdl(82,3-82,11) (VHDL-1241) ocram_sdp.mem is not declared
ERROR - D:/git/PoC/src/mem/ocram/ocram_tdp.vhdl(82,3-82,11) (VHDL-1363) unknown actual generic literal value ocram_sdp.mem for generic filename ignored
ERROR - D:/git/PoC/src/mem/ocram/ocram_tdp.vhdl(82,3-82,11) (VHDL-1081) formal filename has no actual or default value
INFO - D:/git/PoC/src/mem/ocram/ocram_tdp.vhdl(78,8-78,17) (VHDL-1067) elaborating ocram_tdp(rtl)
INFO - D:/git/PoC/src/mem/ocram/ocram_tdp.vhdl(78,8-78,17) (VHDL-1068) elaboration of entity ocram_tdp failedIt's the same when I escape the dot with
\
.A_BITS=10;D_BITS=32;FILENAME="ocram_sdp.mem"
This results in a wrong number of arguments error.-sdc option: SDC file input not used.
-lpf option: Output file option is ON.
ERROR - Wrong number of arguments for -hdl_param. Must have <name, value> pairs.
Done: error code 2Setting only
A_BITS=10;D_BITS=32
by HDL Parameters and settingFILENAME
via default value in the generic section, works fine.
The Lattice Diamond 3.6 User Guide has no reference to the keywords "HDL" and/or "param(eter)".
- How can I pass strings to the top-level entity, if possible?
- Is there a separate LSE User Guide?