Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c037621aba3f
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f7ca5db0d64d
Choose a head ref

Commits on Jun 15, 2020

  1. applet.memory.floppy: add --ignore-data-crc option.

    Useful for really bad floppies.
    whitequark committed Jun 15, 2020
    Copy the full SHA
    65d9f8a View commit details
  2. applet.memory.floppy: tune PLL parameters.

    Seems to result in much better data recovery (better than my USB
    floppy drive).
    whitequark committed Jun 15, 2020
    Copy the full SHA
    b645b7c View commit details
  3. Copy the full SHA
    9211ac7 View commit details
  4. Copy the full SHA
    8144f96 View commit details

Commits on Jun 16, 2020

  1. Copy the full SHA
    1dc2ae5 View commit details
  2. Copy the full SHA
    c3425ba View commit details

Commits on Jun 17, 2020

  1. Copy the full SHA
    b5edd41 View commit details

Commits on Jun 29, 2020

  1. Copy the full SHA
    698e520 View commit details
  2. Copy the full SHA
    f885790 View commit details

Commits on Jul 4, 2020

  1. Copy the full SHA
    2ef6d7f View commit details
  2. applet.sensor.pmsx003: unmark as preview.

    Also, verified that it works fine with PMS7003.
    whitequark committed Jul 4, 2020
    Copy the full SHA
    b6d4c02 View commit details
  3. Copy the full SHA
    ad77968 View commit details

Commits on Jul 21, 2020

  1. Copy the full SHA
    39ec83c View commit details
  2. cli: fix intermittent analyzer error.

    Due to a logic error, sometimes analyzer would crash with a message
    similar to:
    
        vcd.writer.VCDPhaseError: Out of order timestamp: 171587604
    whitequark committed Jul 21, 2020
    Copy the full SHA
    77812e0 View commit details
  3. Copy the full SHA
    64e8f43 View commit details

Commits on Jul 22, 2020

  1. software: include FX2 firmware in the repository.

    This has several significant benefits:
      * End users no longer have to install sdcc, which can be difficult
        on Windows, and still adds complexity elsewhere.
      * Updating a source checkout is simplified, and firmware/software
        mismatch is no longer possible.
      * setup.py is simplified, and the odd breakage we had in the past
        is no longer possible. It will also be easier to convert it to
        the declarative format in the future.
    whitequark committed Jul 22, 2020
    Copy the full SHA
    36dacc9 View commit details
  2. applet.memory.27x: increase default read latency to 500 ns.

    It seems like for some really old EPROMs, like NEC D2732D, 250 ns is
    not quite enough, and 500 ns would be safer.
    whitequark committed Jul 22, 2020
    Copy the full SHA
    10783d8 View commit details
  3. Copy the full SHA
    d3c57ae View commit details
  4. Copy the full SHA
    72cb28b View commit details

Commits on Jul 23, 2020

  1. Copy the full SHA
    9db881d View commit details

Commits on Jul 24, 2020

  1. Copy the full SHA
    0ede862 View commit details
  2. Copy the full SHA
    ad32342 View commit details
  3. applet.memory.prom: new applet, replacing memory.27x.

    The applet has been completely rewritten with a nicer implementation,
    dramatically improved performance, and support for indirectly
    addressing memories with many address lines through a shift register.
    whitequark committed Jul 24, 2020
    Copy the full SHA
    826d8f4 View commit details
  4. Copy the full SHA
    f0dedfd View commit details
  5. Copy the full SHA
    ac06273 View commit details
  6. support.logging: add dump_mapseq.

    dump_seq() cannot display the length of a map() or of a generator
    expression.
    whitequark committed Jul 24, 2020
    Copy the full SHA
    eef285f View commit details
  7. Copy the full SHA
    de16630 View commit details
  8. Copy the full SHA
    2f9b028 View commit details
  9. Copy the full SHA
    555e867 View commit details
  10. Copy the full SHA
    4d7975a View commit details
  11. applet.memory.prom: make address and length optional.

    The entire PROM is read or verified if these are not specified.
    whitequark committed Jul 24, 2020
    Copy the full SHA
    4203783 View commit details
  12. Copy the full SHA
    9c7e9f5 View commit details

Commits on Jul 26, 2020

  1. Copy the full SHA
    a9f9d29 View commit details
  2. Copy the full SHA
    130f004 View commit details
  3. applet.memory.prom: print values of unstable words.

    This can help e.g. with distinguishing signal integrity issues from
    bit rot issues.
    whitequark committed Jul 26, 2020
    Copy the full SHA
    33b3a62 View commit details

Commits on Jul 27, 2020

  1. applet.memory.prom: add health histogram command.

    With the accompanying tool.
    whitequark committed Jul 27, 2020
    Copy the full SHA
    2199108 View commit details
  2. Copy the full SHA
    fdfa5b7 View commit details
  3. applet.memory.prom: add atmel write command.

    Also, make queueing actually work by escaping the RUN command if it
    happens to occur inside the buffered block.
    whitequark committed Jul 27, 2020
    Copy the full SHA
    ccce692 View commit details
  4. Copy the full SHA
    1118602 View commit details
  5. Copy the full SHA
    77b98cd View commit details
  6. Copy the full SHA
    9cb07a0 View commit details
  7. Copy the full SHA
    1a7bf7a View commit details
  8. applet.memory.prom: encourage (sic) metastability during reads.

    This change is tested with Atmel AT29C flash and may or may not have
    any effect on other memories. In case of this Atmel flash, output
    buffers have parasitic feedback (likely through power supply) and
    will oscillate if encouraged, e.g. if OE is kept asserted, or if data
    transitions are maximized.
    whitequark committed Jul 27, 2020
    Copy the full SHA
    8b9bc15 View commit details

Commits on Jul 28, 2020

  1. Copy the full SHA
    79d6716 View commit details
  2. applet: metaclass improvements for abstract applet base classes.

      * Make GlasgowAppletMeta inherit from ABCMeta.
      * Make build() and run() abstract methods.
      * Allow inheriting from GlasgowApplet without specifying a name.
        This results in an abstract applet, which is not registered in
        the applet database, and can be used to provide shared functions
        to other applets (usually, the interactive frontend).
    whitequark committed Jul 28, 2020
    Copy the full SHA
    36f8b39 View commit details
  3. applet.avr: split CLI frontend off applet.program.avr.

    Other AVR programming interfaces generally expose the same features,
    and they should share the frontend.
    whitequark committed Jul 28, 2020
    Copy the full SHA
    574986c View commit details
  4. cli: fix path logging.

    whitequark committed Jul 28, 2020
    Copy the full SHA
    a6afac4 View commit details
  5. cli: use built-in Python 3.8 mechanism to handle Ctrl+C on Windows.

    The one in support.asignal never worked on Windows, anyway.
    whitequark committed Jul 28, 2020
    Copy the full SHA
    169456e View commit details
  6. Copy the full SHA
    6756333 View commit details
  7. Copy the full SHA
    2917a10 View commit details
Showing with 42,556 additions and 19,930 deletions.
  1. +0 −1 .gitignore
  2. +3 −11 .travis.yml
  3. +7 −8 README.md
  4. +1 −1 docs/archive
  5. +9 −3 examples/boilerplate.py
  6. +1 −0 firmware/.gitignore
  7. +308 −220 hardware/boards/glasgow/glasgow-cache.lib
  8. +16,805 −15,786 hardware/boards/glasgow/glasgow.kicad_pcb
  9. +183 −12 hardware/boards/glasgow/glasgow.pro
  10. +579 −572 hardware/boards/glasgow/glasgow.sch
  11. +36 −31 hardware/boards/glasgow/io_banks.sch
  12. +991 −734 hardware/boards/glasgow/io_buffer.sch
  13. +34 −0 hardware/footprints/Glasgow.pretty/Crystal_SMD_3225-4Pin_3.2x2.5mm.kicad_mod
  14. +13 −13 hardware/footprints/Glasgow.pretty/DFN-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalVias.kicad_mod
  15. +38 −0 hardware/footprints/Glasgow.pretty/D_SOD-323.kicad_mod
  16. +38 −0 hardware/footprints/Glasgow.pretty/D_SOD-523.kicad_mod
  17. +213 −0 hardware/footprints/Glasgow.pretty/PinHeader_2x22_P1.27mm_Vertical__SMD.kicad_mod
  18. +37 −0 hardware/footprints/Glasgow.pretty/R_Array_Convex_4x0402.kicad_mod
  19. +35 −0 hardware/footprints/Glasgow.pretty/SOT-23-5.kicad_mod
  20. +36 −0 hardware/footprints/Glasgow.pretty/SOT-23-6.kicad_mod
  21. +35 −0 hardware/footprints/Glasgow.pretty/SOT-23.kicad_mod
  22. +35 −0 hardware/footprints/Glasgow.pretty/SOT-323_SC-70.kicad_mod
  23. +36 −0 hardware/footprints/Glasgow.pretty/SOT-363_SC-70-6.kicad_mod
  24. +27 −11 hardware/footprints/Glasgow.pretty/SOT-563.kicad_mod
  25. +44 −0 hardware/footprints/Glasgow.pretty/UDFN-14_3.5x1.35mm_P0.5mm.kicad_mod
  26. +29 −29 hardware/footprints/Glasgow.pretty/UDFN-18-3EP_5.5x1.5mm_P0.5mm_EP0.5x0.5mm.kicad_mod
  27. +29 −29 hardware/footprints/Glasgow.pretty/UDFN-18_5.5x1.5mm_P0.5mm.kicad_mod
  28. +51 −0 hardware/footprints/Glasgow.pretty/USB_C_Receptacle_HRO_TYPE-C-31-M-12.kicad_mod
  29. +48 −0 hardware/footprints/Glasgow.pretty/USB_Micro-B_Molex_47346-0001.kicad_mod
  30. +2,778 −0 hardware/footprints/Glasgow.pretty/nono_hana_lines.kicad_mod
  31. +1 −0 hardware/packages3D/README.txt
  32. +16,979 −0 hardware/packages3D/USB_C_Receptacle_HRO_TYPE-C-31-M-12.step
  33. +6 −0 hardware/symbols/Glasgow.dcm
  34. +141 −0 hardware/symbols/Glasgow.lib
  35. +11 −0 software/Makefile
  36. +7 −2 software/glasgow/access/direct/arguments.py
  37. +7 −10 software/glasgow/access/direct/demultiplexer.py
  38. +1 −1 software/glasgow/access/simulation/demultiplexer.py
  39. +38 −28 software/glasgow/applet/__init__.py
  40. +3 −1 software/glasgow/applet/all.py
  41. +133 −0 software/glasgow/applet/interface/analyzer/__init__.py
  42. +12 −4 software/glasgow/applet/interface/jtag_probe/__init__.py
  43. +26 −12 software/glasgow/applet/memory/floppy/__init__.py
  44. +1 −1 software/glasgow/applet/memory/floppy/mfm.py
  45. +841 −0 software/glasgow/applet/memory/prom/__init__.py
  46. +306 −1 software/glasgow/applet/program/avr/__init__.py
  47. +0 −454 software/glasgow/applet/program/avr/spi.py
  48. +314 −0 software/glasgow/applet/program/avr/spi/__init__.py
  49. +1 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_calibration.json
  50. +40 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_eeprom.json
  51. +37 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_fuses.json
  52. +15 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_lock_bits.json
  53. +403 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_program_memory.json
  54. +3 −0 software/glasgow/applet/program/avr/spi/fixtures/test_api_signature.json
  55. +170 −0 software/glasgow/applet/sensor/pmsx003/__init__.py
  56. +0 −2 software/glasgow/applet/video/vga_terminal/LICENSE.txt
  57. +0 −271 software/glasgow/applet/video/vga_terminal/__init__.py
  58. +0 −264 software/glasgow/applet/video/vga_terminal/cpu.py
  59. BIN software/glasgow/applet/video/vga_terminal/ibmvga8x14.bin
  60. BIN software/glasgow/applet/video/vga_terminal/ibmvga8x16.bin
  61. BIN software/glasgow/applet/video/vga_terminal/ibmvga8x8.bin
  62. BIN software/glasgow/applet/video/vga_terminal/ibmvga8x8hi.bin
  63. +0 −262 software/glasgow/arch/boneless/__init__.py
  64. +0 −144 software/glasgow/arch/boneless/instr.py
  65. +0 −75 software/glasgow/arch/boneless/opcode.py
  66. +18 −11 software/glasgow/cli.py
  67. +2 −0 software/glasgow/database/microchip/avr.py
  68. +486 −0 software/glasgow/firmware.ihex
  69. +3 −2 software/glasgow/gateware/__init__.py
  70. +2 −2 software/glasgow/gateware/analyzer.py
  71. +0 −844 software/glasgow/gateware/boneless.py
  72. +1 −13 software/glasgow/support/asignal.py
  73. +4 −2 software/glasgow/support/data_logger.py
  74. +45 −1 software/glasgow/support/logging.py
  75. +9 −9 software/glasgow/support/task_queue.py
  76. +10 −52 software/setup.py
  77. +1 −1 vendor/libfx2
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ build/
*.v
*.vcd
*.gtkw
*.ihex
*.log
*.*b[ac]k
_autosave-*
14 changes: 3 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -7,19 +7,11 @@ python:
addons:
apt:
update: true
cache:
directories:
- "$HOME/.ccache"
- "$HOME/.local"
before_install:
- export PATH="/usr/lib/ccache:$HOME/.local/bin:$PATH"
- sudo apt install sdcc
- pip install yowasp-yosys yowasp-nextpnr-ice40-5k yowasp-nextpnr-ice40-8k
- export YOSYS=yowasp-yosys NEXTPNR_ICE40=yowasp-nextpnr-ice40 ICEPACK=yowasp-icepack
install:
- "(cd vendor/libfx2/software && SDAR='sdcclib r' python setup.py install)"
- git clone https://github.com/YosysHQ/yosys
- (cd yosys && if ! yosys -V || [ $(git rev-parse HEAD $(yosys -V | awk 'match($0,/sha1 ([0-9a-f]+)/,m) { print m[1] }') | uniq | wc -l) != 1 ]; then make CONFIG=gcc ENABLE_ABC=1 PREFIX=$HOME/.local install; fi)
- git clone https://github.com/YosysHQ/nextpnr
- (cd nextpnr && if ! nextpnr-ice40 --version || [ $(git rev-parse HEAD $(nextpnr-ice40 --version | awk 'match($0,/sha1 ([0-9a-f]+)/,m) { print m[1] }') | uniq | wc -l) != 1 ]; then sudo apt install libeigen3-dev python3-dev libboost-all-dev && (git clone https://github.com/cliffordwolf/icestorm && cd icestorm && make ICEPROG=0 PREFIX=$HOME/.local install) && mkdir build-ice40 && cd build-ice40 && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DBUILD_GUI=OFF -DARCH=ice40 -DICEBOX_ROOT=$HOME/.local/share/icebox && make install; fi)
script:
- "(cd software && python setup.py install)"
script:
- "(cd software && python -W ignore::DeprecationWarning test.py)"
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@ Some of the tasks Glasgow can do well are:
* determine memory parameters via SFDP,
* read and write ONFI-compatible Flash memories,
* determine memory parameters via ONFI parameter page,
* read and write parallel 27/28/29-series EPROMs, EEPROMs and Flash memories,
* determine the extent of floating gate charge decay and rescue data,
* program and verify AVR microcontrollers with SPI interface,
* automatically determine unknown JTAG pinout,
* play back JTAG SVF files,
@@ -80,36 +82,33 @@ Debugging new applets can be hard, especially if bidirectional buses are involve

**Multiple people have reported various issues with the installation instructions below. If any part of these does not work, please file it as a bug, so that the experience can be made more smooth for everyone.**

You will need git, build tools, sdcc, Python 3.7 (or a newer version, in which case replace `3.7` with that version below). On a Debian or Ubuntu system these can be installed with:
You will need git and Python 3.7 (or a newer version, in which case replace `3.7` with that version below). On a Debian or Ubuntu system these can be installed with:

apt-get install --no-install-recommends git build-essential sdcc \
python3.7 python3-setuptools python3-libusb1 python3-aiohttp python3-bitarray python3-crcmod
apt-get install --no-install-recommends git python3.7 python3-setuptools \
python3-libusb1 python3-aiohttp python3-bitarray python3-crcmod

You will also need Yosys and nextpnr-ice40, both from the master branch. Follow the setup instructions for [Yosys](https://github.com/yosysHQ/yosys/#setup) and [nextpnr](https://github.com/YosysHQ/nextpnr/#nextpnr-ice40).

Obtain the source code:

git clone https://github.com/GlasgowEmbedded/glasgow
cd glasgow
git submodule update --init vendor/libfx2

Configure your system to allow unprivileged access (for anyone in the `plugdev` group) to the Glasgow hardware:

sudo cp config/99-glasgow.rules /etc/udev/rules.d

Install the dependencies and the binaries for the current user:
Install the dependencies and the scripts for the current user:

cd software
python3.7 setup.py develop --user

The binaries are placed in `$HOME/.local/bin`, so be sure to add that directory to the `PATH` environment variable; after this, you can run `glasgow` from a terminal. Instead of adjusting `PATH` it is also possible to use `python3.7 -m glasgow.cli`.
The scripts are placed in `$HOME/.local/bin`, so be sure to add that directory to the `PATH` environment variable; after this, you can run `glasgow` from a terminal. Instead of adjusting `PATH` it is also possible to use `python3.7 -m glasgow.cli`.

To update the source code, do:

cd glasgow
git pull
cd software
python3.7 setup.py build_ext

### ... with Windows?

12 changes: 9 additions & 3 deletions examples/boilerplate.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import logging
import asyncio
from nmigen.compat import *
from nmigen import *

from ... import *


class BoilerplateSubtarget(Module):
class BoilerplateSubtarget(Elaboratable):
def __init__(self, pads, in_fifo, out_fifo):
pass
self.pads = pads
self.in_fifo = in_fifo
self.out_fifo = out_fifo

def elaborate(self, platform):
m = Module()
return m


class BoilerplateApplet(GlasgowApplet, name="boilerplate"):
1 change: 1 addition & 0 deletions firmware/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ihex
Loading