【发布时间】:2016-04-29 02:05:32
【问题描述】:
此代码仅适用于 4x4 元素。 没有合成。 即使是很小的初始部分也没有模拟
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.numeric_std.ALL;
use work.mypackage.ALL;
entity histo_two is
port( H_c: out hist_array);
end histo_two;
architecture Behavioral of histo_two is
constant my_hist:hist_array:=((0,1,2,3), (0, 2, 2, 0), (3, 3, 1, 3), (2, 3, 0, 2));
begin
p0: process
variable h: h_vector:= (0,0,0,0);
variable gp: integer;
variable temp: integer;
variable H_c: h_vector;
variable A: integer;
variable T: h_vector;
for i in my_hist'left(1) to my_hist'right(1) loop
for j in my_hist'left(2) to my_hist'right(2) loop
gp := my_hist(i,j);
temp:= h(gp) + 1;
h(gp) := temp;
end loop;
end loop;
-- Form the cumulative image histogram Hc:
H_c(0) := H(0);
for p in h'left(1)+1 to h'right(1) loop
A := H_c(p-1) + H(p);
H_c(p) := A;
end loop;
end process;
end behavioral;
这些是我的警告。这是我的大模块的一部分。
输出应为 H: 4,2,5,5(这是内部信号值)和 H_c:(4,6,11,16)
No sensitivity list and no wait in the process
WARNING:Xst:1306 - Output <H_c<1>> is never assigned.
WARNING:Xst:1306 - Output <H_c<2>> is never assigned.
WARNING:Xst:1306 - Output <H_c<3>> is never assigned.
WARNING:Xst:1306 - Output <H_c<0>> is never assigned.
打包文件
library IEEE;
use IEEE.STD_LOGIC_1164.all;
包 包 mypackage 是
type hist_array is array (0 to 3,0 to 3) of integer;
type h_vector is array (0 to 3) of integer;
end mypackage;
谢谢!
【问题讨论】:
-
你的代码示例没有分析。包声明中有一个额外的保留字
Package,并且缺少流程声明开始。此外,正如您在赛灵思综合技术警告中所述,该过程没有等待声明,也没有敏感度列表。在没有输入端口的情况下,敏感性列表没有任何内容,因此需要等待声明。您也永远不会为变量分配警告说明。您有具体问题吗? -
请缩进并格式化您的代码,以便我们阅读。