首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

to:ston133 请指点程序中的问题

to:ston133 请指点程序中的问题






[求助]:劳请指点程序中的问题
请教:节选相关部分如下:
问题是:编译无法通过。提示:Mapping a total of 103 equations into 8 function blocks........................................................ERROR:Cpld:892 - Cannot place signal count_16<0>. Consider reducing the
collapsing input limit or the product term limit to prevent the fitter from
creating high input and/or high product term functions.
See the fitter report for details.
ERROR:Cpld:868 - Cannot fit the design into any of the specified devices with
the selected implementation options.
ERROR: Fit failed
Reason:
Process "Fit" did not complete.
如果process1中去掉reghz <= databus(15 downto 0);动态设置reghz值,实现固定分频,成功。如果process1不动,而process2中if( count_16 = reghz )THEN 改为if( count_16 = 12500 )THEN 与固定值比较编译也能通过。

process ( rst,we,enhz ) --复位信号,写信号,cpu控制频率的片选信号
begin
if ( rst = RST_ACTIVE ) then
reghz <= X"30d4"; ----------复位赋初值
elsif ( we 'event and we = HIGH_ACTIVE ) then
if( enhz = LOW_ACTIVE ) then
reghz <= databus(15 downto 0);----动态改变分频值
end if;
end if;
end process;

process(clk)-----40M晶振时钟count_16为16位计数器,st_ad为分频输出信号
begin
if( clk'EVENT AND clk='1' )THEN
if( count_16 = reghz )THEN
count_16 <= X"0000" ;
else
count_16 <= count_16+'1';
end if;

if( count_16 < 6250 )then
st_ad <= '1';
else
st_ad <= '0';
end if;
end if ;
end process;
我对vhdl语言不是很熟悉,我用verilog仿照你的思路写了一下,这个思路是可以实现的;

‘X’是不能综合的,换种定义格式
美梦成真-->噩梦降临!
返回列表