Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator
libnxembeddedtools.ngultra.bl1.DescriptorGenerator
class libnxembeddedtools.ngultra.bl1.DescriptorGenerator(desc_path, section_name)

Bases: object

This class is dedicated to the descriptor generation.

Parameters:
  • desc_path (str) – Final path of the BL1 descriptor.

  • section_name (str) – Name of the section from yaml configuration file.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.alignBinarySize
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.alignBinarySize
alignBinarySize(binary, align_to)

Add padding to binary to align it size to the need of BL1. BL1 retrieve the size of the binary in word (4 bytes) and then convert it back to bytes internally. If the size of the binary is not a multiple of 4 the final computed size will be incorrect.

Parameters:
  • binary() – Binary we want to align the size.

  • align_to (int) – Value to align to.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.buildPacketHeader
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.buildPacketHeader
buildPacketHeader(itemType, packetLength)

Create the header for the spacewire packets

Parameters:
  • itemType (int) – Type of packet

  • packetLength (int) – Size of the packet in bytes

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.generategenerateFlashBootDescriptor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.generategenerateFlashBootDescriptor
generate generateFlashBootDescriptor()

Generate the final descriptor for boot from flash.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.generateSpwPackets
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.generateSpwPackets
generateSpwPackets()

Generate packets according to the spacewire BL1 protocol.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetAsw
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetAsw
packetAsw(packets_list)

Create the application software (ASW) first packet containing information about the ASW binary. The created packet is added to the packets_list passed as parameter.

Parameters:

packets_list (list) – List to which to add the created packet.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetBitstream
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetBitstream
packetBitstream(packets_list)

Create the bitstream first packet containing information about the bitstream binary. The created packet is added to the packets_list passed as parameter.

Parameters:

packets_list (list) – List to which to add the created packet.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetData
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetData
packetData(binary)

Create one or more packets containing raw binary data of the bitstream or ASW passed as parameter. The created packets are added to the packets_list passed as parameter.

Parameters:

binary() – Bitstream or ASW binary.

Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetStartAddr
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.packetStartAddr
packetStartAddr(packets_list)
Anchor
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.zlibComputeCRC32
libnxembeddedtools.ngultra.bl1.DescriptorGenerator.zlibComputeCRC32
zlibComputeCRC32(source, previousCRC)

...

libnxembeddedtools.ngultra.bsm module

This module contains everything to program the BSM of NGUltra

Anchor
libnxembeddedtools.ngultra.bsm.Loader
libnxembeddedtools.ngultra.bsm.Loader
class libnxembeddedtools.ngultra.bsm.Loader(iface)

Bases: object

Class used to program the BSM.

Parameters:

iface (Interface) – interface used to communicate with the board.

Anchor
libnxembeddedtools.ngultra.bsm.Loader.bsmReset
libnxembeddedtools.ngultra.bsm.Loader.bsmReset
bsmReset()

Reset the BSM

Info
The reset sequence is:
  • Assert SOFT_RSTN

  • Wait for 100 cycles of BSM

  • Deassert SOFT_RSTN

  • Assert HARD_RSTN

  • Wait for 3 us

  • Deassert HARD_RSTN

  • Wait for 128 cycles if BSM

Info

Since we are using a python over USB interface (either Lauterbach or openOCD), the minimum delay is at least 1ms. So no wait is required.

Anchor
libnxembeddedtools.ngultra.bsm.Loader.isReady
libnxembeddedtools.ngultra.bsm.Loader.isReady
isReady()

Checks if the ready flag is set

Anchor
libnxembeddedtools.ngultra.bsm.Loader.program
libnxembeddedtools.ngultra.bsm.Loader.program
program(nxbFile, address=None)

Program the BSM with the provided nxbFile:

Parameters:
  • nxbFile (str) – NXB to program.

  • address (int) – Address where the NXB is stored. If None, it uses the default loader address in the eRAM.

...