Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15323 Discussions

Help with errors in what should be a simple counter.

jcl2000
Beginner
174 Views

I'm trying to make a simple counter that basically counts up from 0x00 to 0x10 and I am getting the errors 

Warning (10492): VHDL Process Statement warning at AngleCounter.vhd(17): signal "AngleCode" is read inside the Process Statement but isn't in the Process Statement's sensitivity list

Error (10818): Can't infer register for "anglecodeunsign[0]" at AngleCounter.vhd(19) because it does not hold its value outside the clock edge

Error (10822): HDL error at AngleCounter.vhd(22): couldn't implement registers for assignments on this clock edge

The code is as follows:

 

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity AngleCounter is
port(resetn,clock,enable,sresetn: in std_logic;
AngleCode: buffer std_logic_vector(7 downto 0);
Angle: buffer std_logic_vector(7 downto 0));

end entity AngleCounter;

architecture behavior of AngleCounter is
signal anglecodeunsign: unsigned(7 downto 0);
begin
process(resetn,clock,enable,sresetn)
begin
anglecodeunsign <= unsigned(AngleCode);
if(enable = '1') then
if(resetn = '0') then
anglecodeunsign <= "00000000";

elsif rising_edge(clock) then
if(sresetn = '0') then
anglecodeunsign <= "00000000";
elsif (sresetn = '1') then anglecodeunsign <= anglecodeunsign +"00000001";
if(anglecodeunsign > "00010000") then
anglecodeunsign <= "00000000";
end if;
end if;
end if;
end if;
end process;
AngleCode <= std_logic_vector(anglecodeunsign);

with AngleCode select
Angle <= "10010000" when "00000000", --0
"10000110" when "00000001",--1
"10000010" when "00000010",--2
"01111001" when "00000011",--3
"01110101" when "00000100",--4
"01110001" when "00000101",--5
"01100111" when "00000110",--6
"01100100" when "00000111",--7
"01100000" when "00001000",--8
"01010101" when "00001001",--9
"01010001" when "00001010",--A
"01000110" when "00001011",--B
"01000001" when "00001100",--C
"00110101" when "00001101",--D
"00101000" when "00001110",--E
"00100000" when "00001111",--F
"00000000" when "00010000",--10
"00000000" when others;
end architecture behavior;


If anyone could help me solve this I would be very grateful. 

 

0 Kudos
3 Replies
sstrell
Honored Contributor III
165 Views

See my response in your other post.

Nurina
Employee
145 Views

Hi,


Did the above reply solve your problem? Let me know if you have any more queries.


Regards,

Nurina


Nurina
Employee
124 Views

Hi,

We did not receive any response to the previous reply that I have provided, thus I will put this case to close pending. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.

Regards,
Nurina

PS: If you find any comment from the community or Intel Support to be helpful, feel free to give Kudos.

Reply