Can protocol to FPGA

OP (Company: Université) #4412135
Rate this post
useful
not useful
Hi,

In my project , I need to adapt an FPGA card to read data from 4 CAN 
network at least. Beacuse i didn't found an FPGA including more than 2 
CAN controllers. i ´m wondering if there is a solution for this. I read 
that is possible to emumate CAN bus with RX TX I/O of the fpga with an 
IP core but i dont't find more information of how it is possible.
Also , i don't know if we can use the protocole CAN only with the GPIO 
of the fpga.

Can any of you guys suggest how to perform this ?


thx
Moderator (Company: Titel) #4412588
Rate this post
useful
not useful
Ba E. wrote:
> I found an FPGA including two CAN's here
Indeed you did find a BOARD with a FPGA and "2 CAN Transceiver" on it. 
There's is NO (in numbers 0) CAN controller inside the FPGA. You 
must implement 2 CAN controllers and connect them to the transceivers.

And when that is done you simply wire two additional transceivers to the 
FPGA (in the same manner as the two on the board). Finally you implement 
two additional CAN cores in the FPGA. Then you're done...

So the very first step is to implement 1 core in the FPGA and connect it 
to 1 of those transceivers.
OP (Company: Université) #4412769
Rate this post
useful
not useful
Ah okey , I start to understand a little bit what you sayin guys. Really 
thank you.

So I restate my probleme ( I attached a diagram to be clearer ): i want 
my FPGA have 2 inputs of data ( that transmitted in protocole CAN) and 2 
outputs of data ( that will be transmitted ine protocole CAN ) I thought 
that it possible to emulate a bus CAN without adding anything to the 
FPGA only using GPIO's and you said it's not possible. What about the RX 
TX of fpga solution to emulate a CAN Bus ( without adding external 
coposants) ?

Also ,  I don't know if it's possible to use only internal ressources of 
the fpga to emulate can bus ?
Attached files:
Moderator (Company: Titel) #4413124
Rate this post
useful
not useful
Ba E. wrote:
> i want my FPGA have 2 inputs of data ( that transmitted in protocole
> CAN) and 2 outputs of data ( that will be transmitted ine protocole CAN )
Why do you split that up? CAN is a Bidirectional-Multi-Master-Bus.

> What about the RX  TX of fpga solution to emulate a CAN Bus
Each of the FPGA cores will have a TX output and a RX input. The CAN 
transceiver will make CANH and CANL out of those signals. The CAN bus 
itself is based on CANH and CANL as the physical layer. The IO ports of 
an FPGA is not able to generate those CAN bus signals without additional 
hardware reliably. That starts with the IDLE level which is differential 
0V. Simply startt reading about signal levels on a CAN bus and compare 
them with the capabilities of the IO pin drivers.

> Also , I don't know if it's possible to use only internal ressources of
> the fpga to emulate can bus ?
Do you want to have 4 real physical CAN busses to connect real physical 
devices or do you only want to "emulate" or "simulate" something?

> if it's possible to use only internal ressources of the fpga
No. To get a real CAN Bus with CANH and CANL you MUST use a transceiver. 
Why the heck don'T you simply connect such two transceivers for small 
money to the FPGA. Thats only 4 wires plus supply in total...

-gb- wrote:
> got an Spartan3 FPGA Baord with CAN transciever. It is a Celoxica RC10.
That borad only has 1 CAN transceiver. The DBC5CEFA7 usesd by Ba Ehb has 
2 transceivers. But he wants 4. So what to do?

Frank wrote:
> if you need 4 independent CAN-Bus lines, then the schematic should look
> like in the attached picture
I added to the schematic some signal names for clarity.
Attached files:
OP (Company: Université) #4413377
Rate this post
useful
not useful
Thank you all for your responses. It's very helpful and it clarified 
things to me.

So , I understand that i have to use transceivers like Lothar Miller & 
Frank said. in the diagram the transceiver is connected to the fpga 
using RX/Tx ports of the Fpga. Now my question is : Is an FPGA have a 
limited numer of RX/TX ports ? ( because if I need 4 Can busses then i 
will use 4 transcievers that will have to be connected to 4 Rx/tx ports 
)

There is an FPGA with like 10 Rx/Tx ports to connect 10 transceivers ? ( 
in reality i need 10 Can busses , i just said 4 to understand )

The Rx/Tx ports of the Fpga are the RS232 port ?

Can the transcievers just be connected to the fpga using GPIO's ?


>Why do you split that up? CAN is a Bidirectional-Multi-Master-Bus.
I don't want t split I just wasn't clear.
Guest #4413398
Rate this post
useful
not useful
Ba E. wrote:
> Can the transcievers just be connected to the fpga using GPIO's ?

Yes of course!
You have to connect the internal IP Core ports to physical GPIOs of your 
FPGA with your preferred description language (VHDL, Verilog, ...).

There are no special physical Rx/Tx ports you have to usw.
Moderator (Company: Titel) #4413586
Rate this post
useful
not useful
Ba E. wrote:
> The Rx/Tx ports of the Fpga are the RS232 port ?
No. As already stated the RX and TX are signals on simple IO pins of the 
FPGA. And there is no kind of RS232 port involved in the whole system at 
all. That mentioned RX and TX signals are the receive input and the 
transmit output of the CAN IP core inside the FPGA. Every (or at least 
nearly every) IO pin of the FPGA could be RX or TX...

> There is an FPGA with like 10 Rx/Tx ports to connect 10 transceivers ? (
> in reality i need 10 Can busses , i just said 4 to understand )
As I already said: implement ONE (in numbers 1) CAN interface. Then have 
a look how much resources it needs in the FPGA. Then have a look for a 
FPGA that provides at least 10 times that resources (plus some more or 
less demanding logic you will need additionally to serve those 10 CAN IP 
cores).

But first start with 1 CAN interface. Thats the very first step.


BTW: why in all the world do you need a node with 10 CAN interfaces in 1 
design?
Guest #4414433
Rate this post
useful
not useful
Hello Everyone!

We are on stage of developing CAN controller, could anyone help us for 
any suggestions on how we can achieved this? Like useful sites, or 
existing VHDL codes so that we can have some basis for our design. Also, 
we only have FPGA as our hardware for implementation.
We appreciate your responses.

Thank you very much!

and regards!

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now