cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
787 Views
Registered: ‎03-17-2018

I have an issue and I could not find the error can you please help me

 

INFO:HDLCompiler:1061 - Parsing VHDL file "M:/tutorial4/mytimer.vhd" into library work
ERROR:HDLCompiler:806 - "M:/tutorial4/mytimer.vhd" Line 60: Syntax error near "PROCESS".
ERROR:ProjectMgmt - 1 error(s) found while parsing design hierarchy.

entity mytimer is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
short : out STD_LOGIC;
long : out STD_LOGIC);
end mytimer;

architecture Behavioral of mytimer is
begin
process(clk,reset)
variable longtemp : integer range 0 to 2500000;
variable shorttemp : integer range 0 to 1250000;
begin
if reset='1' then
short<='0';
long<='0';
longtemp<='0';
shorttemp<='0';
else if(clk' event and clk='1') then
if longtemp = 2500000 then
long<= 1;
if shorttemp = 1250000 then
short<= 1;
if longtemp /=2500000 and shorttemp /=125000 then
longtemp<=longtemp+1;
sorttemp<=sorttemp+1;
end if;
end if;
END PROCESS;
end architecture;

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
1,018 Views
Registered: ‎09-15-2016

Re: timer1

Jump to solution

Hi almahame@msu.edu,

 

Glancing the above RTL there are many things which you can try modifying (some of them I must have missed). Variables like longtemp assign 0 with :=, the sorttemp is not declared which I think should be shorttemp, need to have 'end if;' declared for every if statement used and I see short and other std_logic type would not match the 1 (which is integer). I believe this is only for simulation purpose.

 

Regards,
Prathik
-----------------------------------------------------------------------------------------------
Please mark the appropriate post as an answer "Accept as solution" in case it helps to resolve your query.
Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------

View solution in original post

2 Replies
Highlighted
Moderator
Moderator
1,019 Views
Registered: ‎09-15-2016

Re: timer1

Jump to solution

Hi almahame@msu.edu,

 

Glancing the above RTL there are many things which you can try modifying (some of them I must have missed). Variables like longtemp assign 0 with :=, the sorttemp is not declared which I think should be shorttemp, need to have 'end if;' declared for every if statement used and I see short and other std_logic type would not match the 1 (which is integer). I believe this is only for simulation purpose.

 

Regards,
Prathik
-----------------------------------------------------------------------------------------------
Please mark the appropriate post as an answer "Accept as solution" in case it helps to resolve your query.
Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------

View solution in original post

Highlighted
746 Views
Registered: ‎03-17-2018

Re: timer1

Jump to solution

Thank you for your help. 

0 Kudos