-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[do not merge] rhealstone benchmark #1240
Draft
lukileczo
wants to merge
6
commits into
master
Choose a base branch
from
lukileczo/rhealstone
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ad72a2e
_targets/sparcv8leon/gr712rc: update configuration
lukileczo 44954a3
add sparcv8leon-gr740-mini target
lukileczo 7782789
sparcv8leon-gr712rc/board_config: add flash and FTMCTRL_BASE addresses
lukileczo 4cb6dec
_project/sparcv8leon: remove explicit timer count defines
lukileczo 8c96571
gr740 no root
lukileczo f61c6ee
add rhealstone benchmark
lukileczo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,162 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* Board config for sparcv8leon-gr740-mini | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Lukasz Leczkowski | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#ifndef _BOARD_CONFIG_H_ | ||
#define _BOARD_CONFIG_H_ | ||
|
||
/* CPU Configuration */ | ||
|
||
#define LEON_HAS_L2CACHE | ||
|
||
#define SYSCLK_FREQ (250 * 1000 * 1000) /* MHz */ | ||
|
||
#define UART_MAX_CNT 2 | ||
|
||
#define UART_BAUDRATE 115200 | ||
|
||
#define UART0_BASE ((void *)0xff900000) | ||
#define UART1_BASE ((void *)0xff901000) | ||
#define UART2_BASE ((void *)-1) | ||
#define UART3_BASE ((void *)-1) | ||
#define UART4_BASE ((void *)-1) | ||
#define UART5_BASE ((void *)-1) | ||
|
||
#define UART0_IRQ 29 | ||
#define UART1_IRQ 30 | ||
#define UART2_IRQ -1 | ||
#define UART3_IRQ -1 | ||
#define UART4_IRQ -1 | ||
#define UART5_IRQ -1 | ||
|
||
#define UART0_TX 21 | ||
#define UART0_RX 9 | ||
|
||
#define UART1_TX 20 | ||
#define UART1_RX 8 | ||
|
||
#define UART2_TX -1 | ||
#define UART2_RX -1 | ||
|
||
#define UART3_TX -1 | ||
#define UART3_RX -1 | ||
|
||
#define UART4_TX -1 | ||
#define UART4_RX -1 | ||
|
||
#define UART5_TX -1 | ||
#define UART5_RX -1 | ||
|
||
#define UART0_ACTIVE 1 | ||
#define UART1_ACTIVE 0 | ||
#define UART2_ACTIVE 0 | ||
#define UART3_ACTIVE 0 | ||
#define UART4_ACTIVE 0 | ||
#define UART5_ACTIVE 0 | ||
|
||
#define UART0_DMA 0 | ||
#define UART1_DMA 0 | ||
#define UART2_DMA 0 | ||
#define UART3_DMA 0 | ||
#define UART4_DMA 0 | ||
#define UART5_DMA 0 | ||
|
||
#define UART_CONSOLE_PLO 0 | ||
#define UART_CONSOLE_KERNEL 0 | ||
#define UART_CONSOLE_USER 0 | ||
|
||
#define GPIO_DIR_IN 0 | ||
#define GPIO_DIR_OUT 1 | ||
|
||
/* Interrupts */ | ||
|
||
#define INT_CTRL_BASE ((void *)0xff904000) | ||
#define EXTENDED_IRQN 10 | ||
|
||
/* Timers */ | ||
|
||
#define TIMER0_1_IRQ 1 | ||
#define TIMER0_2_IRQ 2 | ||
#define GPTIMER0_BASE ((void *)0xff908000) | ||
#define GPTIMER1_BASE ((void *)0xff909000) | ||
|
||
/* ADC */ | ||
|
||
#define ADC_CNT 0 | ||
|
||
#define ADC0_ACTIVE 0 | ||
#define ADC1_ACTIVE 0 | ||
#define ADC2_ACTIVE 0 | ||
#define ADC3_ACTIVE 0 | ||
#define ADC4_ACTIVE 0 | ||
#define ADC5_ACTIVE 0 | ||
#define ADC6_ACTIVE 0 | ||
#define ADC7_ACTIVE 0 | ||
|
||
/* SPI */ | ||
|
||
#define SPI_CNT 1 | ||
|
||
/* GPIO */ | ||
|
||
#define GPIO_PORT_CNT 2 | ||
|
||
/* SpaceWire */ | ||
|
||
#define SPW_CNT 0 | ||
|
||
#define SPW0_ACTIVE 0 | ||
#define SPW1_ACTIVE 0 | ||
#define SPW2_ACTIVE 0 | ||
#define SPW3_ACTIVE 0 | ||
#define SPW4_ACTIVE 0 | ||
#define SPW5_ACTIVE 0 | ||
|
||
/* SMP */ | ||
|
||
#define TLB_IRQ 12 | ||
|
||
/* DMA */ | ||
|
||
#define DMA_MAX_CNT 0 | ||
|
||
/* SDRAM configuration */ | ||
|
||
#define SDCFG1_TRP 0 /* Effective 2 */ | ||
#define SDCFG1_TCAS 0 /* Effective 2 */ | ||
#define SDCFG1_TRFC 4 /* Effective 7 */ | ||
|
||
/* Configuration for IS42S1632F on GR740-MINI */ | ||
#define SDCFG1_BANKSZ 5 | ||
#define SDCFG1_COLSZ 2 | ||
#define SDCFG1_RFLOAD 780 /* For 100 MHz SDRAM clock */ | ||
|
||
#define SDCFG2_EN2T 1 | ||
#define SDCFG2_DCS 1 | ||
#define SDCFG2_BPARK 1 | ||
|
||
/* PROM configuration for S29GL01GT11DHV023 flash */ | ||
|
||
#define MCFG1_VAL 0x00000022 /* 32 R/W waitstates (128ns @ 250MHz) */ | ||
#define MCFG3_VAL 0x0 | ||
#define MCFG5_VAL 0x00000180 /* 3 lead out cycles (12ns @ 250MHz) */ | ||
#define MCFG7_VAL 0x0 | ||
|
||
#define ADDR_FLASH 0xc0000000 | ||
|
||
#define FTMCTRL_BASE 0xff903000 | ||
|
||
|
||
#define RAM_ADDR 0x07000000 | ||
#define RAM_BANK_SIZE 0x01000000 | ||
|
||
#endif |
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,18 @@ | ||
#!/bin/bash | ||
# | ||
# Shell script for building sparcv8leon-gr740-mini project | ||
# | ||
# Copyright 2024 Phoenix Systems | ||
# Author: Lukasz Leczkowski | ||
# | ||
|
||
[ "${BASH_SOURCE[0]}" -ef "$0" ] && echo "You should source this script, not execute it!" && exit 1 | ||
|
||
|
||
FLASH_SZ=$((0x8000000)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
ROOTFS_SZ=$((0x800000)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
|
||
b_image_project () { | ||
b_log "The images have been built for the ${TARGET} platform" | ||
} |
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,6 @@ | ||
:{}: | ||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin | ||
export HOME=/root | ||
W /bin/bind devfs /dev | ||
X /bin/posixsrv | ||
X /bin/psh |
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 |
---|---|---|
|
@@ -32,10 +32,8 @@ export PORTS_CURL=n | |
# | ||
export SIZE_PAGE=$((0x1000)) | ||
|
||
export BOOT_DEVICE="flash0" # Default boot device | ||
export BOOT_DEVICE="flash0" # Default boot device | ||
export MAGIC_USER_SCRIPT="dabaabad" # User script magic value | ||
#TODO: move to nvm.yaml | ||
ERASE_SIZE=$((0x20000)) # Rootfs disk erase block size (in bytes) | ||
|
||
|
||
b_build_project() { | ||
|
@@ -63,10 +61,11 @@ b_image_target() { | |
|
||
ROOTFS="$PREFIX_BOOT/rootfs.jffs2" | ||
|
||
local erase_sz=$(image_builder.py query --nvm "$NVM_CONFIG" '{{ nvm.flash0._meta.block_size }}') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# Create jffs2 image with padding at the end of the final erase block, no cleanmarkers (are written by PLO) | ||
mkfs.jffs2 -U -b -m none -e "$ERASE_SIZE" -s "$SIZE_PAGE" -r "$PREFIX_ROOTFS/" -o "$ROOTFS" -p -n | ||
mkfs.jffs2 -U -b -m none -e "$erase_sz" -s "$SIZE_PAGE" -r "$PREFIX_ROOTFS/" -o "$ROOTFS" -p -n | ||
|
||
if sumtool -n -e "$ERASE_SIZE" -b -i "$ROOTFS" -o "$ROOTFS.tmp" 2> /dev/null; then | ||
if sumtool -n -e "$erase_sz" -b -i "$ROOTFS" -o "$ROOTFS.tmp" 2> /dev/null; then | ||
echo "JFFS2 Summary nodes created" | ||
mv "$ROOTFS.tmp" "$ROOTFS" | ||
fi | ||
|
@@ -76,13 +75,19 @@ b_image_target() { | |
|
||
local FS_SZ | ||
FS_SZ=$(image_builder.py query --nvm "$NVM_CONFIG" '{{ nvm.flash0.rootfs.size }}') | ||
sz=$(du -k "$ROOTFS" | awk '{ print $1 }') | ||
echo "rootfs size: ${sz} kB / $((FS_SZ / 1024)) kB" | ||
|
||
local sz | ||
sz=$(du -b "$ROOTFS" | awk '{ print $1 }') | ||
echo "rootfs size: $((sz / 1024)) kB / $((FS_SZ / 1024)) kB" | ||
[ "$sz" -gt "$FS_SZ" ] && b_die "rootfs size exceeds the target partition!" | ||
|
||
local start=$(((FS_OFFS+sz+erase_sz-1)/erase_sz)) # Start clean block after rootfs | ||
local end=$(((FS_OFFS+FS_SZ+erase_sz-1)/erase_sz)) # Number of blocks up to rootfs end | ||
local nblocks=$((end-start-1)) # Clean blocks | ||
|
||
# cmd for creating cleanmarkers in plo | ||
echo "Format jffs2 partition in plo:" | ||
echo "jffs2 -d 2.0 -c $((FS_OFFS / ERASE_SIZE)):$((FS_SZ / ERASE_SIZE)):${ERASE_SIZE}:16" | ||
echo "jffs2 -d 2.0 -c ${start}:${nblocks}:${erase_sz}:16" | ||
|
||
image_builder.py ptable --nvm "$NVM_CONFIG" | ||
image_builder.py -v disk --nvm "$NVM_CONFIG" --part "rootfs=$ROOTFS" --part "plo=${PREFIX_PROG_STRIPPED}plo-${TARGET_FAMILY}-${TARGET_SUBFAMILY}.img" | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clang-format-pr] reported by reviewdog 🐶
suggested fix