[PATCH 16/18] bsp/altera-cyclone-v: Add Alteras hwlib

Ralf Kirchner ralf.kirchner at embedded-brains.de
Tue Mar 11 08:53:28 UTC 2014


Hi Joel,
Answers below.

Am 10.03.2014 18:42, schrieb Joel Sherrill:
> Given the size of this patch and that it appears to be a direct copy
> from Alters, can you provide more information about its general utility?
I have a doxygen generated html documentation which was shipped with the
hwlib. I did not add this documentation because I suppose it is
generated from the doxygen within the files of the hwlib directory. Thus
who is interested in it could generate it any time he wants to.

> 
> Can this BSP support multiple configurations of the SoC?
I suppose you mean different CPU cores in the FPGA?
No. It has two hardcoded Cortex-A MPCores + an FPGA for peripherals.
> 
> How does this interact with our normal BSP framework?
The hwlib directory cotains methods for configuring peripeherals which
are within the cores (Altera here talks about the HPS Hard Processor
System) and for configuring interaction with the FPGA.
Where applicable my BSP code uses the altera methods.
But for this BSP the whole FPGA stuff currently is out of scope.
> 
> Is it useful for other BSPs based on Altera SoCs?
I could imagine that Altera will have similar hwlibs for other SoCs. But
I don't think they can re-use the same hwlib. I is too close to hardware.
> 
> etc
> 
> My first concern is that it seems way more general than something
> that should show up at a specific BSP level. How does this related to
> the NIOS?
I suppose Altera will have a pool of drivers for different IPs, etc. I
assume for an SoC they will package those drivers which are applicable
into an SoC specific hwlib.
And yes, of course we could possibly slice out single drivers and share
them between BSPs. The problem here would be maintenance. Once Altera
releses a new version of the original hwlib this would mean a lot of
manual work. My approach here is more simple: Adding the whole hwlib is
a commit of it's own. If a new version of hwlib gets released, only this
one commit will need updating.
> 
> On 3/7/2014 7:59 AM, Ralf Kirchner wrote:
>> Add hwlib as copied from Altera
>> ---
>>  .../hwlib/include/alt_16550_uart.h                 | 1555 +
>>  .../hwlib/include/alt_address_space.h              |  390 +
>>  .../hwlib/include/alt_bridge_manager.h             |  269 +
>>  .../hwlib/include/alt_clock_group.h                |   95 +
>>  .../hwlib/include/alt_clock_manager.h              | 1431 +
>>  .../arm/altera-cyclone-v/hwlib/include/alt_dma.h   |  940 +
>>  .../hwlib/include/alt_dma_common.h                 |  162 +
>>  .../hwlib/include/alt_dma_program.h                |  949 +
>>  .../hwlib/include/alt_fpga_manager.h               | 1052 +
>>  .../hwlib/include/alt_generalpurpose_io.h          | 1236 +
>>  .../altera-cyclone-v/hwlib/include/alt_globaltmr.h |  458 +
>>  .../hwlib/include/alt_hwlibs_ver.h                 |   52 +
>>  .../hwlib/include/alt_interrupt_common.h           |  531 +
>>  .../hwlib/include/alt_mpu_registers.h              |  156 +
>>  .../hwlib/include/alt_reset_manager.h              |  249 +
>>  .../hwlib/include/alt_system_manager.h             |  209 +
>>  .../altera-cyclone-v/hwlib/include/alt_timers.h    |  677 +
>>  .../altera-cyclone-v/hwlib/include/alt_watchdog.h  |  779 +
>>  .../arm/altera-cyclone-v/hwlib/include/hwlib.h     |  190 +
>>  .../hwlib/include/socal/alt_acpidmap.h             | 3569 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_can.h |36873 +++++++
>>  .../hwlib/include/socal/alt_clkmgr.h               | 6464 ++
>>  .../altera-cyclone-v/hwlib/include/socal/alt_dap.h |  144 +
>>  .../hwlib/include/socal/alt_dmanonsecure.h         |  144 +
>>  .../hwlib/include/socal/alt_dmasecure.h            |  144 +
>>  .../hwlib/include/socal/alt_emac.h                 |103305 ++++++++++++++++++
>>  .../altera-cyclone-v/hwlib/include/socal/alt_f2h.h | 1075 +
>>  .../hwlib/include/socal/alt_fpgamgr.h              | 7090 ++
>>  .../hwlib/include/socal/alt_fpgamgrdata.h          |  158 +
>>  .../hwlib/include/socal/alt_gpio.h                 | 1991 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_h2f.h | 1073 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_i2c.h | 5940 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_l3.h  | 6299 ++
>>  .../hwlib/include/socal/alt_l4wd.h                 | 1801 +
>>  .../hwlib/include/socal/alt_lwfpgaslvs.h           |   52 +
>>  .../hwlib/include/socal/alt_lwh2f.h                | 1450 +
>>  .../hwlib/include/socal/alt_mpul2.h                |  144 +
>>  .../hwlib/include/socal/alt_mpuscu.h               |  144 +
>>  .../hwlib/include/socal/alt_nand.h                 |10617 ++
>>  .../hwlib/include/socal/alt_nanddata.h             |   52 +
>>  .../hwlib/include/socal/alt_ocram.h                |   52 +
>>  .../hwlib/include/socal/alt_qspi.h                 | 5951 +
>>  .../hwlib/include/socal/alt_qspidata.h             |   52 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_rom.h |   52 +
>>  .../hwlib/include/socal/alt_rstmgr.h               | 3382 +
>>  .../hwlib/include/socal/alt_scanmgr.h              |  927 +
>>  .../hwlib/include/socal/alt_sdmmc.h                | 9115 ++
>>  .../altera-cyclone-v/hwlib/include/socal/alt_sdr.h | 4149 +
>>  .../hwlib/include/socal/alt_spim.h                 | 3293 +
>>  .../hwlib/include/socal/alt_spis.h                 | 2958 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_stm.h |  144 +
>>  .../hwlib/include/socal/alt_sysmgr.h               |24810 +++++
>>  .../altera-cyclone-v/hwlib/include/socal/alt_tmr.h |  864 +
>>  .../hwlib/include/socal/alt_uart.h                 | 5158 +
>>  .../altera-cyclone-v/hwlib/include/socal/alt_usb.h |114043 ++++++++++++++++++++
>>  .../arm/altera-cyclone-v/hwlib/include/socal/hps.h | 8026 ++
>>  .../altera-cyclone-v/hwlib/include/socal/socal.h   |  356 +
>>  .../hwlib/src/hwmgr/alt_16550_uart.c               | 1179 +
>>  .../hwlib/src/hwmgr/alt_address_space.c            |  184 +
>>  .../hwlib/src/hwmgr/alt_bridge_manager.c           |  189 +
>>  .../hwlib/src/hwmgr/alt_clock_manager.c            | 5208 +
>>  .../arm/altera-cyclone-v/hwlib/src/hwmgr/alt_dma.c | 2806 +
>>  .../hwlib/src/hwmgr/alt_dma_program.c              | 1043 +
>>  .../hwlib/src/hwmgr/alt_fpga_manager.c             |  999 +
>>  .../hwlib/src/hwmgr/alt_generalpurpose_io.c        |  745 +
>>  .../hwlib/src/hwmgr/alt_globaltmr.c                |  529 +
>>  .../hwlib/src/hwmgr/alt_reset_manager.c            |  135 +
>>  .../hwlib/src/hwmgr/alt_system_manager.c           |  265 +
>>  .../altera-cyclone-v/hwlib/src/hwmgr/alt_timers.c  | 1292 +
>>  .../hwlib/src/hwmgr/alt_watchdog.c                 | 1026 +
>>
> 


-- 
--------------------------------------------
Embedded Brains GmbH
Ralf Kirchner          Dornierstr. 4
D-82178 Puchheim       Germany
email: ralf.kirchner at embedded-brains.de
Phone: +49(0)89/1894741-17
Fax:   +49(0)89/1894741-08

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list