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.

SCHEMATICS AND VHDL....!!GUIDANCE NEEDED...

Status
Not open for further replies.

Mirzaaur

Member level 2
Joined
Aug 5, 2005
Messages
50
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,690
dear all,

I tried to convert this schamtics into VHDL code. with schmatics simulation it works fine. but VHDL code it gives wrong result in simulation.

can any one check if schematics and vhdl code are equilent ???

thanks in advance,

mirza


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity a is
Port (
siu_br : in STD_LOGIC;
siu_bi : in STD_LOGIC;
dcs_br : in STD_LOGIC;
dcs_bi : in STD_LOGIC;
clk : in STD_LOGIC;
rst : in STD_LOGIC;
siu_bg : out STD_LOGIC;
dcs_bg : out STD_LOGIC);
end a;

architecture A_A of a is
signal sr_d : std_logic;
signal sr_and_diinv : std_logic;
signal dr_and_siinv : std_logic;
signal sg_r : std_logic;
signal dg_r : std_logic;
begin
siu_bg <= sg_r;
dcs_bg <= dg_r;

process(siu_br,dcs_br)
begin
if dcs_br='0' then
sr_d <= siu_br;
end if;
end process;

sr_and_diinv <= sr_d and (not dcs_bi);
process(clk,rst)
begin
if rst='1' then
sg_r <= '0';
elsif clk' event and clk='1' then
if siu_bi='1' or dg_r='0' then
sg_r <= sr_and_diinv;
end if;
end if;
end process;


dr_and_siinv <= dcs_br and (not siu_bi);
process(clk,rst)
begin
if rst='1' then
dg_r <= '0';
elsif clk' event and clk='1' then
if dcs_bi='1' or sg_r='0' then
dg_r <= dr_and_siinv;
end if;
end if;
end process;

end A_A;


[/img]
 

IF you could give the testbench or the simulated waveforms for the schematic it would help in solving this query.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top