正在开发XP2-17项目源代码如下: fifo没有问题,其中pcpprd_out为fifo输出的脉冲周期,其中pcpcnt_out为fifo输出的脉冲个数,映射出现如下问题:
error map:
Design doesn't fit into device specified refer to the map
敬请那位帮我解答下
`include "Parameter.v"
`timescale 1ns/100ps
module int_pwm1 (
clk,
reset,
arm_data,
reset_cs,
pcpprd_cs,
pcpcnt_cs,
pwmdir,
pwmout
);
input clk;
input reset;
input reset_cs;
inout [`DATA_WIDTH-1:0] arm_data;
input pcpprd_cs;
input pcpcnt_cs;
output pwmdir;
output pwmout;
reg pwmdir;
reg pwmout;
wire [`DATA_WIDTH-1:0] pcpprd_out;
wire [`DATA_WIDTH-1:0] pcpcnt_out;
reg [`DATA_WIDTH-1:0] time_gnt;
reg [`DATA_WIDTH-1:0] time_knt;
reg pcpprd_pwm;
fifo uvw1 (
.clk(clk),
.reset(reset),
.dat_in(arm_data),
.reset_cs(reset_cs),
.fifo_cs(pcpprd_cs),
.dat_out(pcpprd_out)
);
fifo uvw2 (
.clk(clk),
.reset(reset),
.dat_in(arm_data),
.reset_cs(reset_cs),
.fifo_cs(pcpcnt_cs),
.dat_out(pcpcnt_out)
);
always @(negedge reset or posedge clk)
begin
if (~reset||reset_cs)
begin
time_gnt <= 0;
pcpprd_pwm <= 1'b0;
end
else
begin
time_gnt <= time_gnt + 1'b1;
if (time_gnt == pcpprd_out)
begin
time_gnt <= 0;
pcpprd_pwm <= ~pcpprd_pwm;
end
end
end
always @(negedge reset or posedge pcpprd_pwm)
begin
if (~reset||reset_cs)
begin
time_knt <= 0;
pwmout <= 1'b1;
pwmdir <= 1'b1;
end
else
begin
time_knt <= time_knt + 1'b1;
if (time_knt == pcpcnt_out)
begin
time_knt <= 0;
pwmout <= ~pwmout;
pwmdir <= ~pwmdir;
end
end
end
endmodule
打赏帖 | |
---|---|
【OZONE】使用方法总结被打赏20分 | |
【S32K314】芯片启动流程分析被打赏20分 | |
【LP-MSPM0L1306】适配 RT-Thread Nano被打赏20分 | |
今天的咸鱼也是曾经鱼跃龙门的天纵之才,中流击水,浪遏飞舟,粪土当年万户侯,数风流人物,还看今朝,被打赏5分 | |
分享一种检测按键状态的方法被打赏20分 | |
周末总结一下,STM32C0系列的开发经验被打赏50分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下定时器配置被打赏20分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下PWM配置被打赏20分 | |
【Cortex-M】Systick Timer使用被打赏10分 | |
分享汽车防盗系统的组成与分类(一)被打赏5分 |