Bennett/Bennett loading file formats: Difference between revisions

From Engineering Wiki
Jump to navigation Jump to search
gravatar Mmapxam5 [userbureaucrateditorinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmVkaXRvcjxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
gravatar Mmapxam5 [userbureaucrateditorinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmVkaXRvcjxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
(No difference)

Revision as of 07:39, 4 September 2025

Loading Data and Files

Load program.png

Assembly and Data code

The ‘Load Program’ button, in the top right of Bennett, encompasses all the file loaders that are used. This is a feature implemented to improve user experience (UX), replacing the ‘Assemble’ tab in the Bennett menu and opening up the possibility of loading a variety of files. Clicking this button will prompt you to select a file to load into Bennett. Currently Bennett supports the loading of the following files:

Bennett extracts the file extension and uses this to match the appropriate loader. Once a match is found, the system verifies whether the file is memory relocatable. For file types that are memory addressable/relocatable (so far hex and binary), a window pops up allowing you to specify where you want to load your program into, this number must end in 0/4/8/C to keep it consistent with RISC-V memory architecture, or else a warning box pops up to reinstate this rule.

Assembly files

An appropriate in built assembler will be use when loading an assembly file (.s extension)

Example file:

defb 0xff
addi x1, x2, 0xf

Data Files

Binary file .bin

Any file with a .bin extension will be loaded. The underlying architecture must be byte adressable at present.

Hex files .hex

A text based hex file format

Example file:

9A3F
4D8B
C1E2
6F50
2B79
1A3C
E4F1

Image file formats

Loading an image file into the memory, preproccessing to 8bit and starting the image import at memory address 0x20000

Bennett supports the loading of image files into a memory. Supported file formats include PNG,JPEG, GIF and BMP.

To load an image file, click the "Load Program" button. A file dialog will allow you navigate to your chosen image.

You will then be presented with a dialog which will allow you to specify where in memory you wish the import the image, and any preprocessing required for your image.

Processing Options:

  • 8 bit - converts image to 8 bit
  • 16 bit - converts image to 16 bit
  • 24 bit - converts image to 24 bit

Images will need to be appropriately sized before loading. Image manipulation programs area available on the lab machines.

Once you click ok, the image will be loaded into the memory address. On hardware systems, this can take a long time due to limitations in the speed of comms with the hardware board. Be patient.


How to Load Files Into Bennett

Loading files couldn't be any easier!

  1. By using F11, or the button in the top right of the UI, a file directory finder appears
  2. Select one of the supported files from above
  3. If selected hex or binary file, enter a memory address in hex, and hit Enter / Load (optional)
  4. You have successfully loaded your first file into Bennett