module shift_reg(clk,clken,data_in,data_out);
input clk;
input clken;
input [7:0] data_in;
output [7:0] data_out;
/*always @(posedge clk)
begin
data_cnt=data_cnt+8'd1;
end*/
shift1 u1(
.clock(clk),
.clken(clken),
.shif
tin(data_cnt),
.shiftout(data_out));
endmodule
测试程序:
initial
begin
clk=0;
data_in=8'b0;
clken=1'b0;
end
always #10 clk=~clk;
initial
begin
#100 clken=1'b1;
#200 clken=1'b0;
#100 clken=1'b1;
#200 clken=1'b0;
#100 clken=1'b1;
#200 clken=1'b0;
#100 clken=1'b1;
#200 clken=1'b0;
#100 clken=1'b1;
#200 clken=1'b0;
#100 clken=1'b1;
end
always @(posedge clk)
begin
if(clken)
data_in=data_in+1'b1;
end
endmodule
modelsim-ase编译正确,
仿真时出错
# ** Error: (vsim-10000) F:/Quartus11.0_exercise/quartus_exercise/shift_reg_ram_based/shift1.v(69): Unresolved defparam reference to 'intended_device_family' in ALTSHIFT_TAPS_component.intended_device_family.
# Region: /shift_reg_vlg_tst/i1/u1
# Error loading design
有哪位大神做过这个库函数的仿真,求解答!!!
文件shift1.V 第69页出错。指定的实例化模块没有intended_device_family (在 ALTSHIFT_TAPS_component中)参数
一周热门 更多>