[][src]Struct xc2bit::XC2Macrocell

pub struct XC2Macrocell {
    pub clk_src: XC2MCRegClkSrc,
    pub clk_invert_pol: bool,
    pub is_ddr: bool,
    pub r_src: XC2MCRegResetSrc,
    pub s_src: XC2MCRegSetSrc,
    pub init_state: bool,
    pub reg_mode: XC2MCRegMode,
    pub fb_mode: XC2MCFeedbackMode,
    pub ff_in_ibuf: bool,
    pub xor_mode: XC2MCXorMode,
}

Represents a macrocell.

Fields

clk_src: XC2MCRegClkSrc

Clock source for the register

clk_invert_pol: bool

Specifies the clock polarity for the register

false = rising edge triggered flip-flop, transparent-when-high latch

true = falling edge triggered flip-flop, transparent-when-low latch

is_ddr: bool

Specifies whether flip-flop are triggered on both clock edges

It is currently unknown what happens when this is used on a transparent latch

r_src: XC2MCRegResetSrc

Reset source for the register

s_src: XC2MCRegSetSrc

Set source for the register

init_state: bool

Power-up state of the register

false = init to 0, true = init to 1

reg_mode: XC2MCRegMode

Register mode

fb_mode: XC2MCFeedbackMode

ZIA input mode for feedback from this macrocell

ff_in_ibuf: bool

Controls the input for the register

false = use the output of the XOR gate (combinatorial path), true = use IOB direct path (true is illegal for buried macrocells in the larger devices)

xor_mode: XC2MCXorMode

Controls the "other" (not from the OR term) input to the XOR gate

Methods

impl XC2Macrocell[src]

pub fn dump_human_readable<W: Write>(
    &self,
    fb: u32,
    mc: u32,
    writer: W
) -> Result<(), Error>
[src]

Dump a human-readable explanation of the settings for this macrocell to the given writer object. fb and mc must be the function block number and macrocell number of this macrocell.

pub fn to_crbit(
    &self,
    device: XC2Device,
    fb: u32,
    mc: u32,
    fuse_array: &mut FuseArray
)
[src]

Write the crbit representation of this macrocell to the given fuse_array.

pub fn from_crbit(
    device: XC2Device,
    fb: u32,
    mc: u32,
    fuse_array: &FuseArray
) -> Self
[src]

Reads the crbit representation of this macrocell from the given fuse_array.

pub fn from_jed_small(fuses: &[bool], block_idx: usize, mc_idx: usize) -> Self[src]

Internal function that reads only the macrocell-related bits from the macrcocell configuration

pub fn from_jed_large(fuses: &[bool], fuse_idx: usize) -> Self[src]

Internal function that reads only the macrocell-related bits from the macrcocell configuration

pub fn from_jed_large_buried(fuses: &[bool], fuse_idx: usize) -> Self[src]

Internal function that reads only the macrocell-related bits from the macrcocell configuration

pub fn to_jed_small(
    jed: &mut JEDECFile,
    linebreaks: &mut LinebreakSet,
    device: XC2Device,
    fb: &XC2BitstreamFB,
    fuse_base: usize
)
[src]

Helper that prints the macrocell configuration on the "small" parts

pub fn to_jed_large(
    jed: &mut JEDECFile,
    linebreaks: &mut LinebreakSet,
    device: XC2Device,
    fb: &XC2BitstreamFB,
    fb_i: usize,
    fuse_base: usize
)
[src]

Helper that prints the macrocell configuration on the "large" parts

Trait Implementations

impl Clone for XC2Macrocell[src]

impl Copy for XC2Macrocell[src]

impl Debug for XC2Macrocell[src]

impl Default for XC2Macrocell[src]

fn default() -> Self[src]

Returns a "default" macrocell configuration.

impl<'de> Deserialize<'de> for XC2Macrocell[src]

impl Eq for XC2Macrocell[src]

impl Hash for XC2Macrocell[src]

impl PartialEq<XC2Macrocell> for XC2Macrocell[src]

impl Serialize for XC2Macrocell[src]

impl StructuralEq for XC2Macrocell[src]

impl StructuralPartialEq for XC2Macrocell[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.