Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Interface on CPU data bus

 
Thread Tools Search this Thread
Old 10-28-2004, 09:48 AM   #1
Default Interface on CPU data bus


Hi group,

i have a problem using a CPLD as an interface between a cpu
and a CAN controller. It is my first CPLD project so maybe
it is a common newbee problem.
The CPLD (see VHDL code at the bottom) should
- get the information from the data bus when
- nCS3 has a falling edge
- at addr 100 to 111
- write the information onto the data bus when
- nCS3 is low
- at addr 000 to 011

Tool: Xilinx ISE Version 6.1.03i
OS: Win2k

The syntesizer report says under HDL Synthesis:

WARNING:Xst:647 - Input <addr<1:0>> is never used.
WARNING:Xst:647 - Input <RS_Ready> is never used.
WARNING:Xst:646 - Signal <data_i<23:18>> is assigned but never used.
WARNING:Xst:646 - Signal <data_i<16>> is assigned but never used.
WARNING:Xst:646 - Signal <data_out> is assigned but never used.
Found 1-bit register for signal <can_stdby>.
Found 24-bit tristate buffer for signal <data>.
Summary:
inferred 1 D-type flip-flop(s).
inferred 24 Tristate(s).
Unit <can_interface> synthesized.


A look at the RTL Schematic shows that the second process was
ignored.

What went wrong?
Thanks in advance.

Norbert



library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity can_interface is
Port (
-- -- -- -- -- -- -- -- pins that are connected to the sja1000
can_stdby: out std_logic := '0';
-- -- -- -- -- -- -- -- pins that are connected to the cpu
data : inout std_logic_vector(23 downto 0);
addr : in std_logic_vector(2 downto 0);
nCS3 : in std_logic;
RS_Ready : in std_logic
);
end can_interface;

architecture Behavioral of can_interface is

signal data_in: std_logic_vector(15 downto 0) := (others => '0');
signal data_i : std_logic_vector(23 downto 0);

-- register for the data to be send to the CPU data bus
signal data_out: std_logic_vector(15 downto 0) := (others => '0');

begin

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- CPLD read the CPU data bus on addr 100 until 111
P_R_Data: process( nCS3, addr(2), data_i)
begin
if nCS3='0' and nCS3'event and addr(2) = '1' then
data_in <= data_i(15 downto 0);
can_stdby <= data_i(17);
end if;
end process P_R_Data;

data_i <= data;
data_out <= data_in;

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- CPLD writes the CPU data bus on addr 000 until 011
P_W_Data: process( nCS3, addr, RS_Ready, data_out)
begin
if nCS3='0' then
if addr(2) = '0' then
case addr(1 downto 0) is
when "00" =>
data(15 downto 0) <= data_out;
data(23) <= RS_Ready;
data <= (others => '0');
when others =>
data <= (others => '0');
end case;
else data <= (others => 'Z');
end if;
else data <= (others => 'Z');
end if;
end process P_W_Data;

end Behavioral;



--
Norbert Hoppe
email addr incorrect - use my surname in lowercase letters instead
of hnews


Norbert Hoppe
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The limitations of MTA as data sharing interface Jyoti Ballabh The Lounge 13 11-11-2009 01:58 PM
I can not ping my ATM interface on Cisco router ozoubi Hardware 2 10-22-2009 03:56 PM
Wonderful data input with web reporting tool freezea Software 0 09-09-2009 05:30 AM
Cisco ASA 5505 not permitting SSH/HTTPS aphex Hardware 1 05-16-2008 12:39 AM
I can not ping my ATM interface on Cisco router ozoubi General Help Related Topics 0 09-23-2007 11:08 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46