verilog设计可综合的状态机的指导原则.pptVIP

  • 1
  • 0
  • 约1.46万字
  • 约 54页
  • 2019-07-28 发布于安徽
  • 举报

verilog设计可综合的状态机的指导原则.ppt

【13.3】利用task和电平敏感的always块设计比较后重组信号的组合逻辑. task sort2; inout [t:0] x, y; reg [t:0] tmp; if( x y ) begin tmp = x; x = y; y = tmp; end endtask endmodule 【13.4】比较器的设计实例(利用赋值语句设计组合逻辑) module compare(equal,a,b); parameter size=1; output equal; input [size-1:0] a, b; assign equal =(a==b)? 1 : 0; endmodule 【13.5】3-8译码器设计实例(利用赋值语句设计组合逻辑) module decoder(out,in); output [7:0] out; input [2:0] in; assign out = 1b1in; /**** 把最低位的1左移 in(根据从in口输入的值)位,并赋予out ****/ endmodule 【13.6】8-3编码器的设计实例 //编码器设计方案之一: module encoder1(

文档评论(0)

1亿VIP精品文档

相关文档