Quartus18.x issue3: if elsif errant
Hi, reported and disappeared issue was back again:
Quartus Prime Version 18.1.0 Build 625 09/12/2018 SJ Lite Edition
Linux Mint 17.3
Sony vaio SVS1511C5E
Target 10M04SCE144A7G
first issue link:
https://forums.intel.com/s/question/0D50P00004EfVuGSAV/is-if-elsif-else-in-this-case-errant
Compile code where snip is, resulted in wrong synthesis, signal was forever filled with wrong value "00" on two code part: Send REMOTE MAC, Send Remote IP.
Changing if elsif to case on MAC part removed issue to IPAddress too.
Changing from case to if elsif was deterministic :
if elsif elsif : fault .
case: working.
clean project don't affect behavior, so after cleaning same scenario.
Compile on Quartus II version 15.0 resulted in good synthesis on both version.
ANd now nightmare again.... Returning to quartus II version 18.1 upgraded again project cleaned up and wizz of havoc... generated file where ok.....
During debug some more issue appeared somewhere on other working IP core, clean project removed, final version now is working...
Saved all revision but again not able to replicate, I am suspecting some pattern sensitivity to large commented code block and when source file exceed 1K lines.
Difference was commenting if elsif or case as is here, case version .
Actually is build as shown with case commented out.
Test in progress to isolate fault, need full project, cannot replicate on small chunk.
-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-- aaaaaaaaaaaaaaaaaa *** IP MAC SUB state sender ******* aaaaaaaaaaaaaaa
-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-- Send destination MAC address (Remote), return to sm_pktsend_gostate Signal
-- when 11x"08" =>
-- Packet procedure
when pktsend_remotemac =>
if Local_pktgo_nxtstate = '1' then
Local_CRC_RUN <= '1'; -- start crc process
if SendPacketType = IPPKT_ARPReq then
Local_pkt_data<= 8x"ff";
-- else
-- case counter is
elsif counter = 6 then
-- when 6 =>
Local_pkt_data<= RemoteMAC(47 downto 40);
elsif counter = 5 then
-- when 5 =>
Local_pkt_data<= RemoteMAC(39 downto 32);
elsif counter = 4 then
-- when 4 =>
Local_pkt_data<= RemoteMAC(31 downto 24);
elsif counter = 3 then
-- when 3 =>
Local_pkt_data<= RemoteMAC(23 downto 16);
elsif counter = 2 then
-- when 2 =>
Local_pkt_data<= RemoteMAC(15 downto 8);
elsif counter = 1 then
-- when 1 =>
Local_pkt_data<= RemoteMAC(7 downto 0);
-- when others =>
-- end case;
end if;
counter := counter-1;
-- end if;
end if;
if counter = 0 then
-- counter := 6; -- num mac bytes
sm_pktsend_state <= sm_pktsend_gostate; -- pktsend_hostmac; return to caller
end if;
-- Send Source MAC address, return to sm_pktsend_gostate Signal
when pktsend_hostmac =>
if Local_pktgo_nxtstate = '1' then
if counter = 6 then
Local_pkt_data<= HostMAC(47 downto 40);
elsif counter = 5 then
Local_pkt_data<= HostMAC(39 downto 32);
elsif counter = 4 then
Local_pkt_data<= HostMAC(31 downto 24);
elsif counter = 3 then
Local_pkt_data<= HostMAC(23 downto 16);
elsif counter = 2 then
Local_pkt_data<= HostMAC(15 downto 8);
elsif counter = 1 then
Local_pkt_data<= HostMAC(7 downto 0);
end if;
counter := counter-1;
end if;
if counter = 0 then
-- counter := 6; -- num mac bytes
sm_pktsend_state <= sm_pktsend_gostate; -- pktsend_ethernethdr; return to caller
end if;
-- Send HOST IP address, return to sm_pktsend_gostate Signal
when pktsend_hostip =>
if Local_pktgo_nxtstate = '1' then
if counter = 4 then
Local_pkt_data<= HostIP(31 downto 24);
elsif counter = 3 then
Local_pkt_data<= HostIP(23 downto 16);
elsif counter = 2 then
Local_pkt_data<= HostIP(15 downto 8);
elsif counter = 1 then
Local_pkt_data<= HostIP(7 downto 0);
end if;
counter := counter-1;
end if;
if counter = 0 then
sm_pktsend_state <= sm_pktsend_gostate; -- pktsend_ethernethdr; return to caller
end if;
-- Send HOST IP address, return to sm_pktsend_gostate Signal
when pktsend_remoteip =>
if Local_pktgo_nxtstate = '1' then
if counter = 4 then
Local_pkt_data<= RemoteIP(31 downto 24);
elsif counter = 3 then
Local_pkt_data<= RemoteIP(23 downto 16);
elsif counter = 2 then
Local_pkt_data<= RemoteIP(15 downto 8);
elsif counter = 1 then
Local_pkt_data<= RemoteIP(7 downto 0);
end if;
counter := counter-1;
end if;
if counter = 0 then
sm_pktsend_state <= sm_pktsend_gostate; -- pktsend_ethernethdr; return to caller
end if;
end case;
end if; -- clock edge
end if; -- reset
end process;Here saleae LA decoded Ethernet frame:
**** If ELSIF ELSIF
Wrong MAC address set to zero
Wrong IP address set to zero.
**** CASE selector on 18.1 ****
after 15.0 successful build code was reverted as shown on snippet and worked till now never touched.
This issue is driving me crazy debug what has no issue on VHDL but hardware related to wrong coding of tool.
first report on another part of code now rewritten: