Forum Discussion

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

modelsim: how to use parameter and error faced

It is pretty fine when i use QII to compile my design. However, when i use modelsim-starter edition, a lots of error popping out.

Error:

Identifier must be declared with a port mode: d.

My submodule:

module fir_comb_RAM1(clk, reset, ena, valid, d, count, q, RAM_coeff, mult_result);

input clk;

input reset;

input ena;

input valid;

input [count_w-1:0] count;

input signed [signal_mag_w-1:fp_w] d;

input signed [signal_mag_w-1:fp_w] q ;

input signed [coeff_w-1:fp_w] RAM_coeff;

I have no idea why modelsim ask me to declare d as a port since i already declare it as input

Besides, how to use parameter in modelsim? In Qii, i use it as below:

e.g1:

input [count_w-1:0] count;

parameter count_w = 4;

It gives me an error undefined variable of count_w;

e.g2:

if (count_64 < (max_coeff+1))...

It gives me an error undefined variable of max_coeff;

Any idea?

thanks

1 Reply

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

    The 2 errors caused by 1 problem only. The placement of parameter should be put on top after the entity. what a silly mistake..

    thanks