qick.tprocv2_assembler

// FERMI RESEARCH LAB

// Date : 2024_8_2 // Version : 3 // Revision : 23 /////////////////////////////////////////////////////////////////////////////// Description: Assembler for Qick Processor -Create Binary Files ( list2bin, file_asm2bin, str_asm2bin ) -Create Instruction List ( file_asm2list, str_asm2list ) -Create Assembler File from Instruction List ( list2asm )

p_list = Assembler.file_asm2list(filenames[0]) p_list[0] > program_list p_list[1] > label_dict

p_txt, p_bin = Assembler.file_asm2bin(filenames[0]) p_txt > Used for Simulation p_bin > Used to store in the memory

Get ASM from Program List Structure p_asm = Assembler.list2asm(p_list[0], p_list[1])

Functions

check_lit(lit_str)

check_name(name_str)

check_num(num_str)

check_reg(name_reg)

find_pattern(regex, text)

get_imm_dt(lit, bit_len[, lit_val])

get_reg_addr(reg, Type)

returns:

register_address.

get_src_type(src)

returns (tuple):

Type of Source

integer2bin(strin[, bits, uint])

receives an integer in str format and returns their bits as a string.

parse_labels(program_list, label_dict)

add addresses for labels in command arguments

Classes

Assembler()

Instruction()

LFSR()

qick.tprocv2_assembler.parse_labels(program_list: list, label_dict: dict) None[source]

add addresses for labels in command arguments

qick.tprocv2_assembler.integer2bin(strin: str, bits: int = 8, uint: int = 0) str[source]

receives an integer in str format and returns their bits as a string.

Strin (str):

string with an integer

Bits (int):

number of bits to return

Uint (int):

is unsigned

Returns (str):

bits as a string

qick.tprocv2_assembler.get_src_type(src: str) str[source]
Returns (tuple):

Type of Source

qick.tprocv2_assembler.get_reg_addr(reg: str, Type: str) str[source]
Returns:

register_address.