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: 4d7975a7d2a7
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4203783bbf7c
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 24, 2020

  1. 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
Showing with 6 additions and 3 deletions.
  1. +6 −3 software/glasgow/applet/memory/prom/__init__.py
9 changes: 6 additions & 3 deletions software/glasgow/applet/memory/prom/__init__.py
Original file line number Diff line number Diff line change
@@ -356,10 +356,10 @@ def length(arg):
p_read = p_operation.add_parser(
"read", help="read memory")
p_read.add_argument(
"address", metavar="ADDRESS", type=address,
"address", metavar="ADDRESS", type=address, nargs="?", default=0,
help="read memory starting at address ADDRESS, with wraparound")
p_read.add_argument(
"length", metavar="LENGTH", type=length,
"length", metavar="LENGTH", type=length, nargs="?",
help="read LENGTH bytes from memory")
p_read.add_argument(
"-f", "--file", metavar="FILENAME", type=argparse.FileType("wb"),
@@ -371,7 +371,7 @@ def length(arg):
p_verify = p_operation.add_parser(
"verify", help="verify memory")
p_verify.add_argument(
"address", metavar="ADDRESS", type=address,
"address", metavar="ADDRESS", type=address, nargs="?", default=0,
help="verify memory starting at address ADDRESS")
p_verify.add_argument(
"-f", "--file", metavar="FILENAME", type=argparse.FileType("rb"), required=True,
@@ -416,6 +416,9 @@ async def interact(self, device, args, prom_iface):
depth = 1 << a_bits

if args.operation == "read":
if args.length is None:
args.length = depth

data = await prom_iface.read_linear(args.address, args.length)
for word in data:
if args.file: