完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我正在尝试实现8237 DMA控制器中使用的优先级编码器,它使用Verilog工作在固定和旋转优先模式,但是在行为模拟输出仅在第一个周期生成并且无论应用什么值都保持不变。我附加 生成的波形的代码和屏幕截图。 请帮忙 感谢致敬 Priority_encoder.v 3 KB 以上来自于谷歌翻译 以下为原文 Hi all, I am trying to implement priority encoder used in 8237 DMA Controller which work in fixed as well as rotating priority mode,using Verilog but after behavioral simulation output is generated only for first cycle and it remain constant irrespective of whatever value is applied.I am attaching the code and screenshot of waveform generated. Please help Thanks and Regards Priority_encoder.v 3 KB |
|
相关推荐
1个回答
|
|
哇 - 很多人都在这里。
我建议进行一些清理 - 完全消除“临时”变量 - 我对你试图用它做的事感到困惑,我不认为这是必要的。 不要使用案例陈述 - 你正在寻找优先权; 用if-else编写代码。 我想的是: 模块Priority_encoder( 输入线clk, 输入线CS, 输入线[7:0] command_out, 输入线[3:0] DREQ, 输出reg [3:0] DACK ); 永远@(posedge clk) ....在这里添加资格 if(DREQ [3]) DACK 不完全是我怎么做的,但这应该非常清楚易懂。 问候, 标记 以上来自于谷歌翻译 以下为原文 Whoa - lot's going on here. I suggest some cleanup - eliminate the "temp" variable altogether - I'm confused with what you're trying to do with it, and I don't think it's neccesary. Don't use case statements either - you're looking for priority; code it as such with an if-else. I'm thinking something like: module Priority_encoder( input wire clk, input wire CS, input wire [7:0] command_out, input wire [3:0] DREQ, output reg [3:0] DACK );always @( posedge clk ) ....add qualifications here if( DREQ[ 3 ] ) DACK <= 4'b1000; else if( DREQ[ 2 ] ) DACK <= 4'b0100; else if( DREQ[ 1 ] ) DACK <= 4'b0010; else if( DREQ[ 0 ] ) DACK <= 4'b0001; else DACK <= 0;Not exactly how I'd do it, but this should be very clear and easy to understand. Regards, Mark |
|
|
|
只有小组成员才能发言,加入小组>>
2501 浏览 7 评论
2871 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2330 浏览 9 评论
3424 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2512 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
2457浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
661浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
521浏览 1评论
801浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-2-24 23:42 , Processed in 1.258890 second(s), Total 46, Slave 40 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191