打印

斑竹请帮忙:Xilinx SRL16的仿真问题

[复制链接]
2502|9
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
edacsoft|  楼主 | 2011-8-15 14:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
AutoESL| | 2011-8-15 14:58 | 只看该作者
报什么错误?贴一下吧

使用特权

评论回复
板凳
AutoESL| | 2011-8-15 15:09 | 只看该作者
VHDL Template:
-- Module: SHIFT_REGISTER_C_16
-- Description: VHDL instantiation template
-- CASCADABLE 16-bit shift register with enable (SRLC16E)
-- Device: Spartan-3 Generation Family
---------------------------------------------------------------------
-- Components Declarations:
--
component SRLC16E
-- pragma translate_off
generic (
-- Shift Register initialization ("0" by default) for functional
simulation:
INIT : bit_vector := X"0000"
);
-- pragma translate_on
port (
D : in std_logic;
CE : in std_logic;
CLK : in std_logic;
A0 : in std_logic;
A1 : in std_logic;
A2 : in std_logic;
A3 : in std_logic;
Q : out std_logic;
Q15 : out std_logic
);
end component;
-- Architecture Section:
-- Attributes for Shift Register initialization (“0” by default):
attribute INIT: string;
--
attribute INIT of U_SRLC16E: label is “0000”;
--
-- ShiftRegister Instantiation
U_SRLC16E: SRLC16E
port map (
D => , -- insert input signal
CE => , -- insert Clock Enable signal (optional)
CLK => , -- insert Clock signal
A0 => , -- insert Address 0 signal
A1 => , -- insert Address 1 signal
A2 => , -- insert Address 2 signal
A3 => , -- insert Address 3 signal
Q => , -- insert output signal
Q15 => -- insert cascadable output signal
);

http://www.xilinx.com/support/do ... n_notes/xapp465.pdf

使用特权

评论回复
评分
参与人数 2威望 +3 收起 理由
edacsoft + 1 3ks
SuperX-man + 2
地板
SuperX-man| | 2011-8-15 22:23 | 只看该作者
贴下错误,或者参考下楼上的模板

使用特权

评论回复
5
edacsoft|  楼主 | 2011-8-16 10:23 | 只看该作者
谢谢两位。
INIT : bit_vector := X"0000"是正确的
如果不声明,无法后仿真。
从software manuals -> libraries guides
或者language templete进去都是只有例化没有声明的,
不知X家咋想的。偶尔大家也想看看后防吧。

还有一个模块DCM_SP的声明我也得找找。

使用特权

评论回复
6
GoldSunMonkey| | 2011-8-16 18:50 | 只看该作者
这个初始化都是需要声明的。

使用特权

评论回复
7
GoldSunMonkey| | 2011-8-16 18:54 | 只看该作者
S3的DCM_SP
DCM_SP
VHDL
Library UNISIM;
use UNISIM.vcomponents.all;
-- DCM_SP: Digital Clock Manager Circuit
-- Spartan-3A
DCM_SP_inst : DCM_SP
generic map (
CLKDV_DIVIDE => 2.0, -- Divide by: 1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5
-- 7.0,7.5,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0 or 16.0
CLKFX_DIVIDE => 1, -- Can be any interger from 1 to 32
CLKFX_MULTIPLY => 4, -- Can be any integer from 1 to 32
CLKIN_DIVIDE_BY_2 => FALSE, -- TRUE/FALSE to enable CLKIN divide by two feature
CLKIN_PERIOD => 0.0, -- Specify period of input clock
CLKOUT_PHASE_SHIFT => "NONE", -- Specify phase shift of "NONE", "FIXED" or "VARIABLE"
CLK_FEEDBACK => "1X", -- Specify clock feedback of "NONE", "1X" or "2X"
DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", -- "SOURCE_SYNCHRONOUS", "SYSTEM_SYNCHRONOUS" or
-- an integer from 0 to 15
DLL_FREQUENCY_MODE => "LOW", -- "HIGH" or "LOW" frequency mode for DLL
DUTY_CYCLE_CORRECTION => TRUE, -- Duty cycle correction, TRUE or FALSE
PHASE_SHIFT => 0, -- Amount of fixed phase shift from -255 to 255
STARTUP_WAIT => FALSE) -- Delay configuration DONE until DCM_SP LOCK, TRUE/FALSE
port map (
CLK0 => CLK0, -- 0 degree DCM CLK ouptput
CLK180 => CLK180, -- 180 degree DCM CLK output
CLK270 => CLK270, -- 270 degree DCM CLK output
CLK2X => CLK2X, -- 2X DCM CLK output
CLK2X180 => CLK2X180, -- 2X, 180 degree DCM CLK out
CLK90 => CLK90, -- 90 degree DCM CLK output
CLKDV => CLKDV, -- Divided DCM CLK out (CLKDV_DIVIDE)
CLKFX => CLKFX, -- DCM CLK synthesis out (M/D)
CLKFX180 => CLKFX180, -- 180 degree CLK synthesis out
LOCKED => LOCKED, -- DCM LOCK status output
PSDONE => PSDONE, -- Dynamic phase adjust done output
STATUS => STATUS, -- 8-bit DCM status bits output
CLKFB => CLKFB, -- DCM clock feedback
CLKIN => CLKIN, -- Clock input (from IBUFG, BUFG or DCM)
PSCLK => PSCLK, -- Dynamic phase adjust clock input
PSEN => PSEN, -- Dynamic phase adjust enable input
PSINCDEC => PSINCDEC, -- Dynamic phase adjust increment/decrement
RST => RST -- DCM asynchronous reset input
);
-- End of DCM_SP_inst instantiation
// DCM_SP: Digital Clock Manager Circuit
// Spartan-3A
DCM_SP #(
.CLKDV_DIVIDE(2.0), // Divide by: 1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5
// 7.0,7.5,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0 or 16.0
.CLKFX_DIVIDE(1), // Can be any integer from 1 to 32
.CLKFX_MULTIPLY(4), // Can be any integer from 2 to 32
.CLKIN_DIVIDE_BY_2("FALSE"), // TRUE/FALSE to enable CLKIN divide by two feature
.CLKIN_PERIOD(0.0), // Specify period of input clock
.CLKOUT_PHASE_SHIFT("NONE"), // Specify phase shift of NONE, FIXED or VARIABLE
.CLK_FEEDBACK("1X"), // Specify clock feedback of NONE, 1X or 2X
.DESKEW_ADJUST("SYSTEM_SYNCHRONOUS"), // SOURCE_SYNCHRONOUS, SYSTEM_SYNCHRONOUS or
// an integer from 0 to 15
.DLL_FREQUENCY_MODE("LOW"), // HIGH or LOW frequency mode for DLL
.DUTY_CYCLE_CORRECTION("TRUE"), // Duty cycle correction, TRUE or FALSE
.PHASE_SHIFT(0), // Amount of fixed phase shift from -255 to 255
.STARTUP_WAIT("FALSE") // Delay configuration DONE until DCM LOCK, TRUE/FALSE
) DCM_SP_inst (
.CLK0(CLK0), // 0 degree DCM CLK output
.CLK180(CLK180), // 180 degree DCM CLK output
.CLK270(CLK270), // 270 degree DCM CLK output
.CLK2X(CLK2X), // 2X DCM CLK output
.CLK2X180(CLK2X180), // 2X, 180 degree DCM CLK out
.CLK90(CLK90), // 90 degree DCM CLK output
.CLKDV(CLKDV), // Divided DCM CLK out (CLKDV_DIVIDE)
.CLKFX(CLKFX), // DCM CLK synthesis out (M/D)
.CLKFX180(CLKFX180), // 180 degree CLK synthesis out
.LOCKED(LOCKED), // DCM LOCK status output
.PSDONE(PSDONE), // Dynamic phase adjust done output
.STATUS(STATUS), // 8-bit DCM status bits output
.CLKFB(CLKFB), // DCM clock feedback
.CLKIN(CLKIN), // Clock input (from IBUFG, BUFG or DCM)
.PSCLK(PSCLK), // Dynamic phase adjust clock input
.PSEN(PSEN), // Dynamic phase adjust enable input
.PSINCDEC(PSINCDEC), // Dynamic phase adjust increment/decrement
.RST(RST) // DCM asynchronous reset input
);
// End of DCM_SP_inst instantiation

使用特权

评论回复
8
快乐出发| | 2011-9-10 21:36 | 只看该作者
学习了。:handshake

使用特权

评论回复
9
ooljo| | 2011-9-11 19:05 | 只看该作者
讲解的好详细呀

使用特权

评论回复
10
ooljo| | 2011-9-11 19:05 | 只看该作者
受益匪浅

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

44

主题

246

帖子

0

粉丝