在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3875|回复: 13

[原创] 请教下面的语句,一般如何用fpga实现

[复制链接]
发表于 2014-4-23 12:02:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
请教下面的语句,一般如何用fpga实现

assign o_cclk = (en)?(~i_cclk):1'h1;
发表于 2014-4-23 12:37:59 | 显示全部楼层
一个LUT搞定
 楼主| 发表于 2014-4-23 17:32:29 | 显示全部楼层
回复 2# haitaox


   请教???如何实现?
 楼主| 发表于 2014-4-23 18:22:13 | 显示全部楼层
我是这么实现的,对不?有别的方法么?

BUFGCTRL #(
   .INIT_OUT(1),           // Initial value of BUFGCTRL output ($VALUES;)
   .PRESELECT_I0("TRUE"), // BUFGCTRL output uses I0 input ($VALUES;)
   .PRESELECT_I1("FALSE")  // BUFGCTRL output uses I1 input ($VALUES;)
)
BUFGCTRL_inst (
   .O(o_cclk),             // 1-bit output: Clock output
   .CE0(o_wr_cmd | o_rd_cmd),         // 1-bit input: Clock enable input for I0
   .CE1(1'b1),         // 1-bit input: Clock enable input for I1
   .I0(~i_cclk),           // 1-bit input: Primary clock
   .I1(~i_cclk),           // 1-bit input: Secondary clock
   .IGNORE0(1'b0), // 1-bit input: Clock ignore input for I0
   .IGNORE1(1'b0), // 1-bit input: Clock ignore input for I1
   .S0(1'b1),           // 1-bit input: Clock select for I0
   .S1(1'b0)            // 1-bit input: Clock select for I1
);
 楼主| 发表于 2014-4-23 18:24:54 | 显示全部楼层
BUFGCTRL #(
   .INIT_OUT(1),           // Initial value of BUFGCTRL output ($VALUES;)
   .PRESELECT_I0("TRUE"), // BUFGCTRL output uses I0 input ($VALUES;)
   .PRESELECT_I1("FALSE")  // BUFGCTRL output uses I1 input ($VALUES;)
)
BUFGCTRL_inst (
   .O(o_cclk),             // 1-bit output: Clock output
   .CE0(en),         // 1-bit input: Clock enable input for I0
   .CE1(1'b1),         // 1-bit input: Clock enable input for I1
   .I0(~i_cclk),           // 1-bit input: Primary clock
   .I1(~i_cclk),           // 1-bit input: Secondary clock
   .IGNORE0(1'b0), // 1-bit input: Clock ignore input for I0
   .IGNORE1(1'b0), // 1-bit input: Clock ignore input for I1
   .S0(1'b1),           // 1-bit input: Clock select for I0
   .S1(1'b0)            // 1-bit input: Clock select for I1
);
发表于 2014-4-23 20:41:41 | 显示全部楼层
新手不明白你说什么,你一条语句不是已经实现了吗。。。什么叫怎么实现。
发表于 2014-4-23 23:08:34 | 显示全部楼层
你是要切换时钟?用的什么器件,xilinx的bufg都有切换时钟的功能
发表于 2014-4-24 20:18:33 | 显示全部楼层
谢谢楼主
 楼主| 发表于 2014-4-25 09:55:28 | 显示全部楼层
额,应该用BUFGCE吧,呵呵,貌似搞错了
发表于 2014-4-25 09:58:22 | 显示全部楼层
貌似自己会呀 这是在显摆吗 亲
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

X

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-6-22 11:14 , Processed in 0.023388 second(s), 9 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表