mbox series

[v2,0/7] CTU CAN FD core support

Message ID cover.1599168753.git.pisa@cmp.felk.cvut.cz (mailing list archive)
Headers show
Series CTU CAN FD core support | expand

Message

Pavel Pisa Sept. 3, 2020, 9:37 p.m. UTC
From: Pavel Pisa <pisa@cmp.felk.cvut.cz>

CTU CAN FD is an open source soft core written in VHDL.
It originated in 2015 as Ondrej Ille's project at the
Department of Measurement of FEE at CTU.

Integration for Xilinx Zynq and Intel based SoCs is available
as well as support for PCIe integration of the core.

The core sources

  https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core

The controller model and QEMU CAN subsystem extension to CAN FD
has been implemented in frame of bachelor theses of Jan Charvat.
The development branch ctu-canfd in CTU local project repository

  https://gitlab.fel.cvut.cz/canbus/qemu-canbus

More CAN bus related project from Czech Technical University
in Prague, Faculty of Electrical Engineering at

  http://canbus.pages.fel.cvut.cz/

Patches v2 updates:

 - CTU CAN FD IP core emulation tested on x86 host
   with big-endian MIPS MALTA target as well.
   This helped t correct Linux driver to support
   big-endian systems.

 - CTU CAN FD IP core emulation updated to pass CAN frame
   data correctly on big-endian host systems. Big-endian
   host not tested, would required whole QEMU build
   for MIPS MALTA or big-endian POWER and run it nested
   emulation, because I have no access to Linux based big-endian
   system capable for QEMU build.

 - Makefile.objs changes applied to meson.build and Kconfig.

 - The common CAN support update for CAN FD tested and reviewed
   by Vikram Garhwal from Xilinx. They base their CAN FD
   controllers emulation on our work.

 - Vikram Garhwal agrees to help with common QEMU CAN bus
   infrastructure reviews. I add him and myself into maintainers.

 - Corrected SJA1000 dependencies in Kconfig after (probably)
   automated switch to meson build from make build.

Please, let me know if somebody from recipients list does
no longer have interrest in QEMU CAN bus emulation
and I would remove you from recipients list to not load
you by uniteresting content in future.

Jan Charvat (5):
  net/can: Initial host SocketCan support for CAN FD.
  hw/net/can: sja1000 ignore CAN FD frames
  net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
  hw/net/can: CTU CAN FD IP open hardware core emulation.

Pavel Pisa (2):
  hw/net/can: Documentation for CTU CAN FD IP open hardware core
    emulation.
  hw/net/can: Correct Kconfig dependencies after switch to meson build.

 MAINTAINERS                   |   9 +
 docs/can.txt                  | 113 +++-
 hw/net/Kconfig                |  16 +-
 hw/net/can/can_sja1000.c      |  31 +-
 hw/net/can/ctu_can_fd_frame.h | 189 +++++++
 hw/net/can/ctu_can_fd_regs.h  | 971 ++++++++++++++++++++++++++++++++++
 hw/net/can/ctucan_core.c      | 696 ++++++++++++++++++++++++
 hw/net/can/ctucan_core.h      | 127 +++++
 hw/net/can/ctucan_pci.c       | 280 ++++++++++
 hw/net/can/meson.build        |   2 +
 include/net/can_emu.h         |  12 +-
 net/can/can_core.c            |  36 ++
 net/can/can_socketcan.c       |  47 +-
 13 files changed, 2505 insertions(+), 24 deletions(-)
 create mode 100644 hw/net/can/ctu_can_fd_frame.h
 create mode 100644 hw/net/can/ctu_can_fd_regs.h
 create mode 100644 hw/net/can/ctucan_core.c
 create mode 100644 hw/net/can/ctucan_core.h
 create mode 100644 hw/net/can/ctucan_pci.c

Comments

Pavel Pisa Sept. 4, 2020, 5:31 p.m. UTC | #1
Hello everybody,

On Thursday 03 of September 2020 23:37:17 pisa@cmp.felk.cvut.cz wrote:
> From: Pavel Pisa <pisa@cmp.felk.cvut.cz>
>
> CTU CAN FD is an open source soft core written in VHDL.
> It originated in 2015 as Ondrej Ille's project at the
> Department of Measurement of FEE at CTU.

It seems that there has been problem with QEMU CI
run by patchew

   No space left on device

It seems it is resolved for later patches

Please, can somebody restart pipe for our CAN FD series

  https://patchew.org/QEMU/cover.1599168753.git.pisa@cmp.felk.cvut.cz/

Please, is there somebody willing to look and apply series
to mainline if it passes CI OK?

Changes are only in CAN subsystem so if there is no
problem with breaking build on some system then
patches can break only the subsystem which I have planned,
found funding for initial CAN implementation provided
by RTEMS GSoC slot and where I have tutor our university
studnet to work on CAN FD support. If something is wrong
then it break only this subsystem, all functionality is
activated only when explicitly selected by command line option.

It seems that subsystem has users at Xilinx, Pengutronix
and more.

I have some longer time plans how to implement back-pressure
from SocketCAN, prioritization of the bus transfers when
multiple controllers are active at one and even emulate
bus tansmittion delay and blocking when message is on its way.
But these are more intrusive changes and would require time
or some other student work and I do not invest my time
before I would know that there is no more request for
series on which future work is based on.

Thanks much in advance,

Pavel
Paolo Bonzini Sept. 4, 2020, 8:19 p.m. UTC | #2
On 04/09/20 19:31, Pavel Pisa wrote:
> Hello everybody,
> 
> On Thursday 03 of September 2020 23:37:17 pisa@cmp.felk.cvut.cz wrote:
>> From: Pavel Pisa <pisa@cmp.felk.cvut.cz>
>>
>> CTU CAN FD is an open source soft core written in VHDL.
>> It originated in 2015 as Ondrej Ille's project at the
>> Department of Measurement of FEE at CTU.
> It seems that there has been problem with QEMU CI
> run by patchew
> 
>    No space left on device
> 
> It seems it is resolved for later patches

Yes there seems to be a bug where timeouts fail to stop the
container---eventually they pile up and occupy all disk space.  I should
really just add a cron job until I figure it out.

Paolo