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
//*********************************************************************************************************************************** | |
// ForcedASCII we'll never allow Unicode that does not match to ASCII | |
// see https://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt for sample text to test | |
//*********************************************************************************************************************************** | |
private string ForcedASCII(string fromString) | |
{ | |
string res = ""; | |
try | |
{ | |
Byte[] bytes; |
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
#!/bin/bash | |
#"***************************************************************************************************" | |
# CheckForGitFileChange() bash function. Compare hash of local file to one on GitHub | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2020 gojimmypi | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
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
PROJ = ulx3s_adda | |
sim: | |
rm -f $(PROJ).vcd | |
iverilog -o $(PROJ).vvp $(PROJ).v $(PROJ)_tb.v | |
vvp $(PROJ).vvp | |
export DISPLAY=:0 | |
## if we are running in WSL, we need a bit of help for GUI XWindows | |
## and sometimes the WSL username is not the same as the Windows username & we need the *windows* user path. | |
## this is the Windows %USER% environment variable when called from makefile: $(shell cmd.exe /c "echo $$USER") |
This file has been truncated, but you can view the full file.
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
.comment arachne-pnr 0.1+325+0 (git sha1 840bdfd, g++ 7.3.0-27ubuntu1~18.04 -O2) | |
.device 8k | |
.io_tile 1 0 | |
000000000000000000 | |
000000000000000000 | |
000000000000000000 | |
000000000000000000 | |
000000000000000000 | |
000000000000000000 | |
000000000000000000 |
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
#!/bin/bash | |
# see https://github.com/svn2github/sdcc/blob/master/sdcc/doc/INSTALL.txt | |
cd ~ | |
mkdir -p temp | |
cd temp | |
# see http://sdcc.sourceforge.net/snap.php for fresh links: | |
wget http://sourceforge.net/projects/sdcc/files/snapshot_builds/amd64-unknown-linux2.5/sdcc-snapshot-amd64-unknown-linux2.5-20190216-10960.tar.bz2 | |
tar xjf sdcc-snapshot-amd64-unknown-linux2.5-20190216-10960.tar.bz2 |
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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install python-setuptools | |
sudo apt-get install python3-setuptools | |
# see https://gist.github.com/gojimmypi/b570c4c0dab4a5d65d03c89071e9d037 for most recent sdcc | |
sudo apt-get install sdcc | |
cd ~/workspace | |
git clone https://github.com/whitequark/Glasgow | |
git submodule update --init --recursive |
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
.PHONY: all | |
.DELETE_ON_ERROR: | |
TOPMOD := blinky | |
VLOGFIL := $(TOPMOD).v | |
VCDFILE := $(TOPMOD).vcd | |
SIMPROG := $(TOPMOD)_tb | |
RPTFILE := $(TOPMOD).rpt | |
BINFILE := $(TOPMOD).bin | |
SIMFILE := $(SIMPROG).cpp | |
VDIRFB := ./obj_dir |
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
#!/bin/bash | |
WORKSPACE=~/workspace # put your workspace parent directory here. avoid spaces in path | |
export ULX3S_COM=/dev/ttyS8 # put your device name here | |
# This WSL Ubuntu bash script will update the system, fetch all dependencies, and git clone | |
# all of the libraries for running the @DoctorWkt Blinky for the ecp5 ULX3S Board | |
# including icestorm, nextpnr (or arachne-pnr), yosys | |
# | |
# | |
# A WSL-specific Makefile will also be fetched. (TODO) |
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
version = 1.2 | |
riscvbin = /opt/riscv32i/bin/ | |
tinyFPGA_COM ?= /dev/ttyS8 | |
upload: hardware.bin firmware.bin | |
sudo chmod 0666 $(tinyFPGA_COM) | |
tinyprog --com $(tinyFPGA_COM) -p hardware.bin -u firmware.bin | |
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
version = 1.2 | |
riscvbin = /opt/riscv32i/bin/ | |
tinyFPGA_COM ?= /dev/ttyS8 | |
upload: hardware.bin firmware.bin | |
sudo chmod 0666 $(tinyFPGA_COM) | |
tinyprog --com $(tinyFPGA_COM) -p hardware.bin -u firmware.bin | |
hardware.blif: hardware.v spimemio.v simpleuart.v picosoc.v picorv32.v |