首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

关于:Verilog HDL求教

关于:Verilog HDL求教

我刚刚学习这个语言,碰到以下问题.请指教 1.这个程序错误在第四行:我已经将错误标出.实在是不明白! module sequential_signal_gen(clk,in1,in2,d_out,g); input in1,in2,clk; output d_out,g; reg d_out,g;//"Node 'd_out' missing source" "Node 'd_out' missing source" initial begin g=0; case({clk,in1,in2}) 3'b100: d_out=0; 3'b101: d_out=1; 3'b110: d_out=0; 3'b111: d_out=1; default:g=1; endcase end endmodule 2.同时有两个时钟沿控制的8位移位寄存器 module 8bit_shift_register(d_in,d_out,clk1,clk2); input clk1,d_in,clk2; output d_out; reg d_out; reg[1:7] data; reg[1:4] i; always@(posedge clk1 or negedge clk2) begin d_out=data[1]; for(i=1;i<7;i=i+1) data=data[i+1]; data[7]=d_in; end endmodule 编译提示错误:"Always Construct error:more than one register in theEvent Control of an Always Construct is not used in the rest of the always construct
穷 则独善其身 达 则兼济天下

多谢指点!

多谢!
穷 则独善其身 达 则兼济天下
返回列表