-m util.fusecli

Examine and modify fuses using symbolic names and values.

The set of fuses to operate on is specified using a set of hierarchical selectors. Each level of the selector can match either a single numbered entity (e.g. MC3, PT1), or all numbered entities on the same level (e.g. PT, GOE).

If the requested operation is to examine fuses, the names and values of all selected fuses are printed to standard output. If no selector is specified, all fuses are selected.

If the requested operation is to modify fuses, the values of all selected fuses are changed to the value specified on the command line.

When modifying product term fuses, multiple choices can be specified as a single comma-separated value. It is possible to modify (rather than replace) product term fuses by prefixing all choices with + or -. The special value VCC sets all fuses to 1, and the special value GND sets all fuses to 0.

usage: python3 -m util.fusecli [-h] [-v] [-d DEVICE] MANGLE COMMAND ...

Positional Arguments

MANGLE

Manipulate fuses in JED file MANGLE.

COMMAND

Possible choices: get, set

Operation to perform.

options

-v, --verbose

Show fuse indexes and states next to the symbolic value.

Default: False

-d, --device

Possible choices: ATF1502AS, ATF1502BE, ATF1504AS, ATF1504BE

Select the device to use.

Default: “ATF1502AS”

Sub-commands:

get

Examine fuse states.

python3 -m util.fusecli get [-h] [SELECTOR ...]

Positional Arguments

SELECTOR

Print values of fuses that match SELECTOR.

set

Modify fuse states.

python3 -m util.fusecli set [-h] ...

Positional Arguments

SELECTOR VALUE

Change values of fuses that match SELECTOR to be VALUE.

Examples

Examining fuses

To print all known fuses:

$ python3 -m util.fusecli design.jed get
MC1:
  PT1: GND
  PT2: GND
[output trimmed]

To print macrocell MC1 product term PT1:

$ python3 -m util.fusecli design.jed get MC1.PT1
MC1:
  PT1: GND

To print all product terms of macrocell MC1:

$ python3 -m util.fusecli design.jed get MC1.PT
MC1:
  PT1: GND
  PT2: GND
  PT3: GND
  PT4: GND
  PT5: GND

To print option gclk_mux of every macrocell:

$ python3 -m util.fusecli design.jed get MC.gclk_mux
MC1:
  CFG:
    gclk_mux       = GCLK2
MC2:
  CFG:
    gclk_mux       = GCLK2
MC3:
[output trimmed]

To print options pt1_mux and pt2_mux of every macrocell:

$ python3 -m util.fusecli design.jed get MC.pt1_mux MC.pt2_mux
MC1:
  CFG:
    pt1_mux        = sum
    pt2_mux        = sum
MC2:
[output trimmed]

Modifying fuses

To change option gclk_mux of macrocell MC8 to be GCLK2:

$ python3 -m util.fusecli design.jed set MC8.gclk_mux GCLK2
MC8:
  CFG:
    gclk_mux       = GCLK2
Changed 1 fields, 2 fuses.

To change option low_power of every macrocell to be on:

$ python3 -m util.fusecli design.jed set MC.low_power on
MC1:
  CFG:
    low_power      = on
[output trimmed]
MC32:
  CFG:
    low_power      = on
Changed 32 fields, 32 fuses.

To change options pt1_mux and pt2_mux of every macrocell to be sum:

$ python3 -m util.fusecli design.jed set MC.pt1_mux sum MC.pt2_mux sum
MC1:
  CFG:
    pt1_mux        = sum
[output trimmed]
MC32:
  CFG:
    pt2_mux        = sum
Changed 64 fields, 0 fuses.

To set product term PT1 of macrocell MC1 to UIM2_P & UIM4_N:

$ python3 -m util.fusecli design.jed set MC1.PT1 UIM2_P,UIM4_N
MC1:
  PT1: UIM2_P,UIM4_N
Changed 1 fields, 94 fuses.
$ python3 -m util.fusecli design.jed get MC1.PT1
MC1:
  PT1: UIM2_P & UIM4_N

To remove UIM4_N from product term PT1 of macrocell MC1 and add UIM8_P instead:

$ python3 -m util.fusecli design.jed set MC1.PT1 -UIM4_N,+UIM8_P
MC1:
  PT1: -UIM4_N,+UIM8_P
Changed 1 fields, 2 fuses.
$ python3 -m util.fusecli design.jed get MC1.PT1
MC1:
  PT1: UIM2_P & UIM8_P

To clear product term PT1 of every macrocell:

$ python3 -m util.fusecli design.jed set MC.PT1 GND
MC1:
  PT1: GND
[output trimmed]
MC32:
  PT1: GND
Changed 32 fields, 94 fuses.