You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Dealing with some hisilicon chips. they generally initalize a number of registers using a sort of binary
csv file with the following format:
structregentry {
uint32_treg_addr; // address of the registeruint32_tvalue; // value to be written or readuint32_tdelay; // amount of nop's to execute to delayuint32_tattr; // read or write and other flags
};
I've been putting together a svd file for the soc for use with the PyCortexMDebug project, and was hoping
this may allow for me to use said svd file to parse out the actions taken instead of manually figuring the bitfields.
This is possible. Had a project,where I got a list of addresses for my MCU where I needed to translate those addresses back to a readable name.
The general outline is to first iterate over all peripherals, collect their memory range and if your address lies within that range, iterate over all of the peripheral's registers (by adding their offset to the peripheral's base). If you find a match there, than your address belongs to the peripheral and relates to the register you found.
There are ways to improve this general algorithm by building a search tree over those values you have to check, but the general idea stays the same.
Awright. I've gotten to the point where I have a reg address (Peripheral base address + register address) and
a SVDRegister object, and value read/written, along with bitrange, in a context. Now I just need to figure out
how to parse out the bitrange of the value into fields and their enumerated values, if possible. hrm.
Hello. Dealing with some hisilicon chips. they generally initalize a number of registers using a sort of binary
csv file with the following format:
I've been putting together a svd file for the soc for use with the PyCortexMDebug project, and was hoping
this may allow for me to use said svd file to parse out the actions taken instead of manually figuring the bitfields.
for reference:
Note these values are encoded in little endian.
The text was updated successfully, but these errors were encountered: