Skip to content

Commit

Permalink
Merge pull request #6 from fbelavenuto/make-bitstream
Browse files Browse the repository at this point in the history
Organizing documentation and files.
  • Loading branch information
fbelavenuto authored Dec 11, 2023
2 parents d9f3e59 + d09609c commit 3797dfe
Show file tree
Hide file tree
Showing 51 changed files with 199 additions and 61,328 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build release

on:
push:
branches:
- main
tags:
- v*
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# Check cache
- name: Docker images cache
id: docker-image-cache
uses: ScribeMD/[email protected]
with:
key: ${{ runner.os }}-cache

# Download docker images if not cached
- name: Download docker images
if: steps.docker-image-cache.outputs.cache-hit != 'true'
run: |
docker pull fbelavenuto/8bitcompilers
docker pull fbelavenuto/xilinxise
# Build files
- name: Build files
id: build
run: |
source driver/VERSION.INC
echo "DRV_VERSION=${VER_MAIN}.${VER_SEC}.${VER_REV}" >> $GITHUB_OUTPUT
NXT_VERSION=`<Nextor/VERSION`
echo "NXT_VERSION=${NXT_VERSION}" >> $GITHUB_OUTPUT
echo Building Driver
docker run --rm -it -v $PWD/driver:/src fbelavenuto/8bitcompilers N80 DRIVER.ASM DRIVER.BIN
echo Building ROM
docker run --rm -it -v $PWD:/src fbelavenuto/8bitcompilers mknexrom Nextor/Nextor-${NXT_VERSION}.base.dat driver/SDMAPPER.ROM /d:driver/DRIVER.BIN /m:Nextor/Mapper.ASCII16.bin
echo Building Updater
docker run --rm -it -v $PWD/updater:/src fbelavenuto/8bitcompilers N80 SDMUPD.ASM SDMUPD.COM
echo Building CPLD bitstream
docker run --rm -it -v $PWD/CPLD:/workdir fbelavenuto/xilinxise make
# Pack files
- name: Pack
shell: bash
run: |
tar czvf SDMapper_${{ steps.build.outputs.DRV_VERSION }}_Nextor_${{ steps.build.outputs.NXT_VERSION }}.tar.gz \
driver/SDMAPPER.ROM CPLD/sdmapper.jed Nextor/sysfiles/*
# Upload artifact
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Images
path: |
SDMapper_${{ steps.build.outputs.DRV_VERSION }}_Nextor_${{ steps.build.outputs.NXT_VERSION }}.tar.gz
retention-days: 5

# Publish a release if is a tag
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
driver/SDMAPPER.ROM
CPLD/sdmapper.jed
Nextor/sysfiles/*
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/CPLD/iseconfig
/CPLD/*.xwbt
/CPLD/*.jed
/CPLD/*.prj
/CPLD/*.bld
/CPLD/*.cmd_log
/CPLD/*.gise
Expand All @@ -26,15 +25,15 @@
/CPLD/*.tspec
/CPLD/*.vm6
/CPLD/*.xml
/CPLD/*.xst
/CPLD/*.html
/CPLD/sdmapper_html/fit
/CPLD/sdmapper_html/images
/CPLD/sdmapper_html/tim
/CPLD/*.xrpt
/CPLD/*.csv
/CPLD/*.srp
/CPLD/src/*.lfp
/CPLD/*.err
/CPLD/sdmapper_html/fit
/CPLD/sdmapper_html/images
/CPLD/sdmapper_html/tim
/CPLD/xlnx_auto_0_xdb
/CPLD/xst/work
/driver/DRIVER.BIN
Expand Down
7 changes: 3 additions & 4 deletions CPLD/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ ${DESIGN}.jed: ${DESIGN}.vm6
hprep6 -s IEEE1149 -n ${DESIGN} -i ${DESIGN}

# Clean up all the files from the Vivado run
clean :
clean:
rm -rf *.ngd *.bit *.map *.bld *.xml *.html *.jed *.nga *.err \
*.xrpt *.txt *.pad *.csv xlnx_auto* _xmsgs *.lso *_html *.xml \
*.ngc *.ngr *.srp *.lst *.gyd *.mfd *.pnx *.rpt *.vm6

# Tar and compress all the files
#tar :
# tar -zcvf ${DESIGN}.tar.gz *.ncd *.ngd *.mrp *.map *.par *.bld *.pcf *.bgn \
# Makefile
tar:
tar -czvf ${DESIGN}.tar.gz *.ipf *.xsl *.prj *.svf *.xise *.xst *.xsvf Makefile
4 changes: 4 additions & 0 deletions CPLD/sdmapper.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vhdl work "src/sd.vhd"
vhdl work "src/megamapper.vhd"
vhdl work "src/exp_slot.vhd"
vhdl work "src/sdmapper.vhd"
29 changes: 29 additions & 0 deletions CPLD/sdmapper.xst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set -tmpdir "/tmp"
set -xsthdpdir "xst"
run
-ifn sdmapper.prj
-ifmt mixed
-ofn sdmapper
-ofmt NGC
-p xc9500xl
-top sdmapper
-opt_mode Speed
-opt_level 2
-iuc NO
-keep_hierarchy Yes
-netlist_hierarchy As_Optimized
-rtlview Yes
-hierarchy_separator /
-bus_delimiter <>
-case Maintain
-verilog2001 YES
-fsm_extract YES -fsm_encoding Auto
-safe_implementation No
-mux_extract Yes
-resource_sharing YES
-iobuf YES
-pld_mp YES
-pld_xp YES
-pld_ce YES
-wysiwyg NO
-equivalent_register_removal YES
44 changes: 0 additions & 44 deletions Hardware/PCAD/gerber/SD-MAPPER-FINAL_VERSION.ERR

This file was deleted.

Loading

0 comments on commit 3797dfe

Please sign in to comment.