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: whitequark/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e4c02c8ff1ce^
Choose a base ref
...
head repository: whitequark/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50be78cd8a65
Choose a head ref
  • 2 commits
  • 39 files changed
  • 1 contributor

Commits on Dec 18, 2018

  1. Copy the full SHA
    e4c02c8 View commit details
  2. Copy the full SHA
    50be78c View commit details
Showing with 65 additions and 81 deletions.
  1. +1 −1 software/glasgow/access/__init__.py
  2. +1 −1 software/glasgow/access/direct/multiplexer.py
  3. +1 −1 software/glasgow/access/simulation/demultiplexer.py
  4. +2 −2 software/glasgow/access/simulation/multiplexer.py
  5. +1 −1 software/glasgow/applet/__init__.py
  6. +1 −1 software/glasgow/applet/benchmark/__init__.py
  7. +2 −2 software/glasgow/applet/hd44780/__init__.py
  8. +1 −1 software/glasgow/applet/i2c_master/__init__.py
  9. +2 −2 software/glasgow/applet/jtag/__init__.py
  10. +2 −2 software/glasgow/applet/jtag_pinout/__init__.py
  11. +2 −2 software/glasgow/applet/nand_flash/__init__.py
  12. +1 −1 software/glasgow/applet/program_ice40/__init__.py
  13. +2 −2 software/glasgow/applet/rgb_grabber/__init__.py
  14. +1 −1 software/glasgow/applet/selftest/__init__.py
  15. +2 −2 software/glasgow/applet/shugart_floppy/__init__.py
  16. +1 −1 software/glasgow/applet/spi_flash_avr/__init__.py
  17. +2 −2 software/glasgow/applet/spi_master/__init__.py
  18. +1 −1 software/glasgow/applet/swd/__init__.py
  19. +1 −1 software/glasgow/applet/uart/__init__.py
  20. +1 −1 software/glasgow/applet/vga_output/__init__.py
  21. +1 −1 software/glasgow/applet/vga_terminal/__init__.py
  22. +1 −1 software/glasgow/applet/vga_terminal/cpu.py
  23. +5 −1 software/glasgow/gateware/__init__.py
  24. +3 −4 software/glasgow/gateware/analyzer.py
  25. +2 −2 software/glasgow/gateware/boneless.py
  26. +4 −4 software/glasgow/gateware/fx2.py
  27. +2 −8 software/glasgow/gateware/i2c.py
  28. +1 −2 software/glasgow/gateware/lfsr.py
  29. +2 −13 software/glasgow/gateware/mpsse.py
  30. +2 −2 software/glasgow/gateware/pads.py
  31. +1 −1 software/glasgow/gateware/platform/lattice.py
  32. +1 −1 software/glasgow/gateware/pll.py
  33. +2 −2 software/glasgow/gateware/registers.py
  34. +2 −3 software/glasgow/gateware/uart.py
  35. +2 −2 software/glasgow/platform/__init__.py
  36. +1 −1 software/glasgow/platform/programmer.py
  37. +3 −3 software/glasgow/target/analyzer.py
  38. +1 −1 software/glasgow/target/hardware.py
  39. +1 −1 software/glasgow/target/simulation.py
2 changes: 1 addition & 1 deletion software/glasgow/access/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABCMeta, abstractmethod
from migen import *
from nmigen.compat import *

from ..gateware.pads import Pads

2 changes: 1 addition & 1 deletion software/glasgow/access/direct/multiplexer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from migen import *
from nmigen.compat import *

from .. import AccessMultiplexer, AccessMultiplexerInterface

2 changes: 1 addition & 1 deletion software/glasgow/access/simulation/demultiplexer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import asyncio
from migen import *
from nmigen.compat import *

from ...support.logging import *
from .. import AccessDemultiplexer, AccessDemultiplexerInterface
4 changes: 2 additions & 2 deletions software/glasgow/access/simulation/multiplexer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from migen import *
from migen.genlib.fifo import _FIFOInterface, AsyncFIFO, SyncFIFOBuffered
from nmigen.compat import *
from nmigen.compat.genlib.fifo import _FIFOInterface, AsyncFIFO, SyncFIFOBuffered

from .. import AccessMultiplexer, AccessMultiplexerInterface
from ...gateware.fx2 import _FIFOWithFlush
2 changes: 1 addition & 1 deletion software/glasgow/applet/__init__.py
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ async def run(self, args):
import threading
import inspect
import json
from migen.sim import *
from nmigen.compat.sim import *

from ..access.simulation import *
from ..access.direct import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import asyncio
import struct
import time
from migen import *
from nmigen.compat import *

from .. import *
from ...gateware.lfsr import *
4 changes: 2 additions & 2 deletions software/glasgow/applet/hd44780/__init__.py
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
import math
import argparse
import logging
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg

from .. import *

2 changes: 1 addition & 1 deletion software/glasgow/applet/i2c_master/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import logging
import math
from migen import *
from nmigen.compat import *

from .. import *
from ...support.pyrepl import *
4 changes: 2 additions & 2 deletions software/glasgow/applet/jtag/__init__.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
import logging
import asyncio
from bitarray import bitarray
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg

from .. import *
from ...support.pyrepl import *
4 changes: 2 additions & 2 deletions software/glasgow/applet/jtag_pinout/__init__.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
import asyncio
import random
from functools import reduce
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg

from .. import *
from ...gateware.pads import *
4 changes: 2 additions & 2 deletions software/glasgow/applet/nand_flash/__init__.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
import logging
import asyncio
import struct
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg

from .. import *
from ...database.jedec import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/program_ice40/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import math
import argparse
import logging
from migen import *
from nmigen.compat import *

from .. import *

4 changes: 2 additions & 2 deletions software/glasgow/applet/rgb_grabber/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import math
from migen import *
from migen.genlib.cdc import *
from nmigen.compat import *
from nmigen.compat.genlib.cdc import *

from .. import *

2 changes: 1 addition & 1 deletion software/glasgow/applet/selftest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import asyncio
from migen import *
from nmigen.compat import *

from .. import *

4 changes: 2 additions & 2 deletions software/glasgow/applet/shugart_floppy/__init__.py
Original file line number Diff line number Diff line change
@@ -299,8 +299,8 @@
import itertools
import crcmod
import math
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg

from .. import *
from ...gateware.pads import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/spi_flash_avr/__init__.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import asyncio
import argparse
import collections
from migen import *
from nmigen.compat import *
from fx2.format import autodetect, input_data, output_data

from .. import *
4 changes: 2 additions & 2 deletions software/glasgow/applet/spi_master/__init__.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
import logging
import asyncio
import math
from migen import *
from migen.genlib.cdc import *
from nmigen.compat import *
from nmigen.compat.genlib.cdc import *

from .. import *

2 changes: 1 addition & 1 deletion software/glasgow/applet/swd/__init__.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import asyncio
import struct
import math
from migen import *
from nmigen.compat import *

from .. import *
from ...gateware.pads import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/uart/__init__.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import sys
import logging
import asyncio
from migen import *
from nmigen.compat import *

from .. import *
from ...gateware.pads import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/vga_output/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from migen import *
from nmigen.compat import *

from .. import *
from ...gateware.pads import *
2 changes: 1 addition & 1 deletion software/glasgow/applet/vga_terminal/__init__.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import asyncio
import logging
import argparse
from migen import *
from nmigen.compat import *

from .. import *
from ..vga_output import VGAOutputApplet
2 changes: 1 addition & 1 deletion software/glasgow/applet/vga_terminal/cpu.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@
# * JN off ≡ if(A < 0) PC ← PC + signext(off)
# * HLT ≡ halt

from migen import *
from nmigen.compat import *


__all__ = [
6 changes: 5 additions & 1 deletion software/glasgow/gateware/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import functools
from migen import *
import os
if os.getenv("NMIGEN"):
from nmigen.compat import run_simulation
else:
from nmigen.compat import run_simulation


__all__ = ["GatewareBuildError", "simulation_test"]
7 changes: 3 additions & 4 deletions software/glasgow/gateware/analyzer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from functools import reduce
from collections import OrderedDict
from migen import *
from migen.genlib.fifo import _FIFOInterface, SyncFIFOBuffered
from migen.genlib.coding import PriorityEncoder, PriorityDecoder
from nmigen.compat import *
from nmigen.compat.genlib.fifo import _FIFOInterface, SyncFIFOBuffered
from nmigen.compat.genlib.coding import PriorityEncoder, PriorityDecoder


__all__ = ["EventSource", "EventAnalyzer", "TraceDecodingError", "TraceDecoder"]
@@ -489,7 +489,6 @@ def is_done(self):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog

from . import simulation_test

4 changes: 2 additions & 2 deletions software/glasgow/gateware/boneless.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from migen import *
from nmigen.compat import *

from ..arch.boneless.opcode import *

@@ -785,7 +785,7 @@ def test_JSLE(self, tb):
# -------------------------------------------------------------------------------------------------

import argparse
from migen.fhdl import verilog
from nmigen.compat.fhdl import verilog


class BonelessTestbench(Module):
8 changes: 4 additions & 4 deletions software/glasgow/gateware/fx2.py
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@
# FIFOADR->FLAG 10.7
# FIFOADR->FIFODATA 14.3

from migen import *
from migen.genlib.cdc import MultiReg
from migen.genlib.fifo import _FIFOInterface, AsyncFIFO, SyncFIFO, SyncFIFOBuffered
from migen.genlib.resetsync import AsyncResetSynchronizer
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg
from nmigen.compat.genlib.fifo import _FIFOInterface, AsyncFIFO, SyncFIFO, SyncFIFOBuffered
from nmigen.compat.genlib.resetsync import AsyncResetSynchronizer


__all__ = ["FX2Arbiter"]
10 changes: 2 additions & 8 deletions software/glasgow/gateware/i2c.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# I2C reference: https://www.nxp.com/docs/en/user-guide/UM10204.pdf

from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg


__all__ = ['I2CSlave']
@@ -397,7 +397,6 @@ def __init__(self, pads):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog

from . import simulation_test

@@ -856,8 +855,3 @@ class _DummyPads(Module):
def __init__(self):
self.scl_t = TSTriple()
self.sda_t = TSTriple()


if __name__ == "__main__":
verilog.convert(I2CMaster(_DummyPads(), 16)).write("i2cmaster.v")
verilog.convert(I2CSlave(_DummyPads())).write("i2cslave.v")
3 changes: 1 addition & 2 deletions software/glasgow/gateware/lfsr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from migen import *
from nmigen.compat import *


__all__ = ["LinearFeedbackShiftRegister"]
@@ -54,7 +54,6 @@ def generate(self):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog

from . import simulation_test

15 changes: 2 additions & 13 deletions software/glasgow/gateware/mpsse.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
# http://www.ftdichip.com/Support/Documents/AppNotes/AN_135_MPSSE_Basics.pdf
# http://www.ftdichip.com/Support/Documents/AppNotes/ AN_108_Command_Processor_for_MPSSE_and_MCU_Host_Bus_Emulation_Modes.pdf

from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg


__all__ = ['MPSSE']
@@ -427,7 +427,6 @@ def __init__(self, pads):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog

from . import simulation_test

@@ -740,13 +739,3 @@ def test_write_single_byte_clkwrong(self, tb):
self.assertEqual((yield from tb.recv_tdi(8, pos=False)), 0xA5)
yield
self.assertEqual((yield tb.tck.o), 0)


if __name__ == "__main__":
tck = TSTriple()
tdi = TSTriple()
tdo = TSTriple()
tms = TSTriple()
engine = MPSSE([tck, tdi, tdo, tms])

verilog.convert(engine).write("mpsse.v")
4 changes: 2 additions & 2 deletions software/glasgow/gateware/pads.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from migen import *
from nmigen.compat import *


__all__ = ['Pads']
@@ -82,7 +82,7 @@ def _add_elem(self, elem, name=None, index=None):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl.specials import Tristate
from nmigen.compat.fhdl.specials import Tristate


class PadsTestCase(unittest.TestCase):
2 changes: 1 addition & 1 deletion software/glasgow/gateware/platform/lattice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from migen import *
from nmigen.compat import *

from .. import GatewareBuildError
from ..pll import PLL
2 changes: 1 addition & 1 deletion software/glasgow/gateware/pll.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from migen.fhdl.specials import Special
from nmigen.compat.fhdl.specials import Special


__all__ = ["PLL"]
4 changes: 2 additions & 2 deletions software/glasgow/gateware/registers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from migen import *
from nmigen.compat import *


__all__ = ["Registers", "I2CRegisters"]
@@ -78,7 +78,7 @@ def do_finalize(self):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog
from nmigen.compat.fhdl import verilog

from . import simulation_test
from .i2c import I2CSlaveTestbench
5 changes: 2 additions & 3 deletions software/glasgow/gateware/uart.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from migen import *
from migen.genlib.cdc import MultiReg
from nmigen.compat import *
from nmigen.compat.genlib.cdc import MultiReg


__all__ = ['UART', 'uart_bit_cyc']
@@ -292,7 +292,6 @@ def calc_parity(sig, kind):
# -------------------------------------------------------------------------------------------------

import unittest
from migen.fhdl import verilog

from . import simulation_test

Loading