pub trait Target: Debug {
// Required methods
fn name(&self) -> &str;
fn options(&self) -> BTreeMap<String, String>;
fn prototype(&self, name: &str) -> Option<&TargetPrototype>;
fn validate(&self, design: &Design, cell: &TargetCell);
fn import(&self, design: &mut Design) -> Result<(), TargetImportError>;
fn export(&self, design: &mut Design);
fn synthesize(&self, design: &mut Design) -> Result<(), ()>;
}
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Get target name. The name of the target can be used to construct a new instance of it.
Sourcefn options(&self) -> BTreeMap<String, String>
fn options(&self) -> BTreeMap<String, String>
Get target options. Target options define the exact variant of the target, and include the device family, device name, speed grade, temperature variant, and any other parameters required to fully define a specific device.
Sourcefn prototype(&self, name: &str) -> Option<&TargetPrototype>
fn prototype(&self, name: &str) -> Option<&TargetPrototype>
Get prototypes of target cells. Prototypes in conjunction with the target cell itself define the connectivity and properties of the primitive instance.
Sourcefn validate(&self, design: &Design, cell: &TargetCell)
fn validate(&self, design: &Design, cell: &TargetCell)
Validate target-specific constraints. Conformance with the prototype is always validated
by Design::validate
.