π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The new qc platforms uses XBL Device Tree as its memory map source instead | |
| # if using uefi.cfg. | |
| # A dtb file is also easy to be parsed with libufdt. | |
| from pyfdt.pyfdt import FdtBlobParse, FdtNode, FdtProperty | |
| SIZE_2GB = 0x80000000 | |
| SIZE_4GB = 2 * SIZE_2GB | |
| RT_LIST = ["SYS_MEM", "MMAP_IO", | |
| "IO", "FIRMWARE_DEV", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| csv_file_path = 'Fan_Out_Netlabel_P1_2024-07-19.csv' | |
| txt_file_path = 'o.txt' | |
| with open(csv_file_path, encoding='utf-16le') as csvfile: | |
| sr = csv.DictReader(csvfile, delimiter='\t', quotechar='|') | |
| with open(txt_file_path, 'w', encoding='utf-16le') as txt_file: | |
| for row in sr: | |
| netname = row['netname'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Global Settings | |
| DoubleIC = False | |
| GenSpb = True | |
| GenC = False | |
| GEN_COMMENT = False | |
| FirstReg = 0x25 | |
| SecondReg = 0x4d | |
| TraceFileName = "tracefile.txt" | |
| OutputFileNameC = "spb.c" | |
| OutputFileNameSpbScript = "spb.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| //#define DEBUG | |
| uint32_t swap_uint32(uint32_t x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyfdt.pyfdt import FdtBlobParse | |
| # NOTICE, you need to install pyfdt package first :) | |
| # pip install pyfdt | |
| SIZE_2GB = 0x80000000 | |
| class MemoryDescriptor: | |
| # base = 0 |