Struct xc2bit::XC2Macrocell
[−]
[src]
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]
&self,
fb: u32,
mc: u32,
writer: W
) -> Result<(), Error>
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]
&self,
device: XC2Device,
fb: u32,
mc: u32,
fuse_array: &mut FuseArray
)
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]
device: XC2Device,
fb: u32,
mc: u32,
fuse_array: &FuseArray
) -> Self
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]
jed: &mut JEDECFile,
linebreaks: &mut LinebreakSet,
device: XC2Device,
fb: &XC2BitstreamFB,
fuse_base: usize
)
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]
jed: &mut JEDECFile,
linebreaks: &mut LinebreakSet,
device: XC2Device,
fb: &XC2BitstreamFB,
fb_i: usize,
fuse_base: usize
)
Helper that prints the macrocell configuration on the "large" parts
Trait Implementations
impl Copy for XC2Macrocell
[src]
impl Clone for XC2Macrocell
[src]
fn clone(&self) -> XC2Macrocell
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for XC2Macrocell
[src]
impl PartialEq for XC2Macrocell
[src]
fn eq(&self, __arg_0: &XC2Macrocell) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &XC2Macrocell) -> bool
[src]
This method tests for !=
.
impl Hash for XC2Macrocell
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for XC2Macrocell
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more