Altera_Forum
Honored Contributor
15 years agoUP2 board CPLD misbehaving
Hi everyone,
I'm currently using the UP2 dev board along with the free edition of Quartus II web edition software. This has limited me to using the CLPD device (EMP7128SLC84-7) though my code will likely be moved onto the FLEX FPGA at some point. I'm having trouble with the following code which i retireved from this website: (0 post count, can't post links yet)entity c1hz is
port( clk:in bit; clkout:out bit);
end c1hz;
architecture behavior of c1hz is
begin
process(clk)
variable cnt : integer range 0 to 12587500;
begin
if(clk'event and clk='1') then
if(cnt=12587500)then
cnt:=0;
clkout<='1';
else
cnt := cnt+1;
clkout<='0';
end if;
end if;
end process;
end behavior;
I specify using the pin planner that "clk" is pin 83 (the crystal input), and the "clkout" is pin 60 (b of digit 1). these are the only pins specified by me. The problem is that when the code runs, b does not flash at all. it appears that the output is at c of digit 1, and a of digit 1 also flashes at twice the rate of c. I'm unable to figure out why this is happening. I do get 3 warnings after a compile: --- Quote Start --- Warning: Using design file c1hz.vhd, which is not specified as a design file for the currnet project, but contains definitions for 2 design units and 1 entities in project Warning: Timing Analysis does not support the analysis of latches as synchronous elements for the currently selected device family Warning: Found pins functioning as undefined clocks and/or memory enables --- Quote End --- Any help in solving this problem would be appreaciated, Thanks for your time, zammy