FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

lpm_hint

Altera_Forum
Honored Contributor II
2,336 Views

Hi all! 

 

Many of Altera's 'Library Parametrizable Modules' (LPMs) have a 'lpm_hint' generic. 

This parameter is a string that is parsed, and can contain an arbitrary long list of parameter/value associations. 

 

Example: 

inst_1: lpm_mult generic map ( lpm_hint => "USE_EAB= ON, INPUT_A_IS_CONSTANT= YES"),  

 

Some of this parameter are explained in some documentations, but not all of them. 

Even for some LPMs no doc is available at all (e.g.: no mention to 'lpm_hint' in Altera's "Internal Memory (RAM and ROM) User Guide"... 

 

Where can I find info about that? 

 

Thx 

 

Julien
0 Kudos
12 Replies
Altera_Forum
Honored Contributor II
680 Views

I think its an old thing that looks like it's dissapearing. 

IIRC, you used to have to use LPM_HINT on the DC/SCfifo to pass through memory paramters. But those paramters are part of the fifo params now. 

 

its also becoming less of an issue now that inference is so prevalent, and there is much less need to use the basic megafunctions. Plus the synthesisor is getting much better at working stuff out for you.
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

PS. I dont think the Altsyncram has an LPM hint parameter.

0 Kudos
Altera_Forum
Honored Contributor II
680 Views

Actually, this question raised because I am trying to generate an altsyncram and there are parameters I dont understand in the component instanciated: 

 

 

--- Quote Start ---  

lpm_hint => "ENABLE_RUNTIME_MOD=NO", 

--- Quote End ---  

 

 

So I looked the entity into the file /opt/altera10.1/quartus/eda/simlib/altera_mf.vhd, and there are few parameters I don't get either: 

 

- sim_show_memory_data_in_port_b_layout 

- init_file_layout 

 

Do you know these? 

 

Thx
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

also, I see both a parameter "byte_size" and parameters "width_byteena_a" and "width_byteena_b". 

 

Shouldn't "width_byteena" be computed out of "width" and "byte_size", (or, on the contrary, "byte_size" be computed out of "width" and "width_byteena") ? 

Or should I just specify all of them, in coherence?
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

There seem to be more paramters in the Altera Help than in the User guide. For INIT_FILE_LAYOUT: 

 

 

--- Quote Start ---  

 

Specifies the layout port used with the initialization file. Values are "PORT_A", "PORT_B", and "UNUSED". If omitted, the default is "UNUSED". If the OPERATION_MODE is set to "DUAL_PORT" mode, the default value is "PORT_B". If the OPERATION_MODE is set to other modes, the default value is "PORT_A". 

 

--- Quote End ---  

 

There are not that many paramters that are required. Ususally I just omit anything I dont want to mess with specifically. 

 

 

Is there any reason you're using the mega-wizard and not using infered ram? Afaik, the only RAM you cannot infer is mixed-width true dual port dual clocked ram, or changing to write-before-read behaviour (this is annoying, because although a shared variable would allow you to do this, altera just infers read-before-write regardless. X does it properly). You can use attributes to specify some of the paramters like RAMSTYLE and init_files.
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

No, I just want to generate a simple 1 read/write port synchronous ram :) 

 

But the usage in my company is to instanciate LPMs for FIFOs, RAMs, ROMs, multipliers, etc. 

 

So I used megawizard, and even if the generated RAM works well, I am curious so I try to understand all the parameters :)
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

for anything you cannot find, or get a reply to here, I suggest opening a mysupport case. 

 

The megafunctions are quite old in some cases, and in most cases have to support a wide range of devices, hence the wide range of parameters. So parameters keep getting added, when usually its usually better to let the synthesisor do most of the work picking paramters.
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

OK 

 

Thx 

 

P.S: when you talk about 'using infered ram', you mean declaring an array of std_logic_vector (for instance) and let the synthesizer implement it with a RAM block in the FPGA, right?
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

basically yes - assuming to follow the templates correctly for accessing that ram. 

 

Its actually very good now. Ive had infered rams from arrays of unsigned, signed, sfixed and integer types without problems. I even messed around and used a character type as the address input and it infered a ram!! Means I dont have to keep converting to std_logic_vectors all the time!
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

cool :) 

 

(But it will take me forever to convince people here ^^)
0 Kudos
Altera_Forum
Honored Contributor II
680 Views

Why not just do the code, and give them the results. They never need to know :)

0 Kudos
Altera_Forum
Honored Contributor II
680 Views

Also remind them that Infered code is more portable (but you still have to be careful. Registers in Altera and Xilinx rams are placed slightly differently.

0 Kudos
Reply