Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

The Problem when simulate the lpm_ff using ModelSim-Altera

$
0
0
I am a new learner for ModelSim, and I have met some problems about it.

I have made a simple dff using lpm_ff, the code is showed below

module FDDF(clk,clear,q);

input clk,
clear;


output q;

lpm_ff f1(.enable(1'b1),.clock(clk),.sclr(1'b0),.data(cle ar),.q(q));
defparam f1.LPM_WIDTH=1,
f1.LPM_FFTYPE = "DFF";


endmoduleand I have write test bench for it, the code is showed below

`timescale 1 ps/ 1 ps
module FDDF_vlg_tst();
// constants
// general purpose registers
reg eachvec;
// test vector input registers
reg clear;
reg clk;
// wires
wire q;

// assign statements (if any)
FDDF i1 (
// port map - connection between master ports and signals/registers
.clear(clear),
.clk(clk),
.q(q)
);
initial
begin
// code that executes only once
// insert code here --> begin
clk=0;
clear=0;
// --> end
$display("Running testbench");
end
always #25 clk = ~clk ;


endmodule

But when I use ModelSim-Altera to simulate it, such error comes out:

Error: (vsim-10000) C:/Users/Tei.YLIB_TEI-PC/Desktop/DFF3/FDDF.v(10): Unresolved defparam reference to 'LPM_WIDTH' in f1.LPM_WIDTH.
Error: (vsim-10000) C:/Users/Tei.YLIB_TEI-PC/Desktop/DFF3/FDDF.v(11): Unresolved defparam reference to 'LPM_FFTYPE' in f1.LPM_FFTYPE.
The file I added to the ModelSim-Altera project is the design file and testbech file, also, the 220model.v and altera_mf.v, cycloneiii_atoms.v are included.
I am quiet confused about how to simulate the lpm parts, please help me , Thanks.

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>