microprobe.target.isa.instruction_format.InstructionFormat¶
-
class
InstructionFormat
(fname, descr)[source]¶ Bases:
object
Abstract class to represent an instruction format
Methods
__init__
(fname, descr)- param fname
flip_fields
(fname1, fname2)Interchanges the position of the fields with name fname1 and fname2.
full_report
([tabs])get_field
(fname)Returns a the
InstructionField
with name fname.get_field_props
(fname)Returns extra properties of field with name fname.
Returns a
list
of theInstructionField
get_findex
(fname)Returns the index of the field fname within the instruction format
Returns a
list
oftuple()
of three elements.set_fields
(fields[, reset])Sets the fields of the instruction format.
Attributes
-
property
name
¶
-
property
description
¶
-
abstract property
fields
¶
-
abstract property
assembly_format
¶
-
abstract
get_operands
()[source]¶ Returns a
list
oftuple()
of three elements. The first is aOperand
object, the second is abool
indicating if the operand is an input operand and the third is abool
indicating if the operand is an output operand.
-
abstract
get_fields
()[source]¶ Returns a
list
of theInstructionField
-
abstract
get_field
(fname)[source]¶ Returns a the
InstructionField
with name fname.- Parameters
fname –
-
abstract
get_field_props
(fname)[source]¶ Returns extra properties of field with name fname.
- Parameters
fname (
str
) – Field name.
-
abstract
get_findex
(fname)[source]¶ Returns the index of the field fname within the instruction format
- Parameters
fname (
str
) – Field name.
-
abstract
flip_fields
(fname1, fname2)[source]¶ Interchanges the position of the fields with name fname1 and fname2.
-
abstract
set_fields
(fields, reset=True)[source]¶ Sets the fields of the instruction format. If reset is True the properties and the flip records of the fields are removed.
- Parameters
fields (
list
ofInstructionField
) – List of fields.reset (
bool
) – Flag indicating if a full reset is needed (Default value = True)