Bennett/Bennett loading file formats: Difference between revisions
![]() ![]() ![]() ![]() m (Mmapxam5 moved page Bennett loading file formats to Bennett/Bennett loading file formats) |
|
(No difference)
|
Revision as of 07:39, 4 September 2025
Loading Data and Files
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
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!
- By using F11, or the button in the top right of the UI, a file directory finder appears
- Select one of the supported files from above
- If selected hex or binary file, enter a memory address in hex, and hit Enter / Load (optional)
- You have successfully loaded your first file into Bennett