-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
board/custom-board-design: update to build with latest HSS code base.
- Update board specific Makefile. - Add IHC usage. - Removed soc_config directory to match other boards.
- Loading branch information
1 parent
bde2529
commit 6b218e2
Showing
7 changed files
with
629 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
boards/custom-board-design/drivers_config/fpga_ip/miv_ihc/miv_ihc_add_mapping.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
/******************************************************************************* | ||
* Copyright 2021 Microchip FPGA Embedded Systems Solutions. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* MPFS HAL Embedded Software | ||
* | ||
*/ | ||
|
||
/*========================================================================*//** | ||
@mainpage Configuration for the MiV-IHC driver | ||
@section intro_sec Introduction | ||
Used to configure the driver with base addresses from your Libero Projext. | ||
These addresses will not change unless you change the Libero design | ||
IHC subsytem design. | ||
This file is used for reference only. | ||
When usiing in a project copy to | ||
src/boards/your-board/platform-config/drivers_config/fpga-ip/miv_ihc | ||
and rename dropping the _reference. | ||
@section | ||
*//*==========================================================================*/ | ||
|
||
|
||
#ifndef MIV_IHC_ADD_MAPPING_H_ | ||
#define MIV_IHC_ADD_MAPPING_H_ | ||
|
||
#ifndef COMMON_AHB_BASE_ADD | ||
#define COMMON_AHB_BASE_ADD 0x50000000UL | ||
#endif | ||
#ifndef IHC_HO_BASE_OFFSET | ||
#define IHC_HO_BASE_OFFSET 0x00000000UL | ||
#endif | ||
#ifndef IHC_H1_BASE_OFFSET | ||
#define IHC_H1_BASE_OFFSET 0x00000500UL | ||
#endif | ||
#ifndef IHC_H2_BASE_OFFSET | ||
#define IHC_H2_BASE_OFFSET 0x00000A00UL | ||
#endif | ||
#ifndef IHC_H3_BASE_OFFSET | ||
#define IHC_H3_BASE_OFFSET 0x00000F00UL | ||
#endif | ||
#ifndef IHC_H4_BASE_OFFSET | ||
#define IHC_H4_BASE_OFFSET 0x00001400UL | ||
#endif | ||
|
||
/************** My Hart 0 ************/ | ||
|
||
#ifndef IHC_LOCAL_H0_REMOTE_H1 | ||
#define IHC_LOCAL_H0_REMOTE_H1 0x50000000 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H0_REMOTE_H2 | ||
#define IHC_LOCAL_H0_REMOTE_H2 0x50000100 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H0_REMOTE_H3 | ||
#define IHC_LOCAL_H0_REMOTE_H3 0x50000200 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H0_REMOTE_H4 | ||
#define IHC_LOCAL_H0_REMOTE_H4 0x50000300 | ||
#endif | ||
|
||
#ifndef IHCIA_LOCAL_H0 | ||
#define IHCIA_LOCAL_H0 0x50000400 | ||
#endif | ||
|
||
/************** My Hart 1 ************/ | ||
|
||
#ifndef IHC_LOCAL_H1_REMOTE_H0 | ||
#define IHC_LOCAL_H1_REMOTE_H0 0x50000500 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H1_REMOTE_H2 | ||
#define IHC_LOCAL_H1_REMOTE_H2 0x50000600 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H1_REMOTE_H3 | ||
#define IHC_LOCAL_H1_REMOTE_H3 0x50000700 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H1_REMOTE_H4 | ||
#define IHC_LOCAL_H1_REMOTE_H4 0x50000800 | ||
#endif | ||
|
||
#ifndef IHCIA_LOCAL_H1 | ||
#define IHCIA_LOCAL_H1 0x50000900 | ||
#endif | ||
|
||
/************** My Hart 2 ************/ | ||
|
||
#ifndef IHC_LOCAL_H2_REMOTE_H0 | ||
#define IHC_LOCAL_H2_REMOTE_H0 0x50000A00 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H2_REMOTE_H1 | ||
#define IHC_LOCAL_H2_REMOTE_H1 0x50000B00 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H2_REMOTE_H3 | ||
#define IHC_LOCAL_H2_REMOTE_H3 0x50000C00 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H2_REMOTE_H4 | ||
#define IHC_LOCAL_H2_REMOTE_H4 0x50000D00 | ||
#endif | ||
|
||
#ifndef IHCIA_LOCAL_H2 | ||
#define IHCIA_LOCAL_H2 0x50000E00 | ||
#endif | ||
|
||
/************** My Hart 3 ************/ | ||
|
||
#ifndef IHC_LOCAL_H3_REMOTE_H0 | ||
#define IHC_LOCAL_H3_REMOTE_H0 0x50000F00 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H3_REMOTE_H1 | ||
#define IHC_LOCAL_H3_REMOTE_H1 0x50001000 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H3_REMOTE_H2 | ||
#define IHC_LOCAL_H3_REMOTE_H2 0x50001100 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H3_REMOTE_H4 | ||
#define IHC_LOCAL_H3_REMOTE_H4 0x50001200 | ||
#endif | ||
|
||
#ifndef IHCIA_LOCAL_H3 | ||
#define IHCIA_LOCAL_H3 0x50001300 | ||
#endif | ||
|
||
/************** My Hart 4 ************/ | ||
|
||
#ifndef IHC_LOCAL_H4_REMOTE_H0 | ||
#define IHC_LOCAL_H4_REMOTE_H0 0x50001400 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H4_REMOTE_H1 | ||
#define IHC_LOCAL_H4_REMOTE_H1 0x50001500 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H4_REMOTE_H2 | ||
#define IHC_LOCAL_H4_REMOTE_H2 0x50001600 | ||
#endif | ||
|
||
#ifndef IHC_LOCAL_H4_REMOTE_H3 | ||
#define IHC_LOCAL_H4_REMOTE_H3 0x50001700 | ||
#endif | ||
|
||
#ifndef IHCIA_LOCAL_H4 | ||
#define IHCIA_LOCAL_H4 0x50001800 | ||
#endif | ||
|
||
/*------------------------------------------------------------------------------ | ||
* choose the interrupt mapping used in our system | ||
* Please see miv_ihc_regs.h for the defaults | ||
*/ | ||
#define IHCIA_hart0_IRQHandler fabric_f2h_63_plic_IRQHandler | ||
#define IHCIA_hart1_IRQHandler fabric_f2h_62_plic_IRQHandler | ||
#define IHCIA_hart2_IRQHandler fabric_f2h_61_plic_IRQHandler | ||
#define IHCIA_hart3_IRQHandler fabric_f2h_60_plic_IRQHandler | ||
#define IHCIA_hart4_IRQHandler fabric_f2h_59_plic_IRQHandler | ||
|
||
#define IHCIA_hart0_INT FABRIC_F2H_63_PLIC | ||
#define IHCIA_hart1_INT FABRIC_F2H_62_PLIC | ||
#define IHCIA_hart2_INT FABRIC_F2H_61_PLIC | ||
#define IHCIA_hart3_INT FABRIC_F2H_60_PLIC | ||
#define IHCIA_hart4_INT FABRIC_F2H_59_PLIC | ||
|
||
#endif /* MIV_IHC_ADD_MAPPING_H_ */ |
59 changes: 59 additions & 0 deletions
59
boards/custom-board-design/drivers_config/fpga_ip/miv_ihc/miv_ihc_config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/******************************************************************************* | ||
* Copyright 2019-2021 Microchip FPGA Embedded Systems Solutions. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* MPFS HAL Embedded Software | ||
* | ||
*/ | ||
|
||
/*========================================================================*//** | ||
@mainpage Configuration for the MiV-IhC driver | ||
@section intro_sec Introduction | ||
Used to configure the driver | ||
@section | ||
*//*==========================================================================*/ | ||
|
||
|
||
#ifndef MIV_IHC_CONFIG_H_ | ||
#define MIV_IHC_CONFIG_H_ | ||
|
||
#include "miv_ihc_add_mapping.h" | ||
|
||
/*------------------------------------------------------------------------------ | ||
* define the monitor hart (HSS hart) used in our system | ||
*/ | ||
#define HSS_HART_MASK HART0_MASK | ||
#define HSS_HART_ID HART0_ID | ||
|
||
/*------------------------------------------------------------------------------ | ||
* HSS_REMOTE_HARTS_MASK | ||
* This is used to define the harts the HSS is communicating with | ||
*/ | ||
#define HSS_REMOTE_HARTS_MASK (HART1_MASK | HART2_MASK |HART3_MASK | HART4_MASK) | ||
|
||
/*------------------------------------------------------------------------------ | ||
* Define which harts are connected via comms channels to a particular hart | ||
* user defined | ||
*/ | ||
#define IHCIA_H0_REMOTE_HARTS (HSS_REMOTE_HARTS_MASK) /* connected to all harts */ | ||
#define IHCIA_H1_REMOTE_HARTS (HSS_HART_MASK | HART4_MASK) /* HSS and Context B connected */ | ||
#define IHCIA_H2_REMOTE_HARTS (HSS_HART_MASK) | ||
#define IHCIA_H3_REMOTE_HARTS (HSS_HART_MASK) | ||
#define IHCIA_H4_REMOTE_HARTS (HSS_HART_MASK | HART1_MASK) /* HSS and Context A connected */ | ||
|
||
/*------------------------------------------------------------------------------ | ||
* interrupts enabled in this system design for a particular hart | ||
* User defined | ||
*/ | ||
#define IHCIA_H0_REMOTE_HARTS_INTS HSS_HART_DEFAULT_INT_EN /* connected to all harts */ | ||
#define IHCIA_H1_REMOTE_HARTS_INTS (HSS_HART_MP_INT_EN | HSS_HART_ACK_INT_EN | HART4_MP_INT_EN | HART4_ACK_INT_EN) /* HSS and Context B connected */ | ||
#define IHCIA_H2_REMOTE_HARTS_INTS (HSS_HART_MP_INT_EN | HSS_HART_ACK_INT_EN) | ||
#define IHCIA_H3_REMOTE_HARTS_INTS (HSS_HART_MP_INT_EN | HSS_HART_ACK_INT_EN) | ||
#define IHCIA_H4_REMOTE_HARTS_INTS (HSS_HART_MP_INT_EN | HSS_HART_ACK_INT_EN | HART1_MP_INT_EN | HART1_ACK_INT_EN) /* HSS and Context A connected */ | ||
|
||
#endif /* MIV_IHC_CONFIG_H_ */ | ||
|
Oops, something went wrong.