正在开发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
我要赚赏金打赏帖 |
|
|---|---|
| 基于MCP23S17的输入输出功能模块控制被打赏¥20元 | |
| 【S32K3XX】SPD 软件包使用Link文件修改被打赏¥22元 | |
| Switch-Case局部变量定义问题被打赏¥23元 | |
| 基于米尔TIAM62L开发板的串口通信及应用被打赏¥20元 | |
| PCF8574功能模块及其使用被打赏¥20元 | |
| 传感器LSM6DSO及LIS3MDL的功能检测被打赏¥18元 | |
| LPS25HB气压传感器及其检测被打赏¥18元 | |
| HTS221温湿度传感器及其检测被打赏¥18元 | |
| 【S32K3XX】HSE FW 版本更新被打赏¥21元 | |
| 基于ArduinoUNO开发板的AT24C02读写测试被打赏¥16元 | |
我要赚赏金
