python-intelhex / intelhex

Python IntelHex library
BSD 3-Clause "New" or "Revised" License
201 stars 107 forks source link

Support for arbitrary word length and word address #32

Open benfre opened 5 years ago

benfre commented 5 years ago

When I use this package to generate memory initializing file for alera_mf MEM 1 port with 16 bit word length, the saved hex file is working. I create and use mif file format. It is working. When I convert mif file to hex file using Quartus II (13.1), the different are: 1. byte_count on each line is 2 and 2. the address are word address not byte address. Although I can add _bytecount=2 when writing to hex file, the address there is no way to change the addresses.

ih.write_hex_file(f_hex, byte_count=2)

Use intelhex package:

:0200000080007E
:02000200800676
:02000400800C6E

Convert using Quartus II

:0200000080007E
:02000100800677
:02000200800C70

To solve the problem, I think creating a new class support any word length, and option for word address when writing hex file.

bialix commented 5 years ago

Sorry for not working on your issue. I'm looking for a new maintainer for Python IntelHex project. I hope someone will help.