[SOLVED] HDL Synthesis failed but got correct simulation and no syntax error

Status
Not open for further replies.

chaitanya.531

Member level 1
Joined
Feb 27, 2012
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
hi folks
i getting hdl synthesis error but i get expected results
xilinx version 10.1 ise simulator
i want to write vhdl behavioral code for 7495 shift register with operation


syntax correct
but following error in synthesis
and by code is
Code:
--------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity SHIFTREG is
port (
a,b,c,d: in STD_LOGIC; 
si : in STD_LOGIC; 
m : in STD_LOGIC; 
clk0 :in STD_LOGIC; 
clk1 :in STD_LOGIC; 
q :inout STD_LOGIC_VECTOR (3 downto 0)
);

end SHIFTREG;

architecture Behavioral of SHIFTREG is

begin
process(clk0,clk1)
begin
if m='0' then
		if(clk0'event and clk0='0') then
			q(0)<= si;
			q(1)<=q(0);
			q(2)<=q(1);
			q(3)<=q(2);
		
		end if;
elsif m='1' then
		if(clk1'event and clk1='0') then
		    q(0)<=a;
			 q(1)<=b;
			 q(2)<=c;
			 q(3)<=d;
		
			end if;
end if;

end process;

end Behavioral;

thank u
 

The error is correct - you cannot have multiple clocks on a single register inside an FPGA.
Simulation doesnt care - you can have as many clocks as you want - it just makes sure the code is legal and then simulated exactly the behaviour you wrote.

Moral - use just 1 clock.
 

I wonder how the simulation model worked, when multi driven it should show 'x'
 

I wonder how the simulation model worked, when multi driven it should show 'x'

The Q outputs are not driven from multiple sources - they are assigned in a single process.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…