⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 control.v

📁 这是PCM电话传输系统模型的verilog程序,是一个modlesim开发环境下的工程文件,并有波形仿真结果.
💻 V
字号:
module control(clk1,cnt_for_mux,cnt,clk_488,rst,frame_clk);
output clk1;         //as the clk of mux and demux
output [4:0] cnt_for_mux;  //use cnt_for_mux to control the mux,demux
output [2:0] cnt;          //use cnt to control s_2_p;
input  clk_488,rst;
input  frame_clk;

reg [2:0] cnt;
reg [4:0] cnt_for_mux;
reg       clk1;


always@(posedge clk_488 or negedge rst or posedge frame_clk )
  if(!rst) begin
              cnt<=0;cnt_for_mux<=0;
           end
  else if(frame_clk)  begin cnt<=0;cnt_for_mux<=0;end
  else if(cnt==7)    begin cnt<=cnt+1;cnt_for_mux<=cnt_for_mux+1;end
  else cnt<=cnt+1;                              

always@(posedge clk_488)
   if(cnt==7) clk1<=1;
   else clk1<=0;        //produce clk1=8*488 
   
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -