Merge pull request #75 from lnis-uofu/ganesh_dev

General updates to pass MPW precheker
This commit is contained in:
tangxifan 2020-12-17 16:24:43 -07:00 committed by GitHub
commit 2a429178c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 150 additions and 98 deletions

View File

@ -19,6 +19,8 @@ env:
lnis-uofu/Caravel-SOFA-HD
REPO_KEY: &REPO_KEY
${{ secrets.SOFA_HD_KEY }}
CARAVEL_COMPARE_COMMIT: &CARAVEL_COMPARE_COMMIT
f48448d4736bd6d56fed4dbf7f9cc50552d8745d
on:
push:
@ -68,27 +70,14 @@ jobs:
run: cd /usr/local/workspace && pwd && ls && bash ./SOFA-Chips/.github/workflows/perform_precheck.sh
- name: Deploy files
# if: ${{ github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged' }}
run: bash ./SOFA-Chips/.github/workflows/sync_repo.sh
- name: Deploy Changes
uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged' }}
with:
user_name: "lnis.uofu"
user_email: "lnis.uofu@gmail.com"
deploy_key: *REPO_KEY
external_repository: *DEST_REPO
publish_dir: *DEST_DIR
publish_branch: master
disable_nojekyll: true
commit_message: '[Deployment] ${{ github.event.head_commit.message }}'
- name: Local log
if: ${{ github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged' }}
run:
git status
# - name: Deploy files to localbranch
# if: ${{! (github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged') }}
# run: bash ./SOFA-Chips/.github/workflows/sync_repo.sh
# - name: Deploy Changes localbranch
# - name: Deploy Changes localbranch
# uses: peaceiris/actions-gh-pages@v3
# if: ${{! (github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged') }}
# with:

View File

@ -1,68 +0,0 @@
name: Caravel-SOFA_HD Deployment
# = = = Env Variable = = = = =
# secrets.TEST_REPO_KEY
# secrets.SOFA_HD_KEY
# secrets.SOFA_CHD_KEY
# secrets.QLSOFA_HD_KEY
# secrets.QLAP3_KEY
# yq r -X deploy_sofa.yaml > ./workflows/deploy_sofa_hd.yaml
env:
SCAN_DIRECTORY: 'FPGA1212_SOFA_HD_PNR/**'
PROJ_SUFFIX: SOFA_HD
DEST_DIR: Caravel-SOFA-HD
DEST_REPO: lnis-uofu/Caravel-SOFA-HD
REPO_KEY: ${{ secrets.SOFA_HD_KEY }}
on:
push:
paths:
- '.github/**'
- 'SynRepoConfig/**'
- '$SCAN_DIRECTORY'
branches:
- ganesh_dev
pull_request:
types: closed
branches:
- master
jobs:
linux:
name: Updating release repository
runs-on: ubuntu-latest
steps:
- name: Checkout SOFA-Chips
uses: actions/checkout@v2
with:
path: SOFA-Chips
- name: Checkout caravel repo
uses: actions/checkout@master
with:
repository: lnis-uofu/Caravel-SOFA-HD
path: Caravel-SOFA-HD
- name: Checkout open_mpw_precheck repo
uses: actions/checkout@master
with:
repository: efabless/open_mpw_precheck
path: open_mpw_precheck
- name: Perform checks with open_mpw_precheck
uses: ganeshgore/docker-run-action@49cd3a1
with:
image: goreganesh/open_mpw_prechecker
options: >
-v ${{github.workspace}}/open_mpw_precheck:/usr/local/bin -v ${{github.workspace}}:/usr/local/workspace -e DEST_DIR=$DEST_DIR -e SCAN_DIRECTORY=$SCAN_DIRECTORY -e PRECHECKER_OPTS="--skip_drc" --workdir /usr/local/workspace
run: cd /usr/local/workspace && pwd && ls && bash ./SOFA-Chips/.github/workflows/perform_precheck.sh
- name: Deploy files
# if: ${{ github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged' }}
run: bash ./SOFA-Chips/.github/workflows/sync_repo.sh
- name: Deploy Changes
uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.event_name == 'pull_request' && contains(github.ref, "master") && github.event.action == 'merged' }}
with:
user_name: "lnis.uofu"
user_email: "lnis.uofu@gmail.com"
deploy_key: ${{ secrets.SOFA_HD_KEY }}
external_repository: lnis-uofu/Caravel-SOFA-HD
publish_dir: Caravel-SOFA-HD
publish_branch: master
disable_nojekyll: true
commit_message: '[Deployment] ${{ github.event.head_commit.message }}'

View File

@ -15,8 +15,8 @@ echo "[Info] All files are uncompressed"
AddLine="use fpga_top fpga_top_uut\n"\
"transform 1 0 0 0 1 0\n"\
"box 0 0 2500 3000"
sed -i "s/<< properties >>/${AddLine}\n<< properties >>/" ./mag/user_project_wrapper.mag
echo "[Info] Merged with user_project_wrapper"
sed -i "s/<< properties >>/${AddLine}\n<< properties >>/" ./mag/user_project_wrapper_empty.mag
echo "[Info] Updated user_project_wrapper_empty"
# = = = Running magic to merge fpga_top with user_project_wrapper = = = = = = =
[ ! -d "/usr/local/workspace/${DEST_DIR}/checks" ] && mkdir /usr/local/workspace/${DEST_DIR}/checks
@ -26,10 +26,12 @@ magic -rcfile ${PDK_ROOT}/sky130A/libs.tech/magic/current/sky130A.magicrc \
../SOFA-Chips/SCRIPT/merge_fpga_top.tcl </dev/null > \
/usr/local/workspace/${DEST_DIR}/checks/magic_merge_user_project_wrapper.log
git reset ./mag/user_project_wrapper_empty.mag
echo "[Info] merge fpga-top"
# = = = = = = = = = = Build Caravel with Klayout = = = = = = = = = = = = = = =
klayout -r ../SOFA-Chips/SCRIPT/merge_caravel_klayout.py -zz
klayout -r ../SOFA-Chips/SCRIPT/merge_caravel_klayout.py -zz > \
/usr/local/workspace/${DEST_DIR}/checks/KlayoutMerge.log
echo "[Info] Finished shiping chip with Klayout"
rm -rf ./gds/fpga_top*
rm -rf ./gds/user_project_wrapper_empty.gds
@ -52,6 +54,7 @@ if [[ "$SKIP_PRECHECK" != 1 ]]; then
--pdk_root $PDK_ROOT ${PRECHECKER_OPTS}
echo "[Info] Finished MPW Prechecker"
else
make compress
echo "[Info] Skipped MPW Prechecker"
fi
@ -69,3 +72,11 @@ rm -rf user_project_wrapper.mag
rm -rf gds/caravel.mag
rm -rf magic_drc.log
git checkout HEAD -- ./mag/user_project_wrapper.mag
git checkout HEAD -- ./mag/user_project_wrapper.mag
echo ${CARAVEL_COMPARE_COMMIT}
if [[ 0 -eq $(git cat-file -e $CARAVEL_COMPARE_COMMIT) ]]; then
git diff --stat $CARAVEL_COMPARE_COMMIT . > \
/usr/local/workspace/${DEST_DIR}/checks/compare_caravel.txt
echo "[Info] Create compare_caravel.txt"
fi

View File

@ -16,11 +16,14 @@ done
cd ${DEST_DIR}
[ -s source_commit_hash.txt ] || echo "----------" > source_commit_hash.txt
sed -i -e "s/^/\n/" source_commit_hash.txt
sed -i -e "s/^/${GITHUB_SHA}\n/" source_commit_hash.txt
sed -i -e "s/^/$(date)\n/" source_commit_hash.txt
[ -s source_commit_hash.txt ] || echo "---- Start ----" > source_commit_hash.txt
sed -i "1i GITHUB_SHA ${GITHUB_SHA:--}" source_commit_hash.txt
sed -i "1i Date $(date)" source_commit_hash.txt
sed -i '1i = = = = = = = = = = = = = = = =' source_commit_hash.txt
# Clean up file from repo
git checkout master qflow
git checkout master qflow
rm -rf .travis*
rm -f .travis.yml
find . -xtype l -delete

View File

@ -0,0 +1,116 @@
module user_project_wrapper(
// Power pins
vccd1, vssd1, vccd2, vssd2,
vdda1, vssa1, vdda2, vssa2,
// Power pins
wb_rst_i, wbs_ack_o, wbs_cyc_i,
wbs_stb_i, wbs_we_i, wb_clk_i,
wbs_adr_i, wbs_dat_i, wbs_dat_o, wbs_sel_i
// Logic analyser pins
io_in, io_oeb, io_out, la_oen,
la_data_in, la_data_out,
// analog_io
analog_io,
// User clock
user_clock2);
// Power pins
input vccd1;
input vccd2;
input vdda1;
input vdda2;
input vssa1;
input vssa2;
input vssd1;
input vssd2;
// Power pins
input wb_clk_i;
input wb_rst_i;
output wbs_ack_o;
input [31:0] wbs_adr_i;
input [31:0] wbs_dat_i;
output [31:0] wbs_dat_o;
input [3:0] wbs_sel_i;
input wbs_stb_i;
input wbs_we_i;
input wbs_cyc_i;
// Logic analyser pins
input [37:0] io_in;
output [37:0] io_oeb;
output [37:0] io_out;
input [127:0] la_data_in;
output [127:0] la_data_out;
input [127:0] la_oen;
// Analog_pin
inout [30:0] analog_io;
// User clock
input user_clock2;
// Short all power rails/domains
assign vcca1 = vdda2;
assign vssa1 = vssa2;
assign vccd2 = vdda1;
assign vssd2 = vssa1;
assign vccd1 = vccd2;
assign vssd1 = vssd2;
module fpga_top fpga_top_uut (
// Power connections
.VDD(vccd1)
.VSS(vssd1)
// Wishbone connections
.wb_clk_i(wb_clk_i),
.wb_rst_i(wb_rst_i),
.wbs_stb_i(wbs_stb_i),
.wbs_cyc_i(wbs_cyc_i),
.wbs_we_i(wbs_we_i),
.wbs_sel_i(wbs_sel_i),
.wbs_dat_i(wbs_dat_i),
.wbs_adr_i(wbs_adr_i),
.wbs_ack_o(wbs_ack_o),
.wbs_dat_o(wbs_dat_o),
// Logic analyser connections
.la_data_in(la_data_in),
.la_data_out(la_data_out),
.la_oen(la_oen),
.io_in(io_in),
.io_out(io_out),
.io_oeb(io_oeb),
// Analog ports
.analog_io_0_(analog_io_0_),
.analog_io_1_(analog_io_1_),
.analog_io_2_(analog_io_2_),
.analog_io_3_(analog_io_3_),
.analog_io_4_(analog_io_4_),
.analog_io_5_(analog_io_5_),
.analog_io_6_(analog_io_6_),
.analog_io_7_(analog_io_7_),
.analog_io_8_(analog_io_8_),
.analog_io_9_(analog_io_9_),
.analog_io_10_(analog_io_10_),
.analog_io_11_(analog_io_11_),
.analog_io_12_(analog_io_12_),
.analog_io_13_(analog_io_13_),
.analog_io_14_(analog_io_14_),
.analog_io_15_(analog_io_15_),
.analog_io_16_(analog_io_16_),
.analog_io_17_(analog_io_17_),
.analog_io_18_(analog_io_18_),
.analog_io_19_(analog_io_19_),
.analog_io_20_(analog_io_20_),
.analog_io_21_(analog_io_21_),
.analog_io_22_(analog_io_22_),
.analog_io_23_(analog_io_23_),
.analog_io_24_(analog_io_24_),
.analog_io_25_(analog_io_25_),
.analog_io_26_(analog_io_26_),
.analog_io_27_(analog_io_27_),
.analog_io_28_(analog_io_28_),
.analog_io_29_(analog_io_29_),
.analog_io_30_(analog_io_30_),
// User Clock
.user_clock2(user_clock2)
) ;
endmodule

View File

@ -4,7 +4,7 @@ gds rescale false
gds merge yes
gds read ./gds/fpga_top_icv_in_design.gds
load ./mag/user_project_wrapper.mag
load ./mag/user_project_wrapper_empty.mag
save user_project_wrapper

View File

@ -1,4 +1,4 @@
SrcLoc, DestLoc
FPGA1212_QLSOFA_HD_PNR/FPGA1212_QLSOFA_HD_task/,OpenFPGA_task
FPGA1212_QLSOFA_HD_PNR/FPGA1212_QLSOFA_HD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
FPGA1212_QLSOFA_HD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
FPGA1212_QLSOFA_HD_PNR/fpga_top/fpga_top_icv_in_design.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
1 SrcLoc, DestLoc
2 FPGA1212_QLSOFA_HD_PNR/FPGA1212_QLSOFA_HD_task/,OpenFPGA_task
3 FPGA1212_QLSOFA_HD_PNR/FPGA1212_QLSOFA_HD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
4 FPGA1212_QLSOFA_HD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v FPGA1212_QLSOFA_HD_PNR/fpga_top/fpga_top_icv_in_design.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v

View File

@ -1,4 +1,4 @@
SrcLoc, DestLoc
FPGA1212_SOFA_CHD_PNR/FPGA1212_SOFA_CHD_task/,OpenFPGA_task
FPGA1212_SOFA_CHD_PNR/FPGA1212_SOFA_CHD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
FPGA1212_SOFA_CHD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
FPGA1212_SOFA_CHD_PNR/fpga_top/fpga_top_icv_in_design.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v

1 SrcLoc, DestLoc
2 FPGA1212_SOFA_CHD_PNR/FPGA1212_SOFA_CHD_task/,OpenFPGA_task
3 FPGA1212_SOFA_CHD_PNR/FPGA1212_SOFA_CHD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
4 FPGA1212_SOFA_CHD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v FPGA1212_SOFA_CHD_PNR/fpga_top/fpga_top_icv_in_design.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v

View File

@ -1,4 +1,5 @@
SrcLoc, DestLoc
FPGA1212_SOFA_HD_PNR/FPGA1212_SOFA_HD_task/,OpenFPGA_task
FPGA1212_SOFA_HD_PNR/FPGA1212_SOFA_HD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
FPGA1212_SOFA_HD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
FPGA1212_SOFA_HD_PNR/fpga_top/fpga_top_icv_in_design.lvs.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
SOFA-Chips/HDL/common/user_project_wrapper_integration.v,verilog/gl/user_project_wrapper.v
1 SrcLoc, DestLoc
2 FPGA1212_SOFA_HD_PNR/FPGA1212_SOFA_HD_task/,OpenFPGA_task
3 FPGA1212_SOFA_HD_PNR/FPGA1212_SOFA_HD_Verilog/SRC/,verilog/OpenFPGA_Verilog/
4 FPGA1212_SOFA_HD_PNR/fpga_top/fpga_top*.pt.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v FPGA1212_SOFA_HD_PNR/fpga_top/fpga_top_icv_in_design.lvs.v,verilog/gl/caravel_${PROJ_SUFFIX,,}_top.v
5 SOFA-Chips/HDL/common/user_project_wrapper_integration.v,verilog/gl/user_project_wrapper.v