ARM7 and SpatanIII intercommunication

Started by Tawit August 2, 2006
Hi!! everyone i am a new member of this group,may i have some suggestion.
My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of my
Robot(future project),Anyone can give me some suggeustion? or some example
code (C code,Keil).

Best regard,

An Engineer's Guide to the LPC2100 Series

Tawit wrote:
> Hi!! everyone i am a new member of this group,may i have some suggestion.
> My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of my
> Robot(future project),Anyone can give me some suggeustion? or some example
> code (C code,Keil).

How much data bandwidth do you need?

Simplest method is to communicate with SPI, its very simple
to implement in VHDL.

You just have to figure out the limitations of the LPC
SPI interface, eg. can it send arbitrary length data
(unlikely), or is it blocked into 8-bit chunks (likely).
Then write an N-bit SPI word that the Spartan interprets,
eg. 1-bit for whether the transaction is to read or write
one of your FPGA registers, another few bytes for the
address of the register, and then the write data, or
clocks to clock out the read data.

for example:
1-bit read/write indicator
7-bit address
8-bit data

is a 16-bit SPI transaction. Make the address and data
bus as wide as you like, and you just have to send more
SPI bytes for each transaction (i.e., the LPC asserts
a digital output that is the Spartan chip-select, and
then fires off multiple SPI bytes and deasserts chip-select).

If you need more bandwidth, you can use a device with
an external bus and create a parallel interface to the
FPGA.

The nice thing about the SPI interface, is you can
probably wire up an LPC eval kit to a Spartan eval
kit without any problems.

Cheers
Dave
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tawit wrote:
> Hi!! everyone i am a new member of this group,may i have some suggestion.
> My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of my
> Robot(future project),Anyone can give me some suggeustion? or some example
> code (C code,Keil).

I have no experience connecting an FPGA to the LPC, but I do have some
ideas.

The LPC2138 does not have an external data bus, so you can make up
your own kind of bus.

I think it all depends on what you want to do exactly.
Do you need a high throughput? Do you need a fast response time?

If the requirements are not too demanding you could use the SPI
port. The SPI1 port has an 8-word FIFO and can run upto 1/2 of the
processor clock. SPI should be quite easy to implement in an FPGA.

Regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE0NEfETD6mlrWxPURAnq1AJ9V9K+g786erZJzg+reBfSBp55MMACgohJc
E9E25AKwaf7xAM3QrXfuSZE=LhXx
-----END PGP SIGNATURE-----
--- In l..., Tawit wrote:
>
> Hi!! everyone i am a new member of this group,may i have some
suggestion.
> My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control
of my
> Robot(future project),Anyone can give me some suggeustion? or some
example
> code (C code,Keil).
>
> Best regard,
>
This depends very much on what you are planning to do with it.
I am using the LPC 2114 together with a XILINX XC3S200 (200 kgate equ)
and communicating with it over an 8 bit "bus" made up by P1.24 - P1.31,
some other port pins for a 6 bit address bus and some handshake signals.
I use the parallel approach because I configure the FPGA from the
microprocessor. I also thought that this would be faster until I
discovered how low the toggling rate is on some variants of the
LPC2xxx's. The configuration code is held in a cheap 1 Mbit SPI FLASH
so I can download the configuration code from PC when I make changes.
On start up the microprocessor configures the FPGA. It all takes less
than 200 mSec. When configured I use the same 8 bit bus for accessing
the FPGA. This all works very well.
I you plan to use ready made evaluation boards it will probably depend
on what you are using. If you plan to do your own design I can only
advise you to read the datasheets *very* carefully.
The free XILINX ISE WebPack is a good design package and is not cripled
in any way, except for that it does not support the VERY VERY large
devices.

/Kell
look like SPI is easy than make my own databus?

what i want from FPGA is alot of PWM putout , Decode for Quarture encoder
and maybe more advace in the future (This is my first project on both FPGA
and ARM)

Thank you very much for suggestion

On 8/2/06, Bertrik Sikken wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Tawit wrote:
> >
> >
> > Hi!! everyone i am a new member of this group,may i have some
> suggestion.
> > My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of
> my
> > Robot(future project),Anyone can give me some suggeustion? or some
> example
> > code (C code,Keil).
>
> I have no experience connecting an FPGA to the LPC, but I do have some
> ideas.
>
> The LPC2138 does not have an external data bus, so you can make up
> your own kind of bus.
>
> I think it all depends on what you want to do exactly.
> Do you need a high throughput? Do you need a fast response time?
>
> If the requirements are not too demanding you could use the SPI
> port. The SPI1 port has an 8-word FIFO and can run upto 1/2 of the
> processor clock. SPI should be quite easy to implement in an FPGA.
>
> Regards,
> Bertrik
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFE0NEfETD6mlrWxPURAnq1AJ9V9K+g786erZJzg+reBfSBp55MMACgohJc
> E9E25AKwaf7xAM3QrXfuSZE> =LhXx
> -----END PGP SIGNATURE-----
>
>
>
I you want to combine ARM7 and an FPGA then this may be something for you:
http://www.actel.com/products/ARM7/

I never used it myself, but I'd love to have the opportunity to play
with this sometime.

Richard.
Tawit wrote:
>
> Hi!! everyone i am a new member of this group,may i have some suggestion.
> My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of my
> Robot(future project),Anyone can give me some suggeustion? or some example
> code (C code,Keil).
>
> Best regard,
>
>
>
>
Oh!! how interresting is it, Richard.

but it look too expendsive for me (" ;)

Kell, i have ARM7 evaluation board and Xlinx evaluation board ,i plan to
connect it together for prototype.
On 8/3/06, Richard Duits wrote:
>
> I you want to combine ARM7 and an FPGA then this may be something for
> you:
> http://www.actel.com/products/ARM7/
>
> I never used it myself, but I'd love to have the opportunity to play
> with this sometime.
>
> Richard.
> Tawit wrote:
> >
> > Hi!! everyone i am a new member of this group,may i have some
> suggestion.
> > My idea is connect ARM7(LPC2138) to Xilinx Spatan3 for main control of
> my
> > Robot(future project),Anyone can give me some suggeustion? or some
> example
> > code (C code,Keil).
> >
> > Best regard,
> >
> >
> >
> >
>
Tawit wrote:
> Oh!! how interresting is it, Richard.
>
> but it look too expendsive for me (" ;)
>
> Kell, i have ARM7 evaluation board and Xlinx evaluation board ,i plan to
> connect it together for prototype.

There's always this ARM+FPGA+Linux board from Technologic too:

http://www.embeddedarm.com/epc/ts7300-spec-h.htm

I just haven't come up with an excuse (or cash) to get one yet :)

The Altera Quartus II web edition should let you use
this for programming the FPGA.

However, since you are planning on connecting two eval boards
you already have, just go the SPI route, it'll give you a
good start.

Cheers
Dave