mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
First version of a local "make bank_size"
This commit is contained in:
1 parent
69714c8a75
commit
94ca35f65e
3 files changed
+25
No files matched your search
@@ -13,3 +13,4 @@ build/
|
|||||||
# host-test stand-ins for the two generated headers
|
# host-test stand-ins for the two generated headers
|
||||||
!test/stub/html_data.h
|
!test/stub/html_data.h
|
||||||
!test/stub/version.h
|
!test/stub/version.h
|
||||||
|
.vscode
|
||||||
@@ -64,6 +64,9 @@ endif
|
|||||||
# is built, including the tools/ subdirectory.
|
# is built, including the tools/ subdirectory.
|
||||||
all: create_build_dir $(VERSION_HEADER) $(MACHINE_SRC) $(SUBDIRS) $(BUILDDIR)/rtlplayground-$(FILENAME_EXTENSION).bin
|
all: create_build_dir $(VERSION_HEADER) $(MACHINE_SRC) $(SUBDIRS) $(BUILDDIR)/rtlplayground-$(FILENAME_EXTENSION).bin
|
||||||
|
|
||||||
|
bank_size:
|
||||||
|
tools/bank_occupancy.sh "$(MACHINE)"
|
||||||
|
|
||||||
create_build_dir:
|
create_build_dir:
|
||||||
mkdir -p "$(BUILDDIR)"
|
mkdir -p "$(BUILDDIR)"
|
||||||
mkdir -p "$(BUILDDIR)/uip"
|
mkdir -p "$(BUILDDIR)/uip"
|
||||||
|
|||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
MACHINE="$1"
|
||||||
|
if [[ ! -s output-main/rtlplayground.map ]]; then
|
||||||
|
original_branch=$(git branch --show-current)
|
||||||
|
#trap 'git switch "$original_branch"' EXIT
|
||||||
|
git switch main && make CI=1 MACHINE="$MACHINE" BUILDDIR=output-main
|
||||||
|
git switch "$original_branch"
|
||||||
|
fi
|
||||||
|
source <(sed -rn 's/^([XCD]SEG|(BANK[0-9])).*=\s+([0-9]+)\. bytes.*$/main_\1=\3/p' output-main/rtlplayground.map | sort -u)
|
||||||
|
if [[ ! -s "output/$MACHINE/rtlplayground.map" ]]; then
|
||||||
|
make CI=1 MACHINE="$MACHINE"
|
||||||
|
fi
|
||||||
|
source <(sed -rn 's/^([XCD]SEG|(BANK[0-9])).*=\s+([0-9]+)\. bytes.*$/branch_\1=\3/p' output/"$MACHINE"/rtlplayground.map | sort -u)
|
||||||
|
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "segment" "main" "branch" "change"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "BANK1" "$main_BANK1" "$branch_BANK1" "$(($branch_BANK1-$main_BANK1))"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "BANK2" "$main_BANK2" "$branch_BANK2" "$(($branch_BANK2-$main_BANK2))"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "BANK3" "$main_BANK3" "$branch_BANK3" "$(($branch_BANK3-$main_BANK3))"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "CSEG" "$main_CSEG" "$branch_CSEG" "$(($branch_CSEG-$main_CSEG))"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "DSEG" "$main_DSEG" "$branch_DSEG" "$(($branch_DSEG-$main_DSEG))"
|
||||||
|
printf '%-20s %-20s %-20s %-20s\n' "XSEG" "$main_XSEG" "$branch_XSEG" "$(($branch_XSEG-$main_XSEG))"
|
||||||
Reference in new issue
Block a user