Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
New Bitmap Image.JPG

syntax correct
but following error in synthesis
Synthesizing Unit <SHIFTREG>.
Related source file is "C:/Documents and Settings/chaitu/Desktop/7495beg/7495behavior/SHIFTREG.vhd".
ERROR:Xst:1534 - Sequential logic for node <q> appears to be controlled by multiple clocks.
ERROR:Xst:739 - Failed to synthesize logic for signal <q<0>>.
ERROR:Xst:1431 - Failed to synthesize unit <SHIFTREG>.
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top