This code is simply for 4x4 elements. No Synthesizing. Even a small initial portion is not simulating
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;
These are my waings. This is a part of my big module.
Output should be H: 4,2,5,5(this is inteal signal value) and 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.
Package File
library IEEE;
use IEEE.STD_LOGIC_1164.all;
Package package mypackage is
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;
Thank you!
