improve python test code with VIS
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from devlib.util import print_instruction
|
||||
from devlib.util import print_instruction, DeviceInstruction
|
||||
from sti.util import *
|
||||
|
||||
STI_PARAMETER_0 = {
|
||||
@@ -23,16 +23,22 @@ STI_PARAMETER_1 = {
|
||||
'STI_NUM': STI_NUM_INFINITE,
|
||||
}
|
||||
|
||||
print_instruction(STI_INSTRUCTION['GLOBAL'], STI_PARAMETER_0, append_ris_type=False, c_style_uint8_array='ins')
|
||||
print_instruction(STI_INSTRUCTION['GLOBAL'], STI_PARAMETER_0, append_ris_type=False)
|
||||
|
||||
if not validate_frequency_parameter(STI_PARAMETER_0):
|
||||
print('invalidate parameter')
|
||||
else:
|
||||
print('----')
|
||||
print_instruction(STI_INSTRUCTION['LOCAL'], STI_PARAMETER_0, append_ris_type=False, c_style_uint8_array='ins')
|
||||
print_instruction(STI_INSTRUCTION['LOCAL'], STI_PARAMETER_0, append_ris_type=False)
|
||||
|
||||
if not validate_frequency_parameter(STI_PARAMETER_1):
|
||||
print('invalidate parameter')
|
||||
else:
|
||||
print('----')
|
||||
print_instruction(STI_INSTRUCTION['LOCAL'], STI_PARAMETER_1, append_ris_type=False, c_style_uint8_array='ins')
|
||||
print_instruction(STI_INSTRUCTION['LOCAL'], STI_PARAMETER_1, append_ris_type=False)
|
||||
|
||||
print('--sti--')
|
||||
print_instruction(DeviceInstruction.VIS_STI, {})
|
||||
|
||||
print('--int--')
|
||||
print_instruction(DeviceInstruction.VIS_INT, {})
|
||||
|
||||
Reference in New Issue
Block a user