- 杂志
 搜 索: 
 论坛 » FPGA系统设计 » ispLEVER7.0 下map的问题
广告招商
版主: Hongjun , sunshine0606
 发表新贴 
 发表回复 
 ispLEVER7.0 下map的问题  发表于 2008-03-19 16:47:38 [您是本帖的第351位阅读者]     [1楼] 
呢称:wangluping
加我为好友
正在开发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

 
共1条 1/1 1   
   快速回复主题
  用户名 : 匿名不能发帖!请先 [ 登陆 ]
  标 题:
  内 容 :
 
EEPW元器件搜索  强力提供
关于我们 | 广告服务 | 企业会员服务 | 新手上路 | 联系我们 | 友情链接
《电子产品世界》杂志社 版权所有 北京东晓国际技术信息咨询有限公司
Copyright ©2002 ELECTRONIC ENGINEERING & PRODUCT WORLD. All rights reserved.
京ICP备060382号