kirill
Member level 5
- Joined
- Feb 23, 2011
- Messages
- 92
- Helped
- 17
- Reputation
- 36
- Reaction score
- 17
- Trophy points
- 1,288
- Location
- Russia, Moscow
- Activity points
- 1,774
ODDR2_inst : ODDR2
generic map
(
DDR_ALIGNMENT => "NONE",
INIT => '0',
SRTYPE => "SYNC"
)
port map
(
Q => i2s_mclk_final,
C0 => i2s_mclk_in,
C1 => i2s_mclk_in_neg,
D0 => '0',
D1 => '1'
);
i2s_mclk_in_neg <= not(i2s_mclk_in); (this is because i heard that its problematic if i negate it on the fly)
port map
(
Q => i2s_mclk_final,
C0 => i2s_mclk_in,
C1 => not(i2s_mclk_in),
D0 => '0',
D1 => '1'
);
DCM_CLKGEN_inst : DCM_CLKGEN
generic map
(
CLKFXDV_DIVIDE => 2, -- CLKFXDV divide value (2, 4, 8, 16, 32)
CLKFX_DIVIDE => 1, -- Divide value - D - (1-256)
CLKFX_MD_MAX => 0.0, -- Specify maximum M/D ratio for timing anlysis
CLKFX_MULTIPLY => 4, -- Multiply value - M - (2-256)
CLKIN_PERIOD => 0.0, -- Input clock period specified in nS
SPREAD_SPECTRUM => "NONE", -- Spread Spectrum mode "NONE", "CENTER_LOW_SPREAD", "CENTER_HIGH_SPREAD",
-- "VIDEO_LINK_M0", "VIDEO_LINK_M1" or "VIDEO_LINK_M2"
STARTUP_WAIT => FALSE -- Delay config DONE until DCM_CLKGEN LOCKED (TRUE/FALSE)
)
port map
(
CLKFX => i2s_mclk, -- 1-bit output: Generated clock output
CLKFX180 => open, -- 1-bit output: Generated clock output 180 degree out of phase from CLKFX.
CLKFXDV => open, -- 1-bit output: Divided clock output
LOCKED => open, -- 1-bit output: Locked output
PROGDONE => open, -- 1-bit output: Active high output to indicate the successful re-programming
STATUS => open, -- 2-bit output: DCM_CLKGEN status
CLKIN => sys_clk, -- 1-bit input: Input clock
FREEZEDCM => open, -- 1-bit input: Prevents frequency adjustments to input clock
PROGCLK => sys_clk, -- 1-bit input: Clock input for M/D reconfiguration
PROGDATA => open, -- 1-bit input: Serial data input for M/D reconfiguration
PROGEN => open, -- 1-bit input: Active high program enable
RST => clk_gen_enable -- 1-bit input: Reset input pin
);
Well, I use the exact same ODDR2 construct to generate a clock output (admittedly in verilog) and that works just fine..
mrflibble said:Well, you can always RTFM at the section I suggested earlier and see if xilinx has a VHDL code template for precisely this case.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?