正在开发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
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 | |
【我踩过的那些坑】DRC使用位置错误导致的问题被打赏100分 | |
我踩过的那些坑之混合OTL功放与落地音箱被打赏50分 | |
汽车电子中巡航控制系统的使用被打赏10分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏100分 |